refactor, check every packet before parser ok packet, move config to service, fix code style, ...

This commit is contained in:
Dapeng Huang
2018-01-15 20:25:44 +08:00
parent e1aeac8b07
commit d234b13027
17 changed files with 76 additions and 69 deletions

View File

@ -755,6 +755,9 @@ gw_read_and_write(DCB *dcb)
bool result_collected = false;
MySQLProtocol *proto = (MySQLProtocol *)dcb->protocol;
/** Get sesion track info from ok packet and save it to gwbuf properties */
mxs_mysql_get_session_track_info(read_buffer, proto->server_capabilities);
if (rcap_type_required(capabilities, RCAP_TYPE_PACKET_OUTPUT) ||
rcap_type_required(capabilities, RCAP_TYPE_CONTIGUOUS_OUTPUT) ||
proto->ignore_replies != 0)
@ -977,8 +980,6 @@ gw_read_and_write(DCB *dcb)
gwbuf_set_type(stmt, GWBUF_TYPE_RESULT);
}
mxs_mysql_get_session_track_info(stmt, proto->server_capabilities);
session->service->router->clientReply(session->service->router_instance,
session->router_session,
stmt, dcb);