diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2020-05-01 20:32:33 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2020-05-06 13:50:35 +0400 |
commit | 91734431bac4384c07beda60e0cb374c7720e5c6 (patch) | |
tree | 40227c456efcb0723b184127a0a06ac4f69efc3c /sql/wsrep_mysqld.cc | |
parent | 8ad3c6154b90314980faf1cdd4c317c9bbf5f84c (diff) | |
download | mariadb-git-91734431bac4384c07beda60e0cb374c7720e5c6.tar.gz |
Move all thread cache specific code to a new class
Part of
MDEV-18353 - Shutdown may miss to wait for connection thread
Diffstat (limited to 'sql/wsrep_mysqld.cc')
-rw-r--r-- | sql/wsrep_mysqld.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 7d54aab3ac0..327b7161633 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -46,6 +46,8 @@ #include <cstdlib> #include <string> #include "log_event.h" +#include "sql_connect.h" +#include "thread_cache.h" #include <sstream> @@ -64,8 +66,6 @@ const char *wsrep_SR_store_types[]= { "none", "table", NullS }; */ extern my_bool plugins_are_initialized; -extern uint kill_cached_threads; -extern mysql_cond_t COND_thread_cache; /* System variables. */ const char *wsrep_provider; @@ -2593,8 +2593,7 @@ static my_bool kill_remaining_threads(THD *thd, THD *caller_thd) void wsrep_close_client_connections(my_bool wait_to_end, THD* except_caller_thd) { /* Clear thread cache */ - kill_cached_threads++; - flush_thread_cache(); + thread_cache.final_flush(); /* First signal all threads that it's time to die |