From 81d71ee6b21870772c336bff15b71904914f146a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Tue, 5 Feb 2019 15:41:53 +0200 Subject: MDEV-12009: Allow to force kill user threads/query which are flagged as high priority by Galera As noted on kill_one_thread SUPER should be able to kill even system threads i.e. threads/query flagged as high priority or wsrep applier thread. Normal user, should not able to kill threads/query flagged as high priority (BF) or wsrep applier thread. --- sql/wsrep_thd.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sql/wsrep_thd.cc') diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc index 551e710cfeb..91f0e1e8d8a 100644 --- a/sql/wsrep_thd.cc +++ b/sql/wsrep_thd.cc @@ -596,6 +596,15 @@ my_bool wsrep_thd_is_BF(THD *thd, my_bool sync) return status; } +my_bool wsrep_thd_is_applier(THD *thd) +{ + my_bool ret = FALSE; + if (thd) { + ret = thd->wsrep_applier; + } + return ret; +} + extern "C" my_bool wsrep_thd_is_BF_or_commit(void *thd_ptr, my_bool sync) { -- cgit v1.2.1