From d89cfc18102532900bc5813be3f85139ca3f50e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 19 Oct 2018 11:38:55 +0300 Subject: [PATCH] Fix crash on KILL Only backend DCBs should get processed by the callback. --- server/modules/protocol/MySQL/mysql_common.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/protocol/MySQL/mysql_common.cc b/server/modules/protocol/MySQL/mysql_common.cc index fc47a7135..cbbfc561b 100644 --- a/server/modules/protocol/MySQL/mysql_common.cc +++ b/server/modules/protocol/MySQL/mysql_common.cc @@ -1371,7 +1371,7 @@ static bool kill_func(DCB* dcb, void* data) { ConnKillInfo* info = static_cast(data); - if (dcb->session->ses_id == info->target_id) + if (dcb->session->ses_id == info->target_id && dcb->dcb_role == DCB_ROLE_BACKEND_HANDLER) { MySQLProtocol* proto = (MySQLProtocol*)dcb->protocol;