Browse Source

MDEV-10291 : Fix race condition in bootstrap

main thread may destroy mutexes that bootstrap is using in
THD destructor.
pull/307/head
Vladislav Vaintroub 9 years ago
parent
commit
1b4f694adf
  1. 3
      sql/sql_parse.cc

3
sql/sql_parse.cc

@ -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);

Loading…
Cancel
Save