From 1b8942cf0faa1f9d77ae4fcfcdcc7914f272bdad Mon Sep 17 00:00:00 2001 From: solid-yang Date: Thu, 25 Jan 2024 16:25:33 +0800 Subject: [PATCH] fix kill session --- storage/tianchi/ha_tse.cc | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/storage/tianchi/ha_tse.cc b/storage/tianchi/ha_tse.cc index c0b5332..52b1cab 100644 --- a/storage/tianchi/ha_tse.cc +++ b/storage/tianchi/ha_tse.cc @@ -1715,7 +1715,14 @@ static int tse_close_connect(handlerton *hton, THD *thd) { tch.is_broadcast = true; } - int ret = tse_close_session(&tch); + tianchi_handler_t local_tch; + memset(&local_tch, 0, sizeof(local_tch)); + local_tch.inst_id = tch.inst_id; + local_tch.sess_addr = tch.sess_addr; + local_tch.thd_id = tch.thd_id; + local_tch.is_broadcast = tch.is_broadcast; + + int ret = tse_close_session(&local_tch); release_sess_ctx(sess_ctx, hton, thd); return convert_tse_error_code_to_mysql((ct_errno_t)ret); } @@ -1734,7 +1741,13 @@ static void tse_kill_connection(handlerton *hton, THD *thd) { return; } - tse_kill_session(&tch); + tianchi_handler_t local_tch; + memset(&local_tch, 0, sizeof(local_tch)); + local_tch.inst_id = tch.inst_id; + local_tch.sess_addr = tch.sess_addr; + local_tch.thd_id = tch.thd_id; + + tse_kill_session(&local_tch); tse_log_system("[TSE_KILL_SESSION]:conn_id:%u, tse_instance_id:%u", tch.thd_id, tch.inst_id); } -- Gitee