SET @global_thread_cache_size = @@GLOBAL.thread_cache_size;
'# Test1#'
SET @@GLOBAL.thread_cache_size=3;
FLUSH THREADS;
select variable_value<=@@global.thread_cache_size from information_schema.global_status where variable_name="Threads_cached";
variable_value<=@@global.thread_cache_size
1
CONNECT  conn1,localhost,root,,;
CONNECT  conn2,localhost,root,,;
CONNECT  conn3,localhost,root,,;
CONNECT  conn4,localhost,root,,;
connection default;
select variable_value<=@@global.thread_cache_size from information_schema.global_status where variable_name="Threads_cached";
variable_value<=@@global.thread_cache_size
1
disconnect conn1;
disconnect conn2;
disconnect conn3;
disconnect conn4;
SET @@GLOBAL.thread_cache_size= 1;
FLUSH THREADS;
CONNECT  conn1,localhost,root,,;
CONNECT  conn2,localhost,root,,;
connection default;
disconnect conn1;
disconnect conn2;
SET @@GLOBAL.thread_cache_size = @global_thread_cache_size;
