summaryrefslogtreecommitdiff
path: root/sql/threadpool_common.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-05-09 18:30:22 +0200
committerSergei Golubchik <serg@mariadb.org>2016-06-04 09:06:00 +0200
commit7425610c81ca1329d72a97f57770e5b052d08079 (patch)
tree90cdc365063e84b02cd5ea73f1928e2229efffe2 /sql/threadpool_common.cc
parent74aef87c5ed3f5f02b6d1b8852e7e597c735cd24 (diff)
downloadmariadb-git-7425610c81ca1329d72a97f57770e5b052d08079.tar.gz
decrement thead_count *after* THD is destroyed
because thread_count means just that: number of THDs and shutdown code looks at it to know when to free shared data structures that THD uses. This fixes random crashes in ~THD on shutdown
Diffstat (limited to 'sql/threadpool_common.cc')
-rw-r--r--sql/threadpool_common.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/threadpool_common.cc b/sql/threadpool_common.cc
index 520a16c467e..9de168c9fdf 100644
--- a/sql/threadpool_common.cc
+++ b/sql/threadpool_common.cc
@@ -201,7 +201,7 @@ void threadpool_remove_connection(THD *thd)
close_connection(thd, 0);
unlink_thd(thd);
delete thd;
- mysql_cond_broadcast(&COND_thread_count);
+ dec_thread_count();
/*
Free resources associated with this connection: