Send KILL commands to backends

KILL commands are now sent to the backends in an asynchronous manner. As
the LocalClient class is used to connect to the servers, this will cause
an extra connection to be created on top of the original connections
created by the session.

If the user does not have the permissions to execute the KILL, the error
message is currently lost. This could be solved by adding a "result
handler" into the LocalClient class which is called with the result.
This commit is contained in:
Markus Mäkelä
2017-09-27 16:18:36 +03:00
parent a7e610a70a
commit 4dd6842447
11 changed files with 144 additions and 154 deletions

View File

@ -624,4 +624,13 @@ uint32_t mxs_mysql_extract_ps_id(GWBUF* buffer);
*/
bool mxs_mysql_command_will_respond(uint8_t cmd);
/* Type of the kill-command sent by client. */
typedef enum kill_type
{
KT_CONNECTION,
KT_QUERY
} kill_type_t;
void mxs_mysql_execute_kill(MXS_SESSION* issuer, uint64_t target_id, kill_type_t type);
MXS_END_DECLS