From e909632e9e6cd1f505ac083d47f59a5c178251cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 13 Dec 2019 08:09:26 +0200 Subject: [PATCH] MXS-2802: Route COM_RESET_CONNECTION to all servers The purpose of a COM_RESET_CONNECTION is to reset the connection states. This means it should be routed to all servers, the same as all session state modifying commands. --- server/core/queryclassifier.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/server/core/queryclassifier.cc b/server/core/queryclassifier.cc index 60d0a5cdc..9fa0a71b5 100644 --- a/server/core/queryclassifier.cc +++ b/server/core/queryclassifier.cc @@ -744,13 +744,14 @@ uint32_t QueryClassifier::determine_query_type(GWBUF* querybuf, int command) switch (command) { - case MXS_COM_QUIT: /*< 1 QUIT will close all sessions */ - case MXS_COM_INIT_DB: /*< 2 DDL must go to the master */ - case MXS_COM_REFRESH: /*< 7 - I guess this is session but not sure */ - case MXS_COM_DEBUG: /*< 0d all servers dump debug info to stdout */ - case MXS_COM_PING: /*< 0e all servers are pinged */ - case MXS_COM_CHANGE_USER: /*< 11 all servers change it accordingly */ - case MXS_COM_SET_OPTION: /*< 1b send options to all servers */ + case MXS_COM_QUIT: /*< 1 QUIT will close all sessions */ + case MXS_COM_INIT_DB: /*< 2 DDL must go to the master */ + case MXS_COM_REFRESH: /*< 7 - I guess this is session but not sure */ + case MXS_COM_DEBUG: /*< 0d all servers dump debug info to stdout */ + case MXS_COM_PING: /*< 0e all servers are pinged */ + case MXS_COM_CHANGE_USER: /*< 11 all servers change it accordingly */ + case MXS_COM_SET_OPTION: /*< 1b send options to all servers */ + case MXS_COM_RESET_CONNECTION: /*< 1f resets the state of all connections */ type = QUERY_TYPE_SESSION_WRITE; break;