don't take mutexes conditionally

This commit is contained in:
Sergei Golubchik 2021-02-05 14:59:27 +01:00
commit 9703cffa8c
8 changed files with 16 additions and 40 deletions

View file

@ -1521,11 +1521,9 @@ static void end_ssl();
/* common callee of two shutdown phases */
static void kill_thread(THD *thd)
{
if (WSREP(thd)) mysql_mutex_lock(&thd->LOCK_thd_data);
mysql_mutex_lock(&thd->LOCK_thd_kill);
thd->abort_current_cond_wait(true);
mysql_mutex_unlock(&thd->LOCK_thd_kill);
if (WSREP(thd)) mysql_mutex_unlock(&thd->LOCK_thd_data);
}