diff options
Diffstat (limited to 'plugin/feedback')
-rw-r--r-- | plugin/feedback/sender_thread.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/plugin/feedback/sender_thread.cc b/plugin/feedback/sender_thread.cc index b025879b6ee..6ed5ed10cb2 100644 --- a/plugin/feedback/sender_thread.cc +++ b/plugin/feedback/sender_thread.cc @@ -90,9 +90,7 @@ static int prepare_for_fill(TABLE_LIST *tables) in SHOW STATUS and we want to avoid skewing the statistics) */ thd->variables.pseudo_thread_id= thd->thread_id; - mysql_mutex_lock(&LOCK_thread_count); - threads.append(thd); - mysql_mutex_unlock(&LOCK_thread_count); + server_threads.insert(thd); thd->thread_stack= (char*) &tables; if (thd->store_globals()) return 1; @@ -139,7 +137,7 @@ static int prepare_for_fill(TABLE_LIST *tables) */ static bool going_down() { - return shutdown_plugin || shutdown_in_progress || (thd && thd->killed); + return shutdown_plugin || abort_loop || (thd && thd->killed); } /** @@ -258,12 +256,9 @@ ret: reset all thread local status variables to minimize the effect of the background thread on SHOW STATUS. */ - mysql_mutex_lock(&LOCK_thread_count); + server_threads.erase(thd); thd->set_status_var_init(); thd->killed= KILL_CONNECTION; - thd->unlink(); - mysql_cond_broadcast(&COND_thread_count); - mysql_mutex_unlock(&LOCK_thread_count); delete thd; thd= 0; } |