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:
@ -547,4 +547,13 @@ bool mxs_mysql_extract_ps_response(GWBUF* buffer, MXS_PS_RESPONSE* out);
|
||||
*/
|
||||
uint32_t mxs_mysql_extract_ps_id(GWBUF* buffer);
|
||||
|
||||
/**
|
||||
* @brief Determine if a packet contains a one way message
|
||||
*
|
||||
* @param cmd Command to inspect
|
||||
*
|
||||
* @return True if a response is expected from the server
|
||||
*/
|
||||
bool mxs_mysql_command_will_respond(uint8_t cmd);
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
Reference in New Issue
Block a user