From 562c1df7d97cb23145e09b3482fd18d49476752d Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 14 May 2016 13:22:47 +0200 Subject: 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! --- plugin/feedback/sender_thread.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'plugin/feedback/sender_thread.cc') diff --git a/plugin/feedback/sender_thread.cc b/plugin/feedback/sender_thread.cc index 1b90d2cb340..16cdfe5574a 100644 --- a/plugin/feedback/sender_thread.cc +++ b/plugin/feedback/sender_thread.cc @@ -91,7 +91,6 @@ static int prepare_for_fill(TABLE_LIST *tables) */ thd->variables.pseudo_thread_id= thd->thread_id; mysql_mutex_lock(&LOCK_thread_count); - thread_count++; threads.append(thd); mysql_mutex_unlock(&LOCK_thread_count); thd->thread_stack= (char*) &tables; @@ -263,7 +262,6 @@ ret: */ mysql_mutex_lock(&LOCK_thread_count); thd->set_status_var_init(); - thread_count--; thd->killed= KILL_CONNECTION; thd->unlink(); mysql_cond_broadcast(&COND_thread_count); -- cgit v1.2.1