MXS-1203: Better handling of batch queries
When batched queries are done through readwritesplit, it will now handle them one by one. This allows batched queries to be used with readwritesplit but it does impose a performance penalty when compared to direct execution on the backend.
This commit is contained in:
@ -756,7 +756,7 @@ gw_read_and_write(DCB *dcb)
|
||||
* If protocol has session command set, concatenate whole
|
||||
* response into one buffer.
|
||||
*/
|
||||
if (protocol_get_srv_command((MySQLProtocol *)dcb->protocol, false) != MYSQL_COM_UNDEFINED)
|
||||
if (protocol_get_srv_command((MySQLProtocol *)dcb->protocol, true) != MYSQL_COM_UNDEFINED)
|
||||
{
|
||||
stmt = process_response_data(dcb, &read_buffer, gwbuf_length(read_buffer));
|
||||
/**
|
||||
|
@ -1562,3 +1562,9 @@ bool mxs_mysql_is_result_set(GWBUF *buffer)
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
mysql_server_cmd_t mxs_mysql_current_command(MXS_SESSION* session)
|
||||
{
|
||||
MySQLProtocol* proto = (MySQLProtocol*)session->client_dcb->protocol;
|
||||
return proto->current_command;
|
||||
}
|
||||
|
Reference in New Issue
Block a user