mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +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:
@ -1077,6 +1077,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
|
||||
save_prep_leaf_list= FALSE;
|
||||
/* Restore THR_THD */
|
||||
set_current_thd(old_THR_THD);
|
||||
inc_thread_count();
|
||||
}
|
||||
|
||||
|
||||
@ -1766,6 +1767,7 @@ THD::~THD()
|
||||
}
|
||||
update_global_memory_status(status_var.global_memory_used);
|
||||
set_current_thd(orig_thd == this ? 0 : orig_thd);
|
||||
dec_thread_count();
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user