Fix parsing of non-query packets
Packets that do not contain SQL should not be parsed.
This commit is contained in:
@ -241,14 +241,17 @@ bool RWSplitSession::route_stored_query()
|
|||||||
GWBUF* temp_storage = m_query_queue;
|
GWBUF* temp_storage = m_query_queue;
|
||||||
m_query_queue = NULL;
|
m_query_queue = NULL;
|
||||||
|
|
||||||
// The query needs to be explicitly parsed as it was processed multiple times
|
|
||||||
qc_parse(query_queue, QC_COLLECT_ALL);
|
|
||||||
|
|
||||||
// TODO: Move the handling of queued queries to the client protocol
|
// TODO: Move the handling of queued queries to the client protocol
|
||||||
// TODO: module where the command tracking is done automatically.
|
// TODO: module where the command tracking is done automatically.
|
||||||
uint8_t cmd = mxs_mysql_get_command(query_queue);
|
uint8_t cmd = mxs_mysql_get_command(query_queue);
|
||||||
mysql_protocol_set_current_command(m_client, (mxs_mysql_cmd_t)cmd);
|
mysql_protocol_set_current_command(m_client, (mxs_mysql_cmd_t)cmd);
|
||||||
|
|
||||||
|
if (cmd == MXS_COM_QUERY || cmd == MXS_COM_STMT_PREPARE)
|
||||||
|
{
|
||||||
|
// The query needs to be explicitly parsed as it was processed multiple times
|
||||||
|
qc_parse(query_queue, QC_COLLECT_ALL);
|
||||||
|
}
|
||||||
|
|
||||||
if (!routeQuery(query_queue))
|
if (!routeQuery(query_queue))
|
||||||
{
|
{
|
||||||
rval = false;
|
rval = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user