MXS-852: Handle one-way session commands
Session commands that will not return a response can be completed immediately. This requires some special code in the readwritesplit Backend class implementation as well as a small addition to the Backend class itself. Since not all commands expect a response from the server, the queued query routing function needs some adjustment. The routing of queued queries should be attempted until a command which expects a response is found or the queue is empty. By properly handling these types of session commands, the router can enable the execution of COM_STMT_CLOSE and COM_STMT_RESET on all servers. This will prevent resource leakages in the server and allow proper handling of COM_STMT type command.
This commit is contained in:
@ -1649,3 +1649,10 @@ uint32_t mxs_mysql_extract_ps_id(GWBUF* buffer)
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
bool mxs_mysql_command_will_respond(uint8_t cmd)
|
||||
{
|
||||
return cmd != MYSQL_COM_STMT_SEND_LONG_DATA &&
|
||||
cmd != MYSQL_COM_QUIT &&
|
||||
cmd != MYSQL_COM_STMT_CLOSE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user