mirror of
https://github.com/MariaDB/server.git
synced 2025-08-30 11:22:14 +03:00
cleanup: thread_count
move thread_count handling into THD: * increment thread_count in THD constructor * decrement thread_count in THD destructor * never modify thread_count directly!
This commit is contained in:
@@ -1076,16 +1076,11 @@ void do_handle_bootstrap(THD *thd)
|
||||
handle_bootstrap_impl(thd);
|
||||
|
||||
end:
|
||||
in_bootstrap= FALSE;
|
||||
delete thd;
|
||||
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
DBUG_ASSERT(thread_count == 1);
|
||||
in_bootstrap= FALSE;
|
||||
/*
|
||||
dec_thread_count will signal bootstrap() function that we have ended as
|
||||
thread_count will become 0.
|
||||
*/
|
||||
dec_thread_count();
|
||||
DBUG_ASSERT(thread_count == 0);
|
||||
my_thread_end();
|
||||
pthread_exit(0);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user