diff options
author | Monty <monty@mariadb.org> | 2016-02-07 15:23:08 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2016-02-07 15:23:08 +0200 |
commit | 1ab711bebbd961b8882acf0ac0fbdd1971d54597 (patch) | |
tree | 760c51fbe3b5b43eca2bc082307c7aac22e7e7e3 | |
parent | 70a4856df8c2af14e2d0a32b8d49bbd2bd2fc464 (diff) | |
download | mariadb-git-1ab711bebbd961b8882acf0ac0fbdd1971d54597.tar.gz |
Corrected freeing of thd when running with wsrep and thread pool
This is needed because of the new code where THD creation was moved to the new thread
-rw-r--r-- | sql/wsrep_mysqld.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 0c527bf3708..9af63e70761 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -1847,14 +1847,15 @@ pthread_handler_t start_wsrep_THD(void *arg) // at server shutdown } - my_thread_end(); if (thread_handling > SCHEDULER_ONE_THREAD_PER_CONNECTION) { mysql_mutex_lock(&LOCK_thread_count); - delete thd; - thread_count--; + thd->unlink(); mysql_mutex_unlock(&LOCK_thread_count); + delete thd; + dec_thread_count(); } + my_thread_end(); return(NULL); error: |