summaryrefslogtreecommitdiff
path: root/sql/rpl_parallel.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2016-04-28 13:39:05 +0300
committerMonty <monty@mariadb.org>2016-04-28 13:39:55 +0300
commit732adec0a4c75d99389230feeb0deca0ad668de7 (patch)
tree3d381e7dd430bf57cc4a2a5febc0640243ecfdfe /sql/rpl_parallel.cc
parentb4ff64568c88ab3ce559e7bd39853d9cbf86704a (diff)
downloadmariadb-git-732adec0a4c75d99389230feeb0deca0ad668de7.tar.gz
Removed some not needed when doing delete thd, which caused warnings about
wrong mutex usage from safe_mutex. Ensure that LOCK_status is always taken before LOCK_thread_count
Diffstat (limited to 'sql/rpl_parallel.cc')
-rw-r--r--sql/rpl_parallel.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc
index 697da6fa10e..f2437a6953b 100644
--- a/sql/rpl_parallel.cc
+++ b/sql/rpl_parallel.cc
@@ -1372,10 +1372,11 @@ handle_rpl_parallel_thread(void *arg)
thd->reset_db(NULL, 0);
thd_proc_info(thd, "Slave worker thread exiting");
thd->temporary_tables= 0;
+
mysql_mutex_lock(&LOCK_thread_count);
- THD_CHECK_SENTRY(thd);
- delete thd;
+ thd->unlink();
mysql_mutex_unlock(&LOCK_thread_count);
+ delete thd;
mysql_mutex_lock(&rpt->LOCK_rpl_thread);
rpt->running= false;