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/sql_test.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/sql_test.cc')
-rw-r--r-- | sql/sql_test.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_test.cc b/sql/sql_test.cc index e353c2a6b46..f19d27df71f 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -27,6 +27,8 @@ #include "my_json_writer.h" #include <hash.h> #include <thr_alarm.h> +#include "sql_connect.h" +#include "thread_cache.h" #if defined(HAVE_MALLINFO) && defined(HAVE_MALLOC_H) #include <malloc.h> #elif defined(HAVE_MALLINFO) && defined(HAVE_SYS_MALLOC_H) @@ -568,7 +570,7 @@ void mysql_print_status() (void) my_getwd(current_dir, sizeof(current_dir),MYF(0)); printf("Current dir: %s\n", current_dir); printf("Running threads: %d Cached threads: %lu Stack size: %ld\n", - count, cached_thread_count, + count, thread_cache.size(), (long) my_thread_stack_size); #ifdef EXTRA_DEBUG thr_print_locks(); // Write some debug info @@ -641,7 +643,8 @@ Memory allocated by threads: %s\n", llstr(info.uordblks, llbuff[4]), llstr(info.fordblks, llbuff[5]), llstr(info.keepcost, llbuff[6]), - llstr((count + cached_thread_count)* my_thread_stack_size + info.hblkhd + info.arena, llbuff[7]), + llstr((count + thread_cache.size()) * my_thread_stack_size + + info.hblkhd + info.arena, llbuff[7]), llstr(tmp.global_memory_used, llbuff[8]), llstr(tmp.local_memory_used, llbuff[9])); |