MXS-1203: Fix current command tracking with statement routing
When statement based routing was used, it was possible that the current statement being executed wasn't properly updated. Readwritesplit requires it to track whether a command will create a response.
This commit is contained in:
@ -1399,6 +1399,10 @@ static int route_by_statement(MXS_SESSION* session, uint64_t capabilities, GWBUF
|
||||
if (packetbuf != NULL)
|
||||
{
|
||||
CHK_GWBUF(packetbuf);
|
||||
|
||||
MySQLProtocol* proto = session->client_dcb->protocol;
|
||||
proto->current_command = (mysql_server_cmd_t)GWBUF_DATA(packetbuf)[4];
|
||||
|
||||
/**
|
||||
* This means that buffer includes exactly one MySQL
|
||||
* statement.
|
||||
|
Reference in New Issue
Block a user