1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-10291 : Fix race condition in bootstrap

main thread may destroy mutexes that bootstrap is using in
THD destructor.
This commit is contained in:
Vladislav Vaintroub
2017-02-10 14:17:19 +00:00
parent 6f42c3c5a4
commit 1b4f694adf

View File

@ -1085,9 +1085,10 @@ void do_handle_bootstrap(THD *thd)
handle_bootstrap_impl(thd);
end:
in_bootstrap= FALSE;
delete thd;
mysql_mutex_lock(&LOCK_thread_count);
in_bootstrap = FALSE;
mysql_cond_broadcast(&COND_thread_count);
mysql_mutex_unlock(&LOCK_thread_count);