1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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
This commit is contained in:
Sergei Golubchik
2016-05-09 18:30:22 +02:00
parent 74aef87c5e
commit 7425610c81
3 changed files with 4 additions and 2 deletions

View File

@ -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: