summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-02-05 14:59:27 +0100
committerSergei Golubchik <serg@mariadb.org>2021-02-12 18:14:20 +0100
commit9703cffa8cb57e2fe29719f4aae3282bfae82878 (patch)
tree9e9d6a7dcf0f7ceff47091b47465a06613fc2dcb /sql/slave.cc
parent259a1902a066d01547e5d70ba0e4837d1be62e7b (diff)
downloadmariadb-git-9703cffa8cb57e2fe29719f4aae3282bfae82878.tar.gz
don't take mutexes conditionally
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index 40c09604745..372e46acd1d 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -1069,11 +1069,7 @@ terminate_slave_thread(THD *thd,
int error __attribute__((unused));
DBUG_PRINT("loop", ("killing slave thread"));
-#ifdef WITH_WSREP
- /* awake_no_mutex() requires LOCK_thd_data to be locked if wsrep
- is enabled */
- if (WSREP(thd)) mysql_mutex_lock(&thd->LOCK_thd_data);
-#endif /* WITH_WSREP */
+ mysql_mutex_lock(&thd->LOCK_thd_data);
mysql_mutex_lock(&thd->LOCK_thd_kill);
#ifndef DONT_USE_THR_ALARM
/*
@@ -1087,9 +1083,7 @@ terminate_slave_thread(THD *thd,
thd->awake_no_mutex(NOT_KILLED);
mysql_mutex_unlock(&thd->LOCK_thd_kill);
-#ifdef WITH_WSREP
- if (WSREP(thd)) mysql_mutex_unlock(&thd->LOCK_thd_data);
-#endif /* WITH_WSREP */
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
/*
There is a small chance that slave thread might miss the first