diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-05-09 18:30:22 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-06-04 09:06:00 +0200 |
commit | 7425610c81ca1329d72a97f57770e5b052d08079 (patch) | |
tree | 90cdc365063e84b02cd5ea73f1928e2229efffe2 /sql/scheduler.cc | |
parent | 74aef87c5ed3f5f02b6d1b8852e7e597c735cd24 (diff) | |
download | mariadb-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/scheduler.cc')
-rw-r--r-- | sql/scheduler.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/scheduler.cc b/sql/scheduler.cc index de472ae2504..95702dbb4e1 100644 --- a/sql/scheduler.cc +++ b/sql/scheduler.cc @@ -39,6 +39,7 @@ static bool no_threads_end(THD *thd, bool put_in_cache) { unlink_thd(thd); delete thd; + dec_thread_count(); } return 1; // Abort handle_one_connection } |