@@ -160,30 +160,30 @@ static ngs::Error_code do_dispatch_command(Session &session,
160160 Sql_data_context &da, ngs::Protocol_encoder &proto,
161161 Crud_command_handler &crudh, Expectation_stack &expect,
162162 Session_options &options,
163- ngs::Request_unique_ptr &command)
163+ ngs::Request &command)
164164{
165- switch (command-> get_type ())
165+ switch (command. get_type ())
166166 {
167167 case Mysqlx::ClientMessages::SQL_STMT_EXECUTE:
168- return on_stmt_execute (session, da, options, proto, static_cast <const Mysqlx::Sql::StmtExecute&>(*command-> message ()));
168+ return on_stmt_execute (session, da, options, proto, static_cast <const Mysqlx::Sql::StmtExecute&>(*command. message ()));
169169
170170 case Mysqlx::ClientMessages::CRUD_FIND:
171- return crudh.execute_crud_find (proto, static_cast <const Mysqlx::Crud::Find&>(*command-> message ()));
171+ return crudh.execute_crud_find (proto, static_cast <const Mysqlx::Crud::Find&>(*command. message ()));
172172
173173 case Mysqlx::ClientMessages::CRUD_INSERT:
174- return crudh.execute_crud_insert (proto, static_cast <const Mysqlx::Crud::Insert&>(*command-> message ()));
174+ return crudh.execute_crud_insert (proto, static_cast <const Mysqlx::Crud::Insert&>(*command. message ()));
175175
176176 case Mysqlx::ClientMessages::CRUD_UPDATE:
177- return crudh.execute_crud_update (proto, static_cast <const Mysqlx::Crud::Update&>(*command-> message ()));
177+ return crudh.execute_crud_update (proto, static_cast <const Mysqlx::Crud::Update&>(*command. message ()));
178178
179179 case Mysqlx::ClientMessages::CRUD_DELETE:
180- return crudh.execute_crud_delete (proto, static_cast <const Mysqlx::Crud::Delete&>(*command-> message ()));
180+ return crudh.execute_crud_delete (proto, static_cast <const Mysqlx::Crud::Delete&>(*command. message ()));
181181
182182 case Mysqlx::ClientMessages::EXPECT_OPEN:
183- return on_expect_open (session, proto, expect, options, static_cast <const Mysqlx::Expect::Open&>(*command-> message ()));
183+ return on_expect_open (session, proto, expect, options, static_cast <const Mysqlx::Expect::Open&>(*command. message ()));
184184
185185 case Mysqlx::ClientMessages::EXPECT_CLOSE:
186- return on_expect_close (session, proto, expect, options, static_cast <const Mysqlx::Expect::Close&>(*command-> message ()));
186+ return on_expect_close (session, proto, expect, options, static_cast <const Mysqlx::Expect::Close&>(*command. message ()));
187187 }
188188 return ngs::Error (ER_UNKNOWN_COM_ERROR, " Unexpected message received" );
189189}
@@ -193,15 +193,15 @@ bool dispatcher::dispatch_command(Session &session,
193193 Sql_data_context &da, ngs::Protocol_encoder &proto,
194194 Crud_command_handler &crudh, Expectation_stack &expect,
195195 Session_options &options,
196- ngs::Request_unique_ptr command)
196+ ngs::Request & command)
197197{
198- ngs::Error_code error = expect.pre_client_stmt (command-> get_type ());
198+ ngs::Error_code error = expect.pre_client_stmt (command. get_type ());
199199 if (!error)
200200 {
201201 error = do_dispatch_command (session, da, proto, crudh, expect, options, command);
202202 if (error)
203203 proto.send_result (error);
204- expect.post_client_stmt (command-> get_type (), error);
204+ expect.post_client_stmt (command. get_type (), error);
205205 }
206206 else
207207 proto.send_result (error);
0 commit comments