summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/mysqld--help.inc4
-rwxr-xr-xmysql-test/mysql-test-run.pl4
-rw-r--r--mysql-test/r/kill.result4
-rw-r--r--mysql-test/r/mysqld--help-notwin.result8
-rw-r--r--mysql-test/r/mysqld--help-win.result8
-rw-r--r--mysql-test/r/pool_of_threads.result10
-rw-r--r--mysql-test/suite/sys_vars/r/thread_pool_idle_timeout_basic.result47
-rw-r--r--mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result47
-rw-r--r--mysql-test/suite/sys_vars/r/thread_pool_oversubscribe_basic.result47
-rw-r--r--mysql-test/suite/sys_vars/r/thread_pool_size_basic.result41
-rw-r--r--mysql-test/suite/sys_vars/r/thread_pool_stall_limit_basic.result47
-rw-r--r--mysql-test/suite/sys_vars/t/slow_launch_time_func.test5
-rw-r--r--mysql-test/suite/sys_vars/t/thread_cache_size_func.test3
-rw-r--r--mysql-test/suite/sys_vars/t/thread_pool_idle_timeout_basic.test43
-rw-r--r--mysql-test/suite/sys_vars/t/thread_pool_max_threads_basic.test42
-rw-r--r--mysql-test/suite/sys_vars/t/thread_pool_oversubscribe_basic.test43
-rw-r--r--mysql-test/suite/sys_vars/t/thread_pool_size_basic.test47
-rw-r--r--mysql-test/suite/sys_vars/t/thread_pool_stall_limit_basic.test43
-rw-r--r--mysql-test/t/flush_read_lock_kill.test2
-rw-r--r--mysql-test/t/kill.test5
-rw-r--r--mysql-test/t/pool_of_threads.cnf5
-rw-r--r--mysql-test/t/pool_of_threads.test9
-rw-r--r--mysql-test/t/wait_timeout.test2
-rw-r--r--mysql-test/t/xa.test1
24 files changed, 479 insertions, 38 deletions
diff --git a/mysql-test/include/mysqld--help.inc b/mysql-test/include/mysqld--help.inc
index 107f80ba125..a037f255a3e 100644
--- a/mysql-test/include/mysqld--help.inc
+++ b/mysql-test/include/mysqld--help.inc
@@ -18,11 +18,11 @@ perl;
# their paths may vary:
@skipvars=qw/basedir open-files-limit general-log-file log plugin-dir
log-slow-queries pid-file slow-query-log-file log-basename
- datadir slave-load-tmpdir tmpdir socket/;
+ datadir slave-load-tmpdir tmpdir socket /;
# Plugins which may or may not be there:
@plugins=qw/innodb ndb archive blackhole federated partition ndbcluster feedback debug temp-pool ssl des-key-file
- xtradb thread-concurrency super-large-pages mutex-deadlock-detector null-audit maria aria pbxt oqgraph sphinx/;
+ xtradb thread-concurrency super-large-pages mutex-deadlock-detector null-audit maria aria pbxt oqgraph sphinx thread-handling thread-pool/;
# And substitute the content some environment variables with their
# names:
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 2ec52f952ab..f180f1a70cf 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -3466,7 +3466,9 @@ sub mysql_install_db {
mtr_add_arg($args, "--loose-skip-ndbcluster");
mtr_add_arg($args, "--loose-skip-aria");
mtr_add_arg($args, "--disable-sync-frm");
- mtr_add_arg($args, "--tmpdir=%s", "$opt_vardir/tmp/");
+ mtr_add_arg($args, "--tmpdir=.");
+ mtr_add_arg($args, "--max_allowed_packet=8M");
+ mtr_add_arg($args, "--net_buffer_length=16K");
mtr_add_arg($args, "--core-file");
if ( $opt_debug )
diff --git a/mysql-test/r/kill.result b/mysql-test/r/kill.result
index e91db0c9036..0cc8caf8f42 100644
--- a/mysql-test/r/kill.result
+++ b/mysql-test/r/kill.result
@@ -60,9 +60,7 @@ SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
KILL @id;
SET DEBUG_SYNC= 'now WAIT_FOR con1_end';
Got one of the listed errors
-SELECT 1;
-1
-1
+Got one of the listed errors
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1, t2;
SET DEBUG_SYNC= 'before_acos_function SIGNAL in_sync WAIT_FOR kill';
diff --git a/mysql-test/r/mysqld--help-notwin.result b/mysql-test/r/mysqld--help-notwin.result
index 5531a1d8a18..e1e484d4dd8 100644
--- a/mysql-test/r/mysqld--help-notwin.result
+++ b/mysql-test/r/mysqld--help-notwin.result
@@ -794,9 +794,6 @@ The following options may be given as the first argument:
values are COMMIT or ROLLBACK.
--thread-cache-size=#
How many threads we should keep in a cache for reuse
- --thread-handling=name
- Define threads usage for handling queries, one of
- one-thread-per-connection, no-threads
--thread-stack=# The stack size for each thread
--time-format=name The TIME format (ignored)
--timed-mutexes Specify whether to time mutexes (only InnoDB mutexes are
@@ -935,7 +932,7 @@ lower-case-table-names 1
master-info-file master.info
master-retry-count 86400
master-verify-checksum FALSE
-max-allowed-packet 1048576
+max-allowed-packet 8388608
max-binlog-cache-size 18446744073709547520
max-binlog-size 1073741824
max-binlog-stmt-cache-size 18446744073709547520
@@ -946,7 +943,7 @@ max-error-count 64
max-heap-table-size 16777216
max-join-size 18446744073709551615
max-length-for-sort-data 1024
-max-long-data-size 1048576
+max-long-data-size 8388608
max-prepared-stmt-count 16382
max-relay-log-size 0
max-seeks-for-key 18446744073709551615
@@ -1062,7 +1059,6 @@ table-definition-cache 400
table-open-cache 400
tc-heuristic-recover COMMIT
thread-cache-size 0
-thread-handling one-thread-per-connection
thread-stack 294912
time-format %H:%i:%s
timed-mutexes FALSE
diff --git a/mysql-test/r/mysqld--help-win.result b/mysql-test/r/mysqld--help-win.result
index dbc42fdc4ba..4d5e8ef5f16 100644
--- a/mysql-test/r/mysqld--help-win.result
+++ b/mysql-test/r/mysqld--help-win.result
@@ -798,9 +798,6 @@ The following options may be given as the first argument:
values are COMMIT or ROLLBACK.
--thread-cache-size=#
How many threads we should keep in a cache for reuse
- --thread-handling=name
- Define threads usage for handling queries, one of
- one-thread-per-connection, no-threads
--thread-stack=# The stack size for each thread
--time-format=name The TIME format (ignored)
--timed-mutexes Specify whether to time mutexes (only InnoDB mutexes are
@@ -938,7 +935,7 @@ lower-case-table-names 1
master-info-file master.info
master-retry-count 86400
master-verify-checksum FALSE
-max-allowed-packet 1048576
+max-allowed-packet 8388608
max-binlog-cache-size 18446744073709547520
max-binlog-size 1073741824
max-binlog-stmt-cache-size 18446744073709547520
@@ -949,7 +946,7 @@ max-error-count 64
max-heap-table-size 16777216
max-join-size 18446744073709551615
max-length-for-sort-data 1024
-max-long-data-size 1048576
+max-long-data-size 8388608
max-prepared-stmt-count 16382
max-relay-log-size 0
max-seeks-for-key 18446744073709551615
@@ -1068,7 +1065,6 @@ table-definition-cache 400
table-open-cache 400
tc-heuristic-recover COMMIT
thread-cache-size 0
-thread-handling one-thread-per-connection
thread-stack 294912
time-format %H:%i:%s
timed-mutexes FALSE
diff --git a/mysql-test/r/pool_of_threads.result b/mysql-test/r/pool_of_threads.result
index 74ea7ba12eb..64168b0eb3c 100644
--- a/mysql-test/r/pool_of_threads.result
+++ b/mysql-test/r/pool_of_threads.result
@@ -2084,10 +2084,10 @@ fld6 char(4) latin1_swedish_ci NO #
show full columns from t2 from test like 's%';
Field Type Collation Null Key Default Extra Privileges Comment
show keys from t2;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE
-t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE
-t2 1 fld3 1 fld3 A NULL NULL NULL BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE
+t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE
+t2 1 fld3 1 fld3 A NULL NULL NULL BTREE
drop table t4, t3, t2, t1;
CREATE TABLE t1 (
cont_nr int(11) NOT NULL auto_increment,
@@ -2153,7 +2153,7 @@ Warning 1052 Column 'kundentyp' in group statement is ambiguous
drop table t1;
SELECT sleep(5);
SELECT sleep(5);
-# -- Success: more than --thread-pool-size normal connections not possible
+# -- Success: more than --thread_pool_max_threads normal connections not possible
sleep(5)
0
sleep(5)
diff --git a/mysql-test/suite/sys_vars/r/thread_pool_idle_timeout_basic.result b/mysql-test/suite/sys_vars/r/thread_pool_idle_timeout_basic.result
new file mode 100644
index 00000000000..8dedbd0f2d2
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/thread_pool_idle_timeout_basic.result
@@ -0,0 +1,47 @@
+SET @start_global_value = @@global.thread_pool_idle_timeout;
+select @@global.thread_pool_idle_timeout;
+@@global.thread_pool_idle_timeout
+60
+select @@session.thread_pool_idle_timeout;
+ERROR HY000: Variable 'thread_pool_idle_timeout' is a GLOBAL variable
+show global variables like 'thread_pool_idle_timeout';
+Variable_name Value
+thread_pool_idle_timeout 60
+show session variables like 'thread_pool_idle_timeout';
+Variable_name Value
+thread_pool_idle_timeout 60
+select * from information_schema.global_variables where variable_name='thread_pool_idle_timeout';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_POOL_IDLE_TIMEOUT 60
+select * from information_schema.session_variables where variable_name='thread_pool_idle_timeout';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_POOL_IDLE_TIMEOUT 60
+set global thread_pool_idle_timeout=60;
+select @@global.thread_pool_idle_timeout;
+@@global.thread_pool_idle_timeout
+60
+set global thread_pool_idle_timeout=4294967295;
+select @@global.thread_pool_idle_timeout;
+@@global.thread_pool_idle_timeout
+4294967295
+set session thread_pool_idle_timeout=1;
+ERROR HY000: Variable 'thread_pool_idle_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+set global thread_pool_idle_timeout=1.1;
+ERROR 42000: Incorrect argument type to variable 'thread_pool_idle_timeout'
+set global thread_pool_idle_timeout=1e1;
+ERROR 42000: Incorrect argument type to variable 'thread_pool_idle_timeout'
+set global thread_pool_idle_timeout="foo";
+ERROR 42000: Incorrect argument type to variable 'thread_pool_idle_timeout'
+set global thread_pool_idle_timeout=-1;
+Warnings:
+Warning 1292 Truncated incorrect thread_pool_idle_timeout value: '-1'
+select @@global.thread_pool_idle_timeout;
+@@global.thread_pool_idle_timeout
+1
+set global thread_pool_idle_timeout=10000000000;
+Warnings:
+Warning 1292 Truncated incorrect thread_pool_idle_timeout value: '10000000000'
+select @@global.thread_pool_idle_timeout;
+@@global.thread_pool_idle_timeout
+4294967295
+SET @@global.thread_pool_idle_timeout = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result b/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result
new file mode 100644
index 00000000000..4a748ca7629
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result
@@ -0,0 +1,47 @@
+SET @start_global_value = @@global.thread_pool_max_threads;
+select @@global.thread_pool_max_threads;
+@@global.thread_pool_max_threads
+500
+select @@session.thread_pool_max_threads;
+ERROR HY000: Variable 'thread_pool_max_threads' is a GLOBAL variable
+show global variables like 'thread_pool_max_threads';
+Variable_name Value
+thread_pool_max_threads 500
+show session variables like 'thread_pool_max_threads';
+Variable_name Value
+thread_pool_max_threads 500
+select * from information_schema.global_variables where variable_name='thread_pool_max_threads';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_POOL_MAX_THREADS 500
+select * from information_schema.session_variables where variable_name='thread_pool_max_threads';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_POOL_MAX_THREADS 500
+set global thread_pool_max_threads=1;
+select @@global.thread_pool_max_threads;
+@@global.thread_pool_max_threads
+1
+set global thread_pool_max_threads=65536;
+select @@global.thread_pool_max_threads;
+@@global.thread_pool_max_threads
+65536
+set session thread_pool_max_threads=1;
+ERROR HY000: Variable 'thread_pool_max_threads' is a GLOBAL variable and should be set with SET GLOBAL
+set global thread_pool_max_threads=1.1;
+ERROR 42000: Incorrect argument type to variable 'thread_pool_max_threads'
+set global thread_pool_max_threads=1e1;
+ERROR 42000: Incorrect argument type to variable 'thread_pool_max_threads'
+set global thread_pool_max_threads="foo";
+ERROR 42000: Incorrect argument type to variable 'thread_pool_max_threads'
+set global thread_pool_max_threads=0;
+Warnings:
+Warning 1292 Truncated incorrect thread_pool_max_threads value: '0'
+select @@global.thread_pool_max_threads;
+@@global.thread_pool_max_threads
+1
+set global thread_pool_max_threads=10000000000;
+Warnings:
+Warning 1292 Truncated incorrect thread_pool_max_threads value: '10000000000'
+select @@global.thread_pool_max_threads;
+@@global.thread_pool_max_threads
+65536
+SET @@global.thread_pool_max_threads = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/thread_pool_oversubscribe_basic.result b/mysql-test/suite/sys_vars/r/thread_pool_oversubscribe_basic.result
new file mode 100644
index 00000000000..a9f1afa9f62
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/thread_pool_oversubscribe_basic.result
@@ -0,0 +1,47 @@
+SET @start_global_value = @@global.thread_pool_oversubscribe;
+select @@global.thread_pool_oversubscribe;
+@@global.thread_pool_oversubscribe
+3
+select @@session.thread_pool_oversubscribe;
+ERROR HY000: Variable 'thread_pool_oversubscribe' is a GLOBAL variable
+show global variables like 'thread_pool_oversubscribe';
+Variable_name Value
+thread_pool_oversubscribe 3
+show session variables like 'thread_pool_oversubscribe';
+Variable_name Value
+thread_pool_oversubscribe 3
+select * from information_schema.global_variables where variable_name='thread_pool_oversubscribe';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_POOL_OVERSUBSCRIBE 3
+select * from information_schema.session_variables where variable_name='thread_pool_oversubscribe';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_POOL_OVERSUBSCRIBE 3
+set global thread_pool_oversubscribe=60;
+select @@global.thread_pool_oversubscribe;
+@@global.thread_pool_oversubscribe
+60
+set global thread_pool_oversubscribe=1000;
+select @@global.thread_pool_oversubscribe;
+@@global.thread_pool_oversubscribe
+1000
+set session thread_pool_oversubscribe=1;
+ERROR HY000: Variable 'thread_pool_oversubscribe' is a GLOBAL variable and should be set with SET GLOBAL
+set global thread_pool_oversubscribe=1.1;
+ERROR 42000: Incorrect argument type to variable 'thread_pool_oversubscribe'
+set global thread_pool_oversubscribe=1e1;
+ERROR 42000: Incorrect argument type to variable 'thread_pool_oversubscribe'
+set global thread_pool_oversubscribe="foo";
+ERROR 42000: Incorrect argument type to variable 'thread_pool_oversubscribe'
+set global thread_pool_oversubscribe=-1;
+Warnings:
+Warning 1292 Truncated incorrect thread_pool_oversubscribe value: '-1'
+select @@global.thread_pool_oversubscribe;
+@@global.thread_pool_oversubscribe
+1
+set global thread_pool_oversubscribe=10000000000;
+Warnings:
+Warning 1292 Truncated incorrect thread_pool_oversubscribe value: '10000000000'
+select @@global.thread_pool_oversubscribe;
+@@global.thread_pool_oversubscribe
+1000
+set @@global.thread_pool_oversubscribe = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/thread_pool_size_basic.result b/mysql-test/suite/sys_vars/r/thread_pool_size_basic.result
new file mode 100644
index 00000000000..70d46cbe067
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/thread_pool_size_basic.result
@@ -0,0 +1,41 @@
+SET @start_global_value = @@global.thread_pool_size;
+select @@global.thread_pool_size;
+@@global.thread_pool_size
+#
+select @@session.thread_pool_size;
+ERROR HY000: Variable 'thread_pool_size' is a GLOBAL variable
+show global variables like 'thread_pool_size';
+Variable_name Value
+thread_pool_size #
+show session variables like 'thread_pool_size';
+Variable_name Value
+thread_pool_size #
+select * from information_schema.global_variables where variable_name='thread_pool_size';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_POOL_SIZE #
+select * from information_schema.session_variables where variable_name='thread_pool_size';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_POOL_SIZE #
+set global thread_pool_size=1;
+select @@global.thread_pool_size;
+@@global.thread_pool_size
+1
+set global thread_pool_size=128;
+select @@global.thread_pool_size;
+@@global.thread_pool_size
+128
+set session thread_pool_size=1;
+ERROR HY000: Variable 'thread_pool_size' is a GLOBAL variable and should be set with SET GLOBAL
+set global thread_pool_size=1.1;
+ERROR 42000: Incorrect argument type to variable 'thread_pool_size'
+set global thread_pool_size=1e1;
+ERROR 42000: Incorrect argument type to variable 'thread_pool_size'
+set global thread_pool_size="foo";
+ERROR 42000: Incorrect argument type to variable 'thread_pool_size'
+set global thread_pool_size=-1;
+Warnings:
+Warning 1292 Truncated incorrect thread_pool_size value: '-1'
+set global thread_pool_size=100000;
+Warnings:
+Warning 1292 Truncated incorrect thread_pool_size value: '100000'
+SET @@global.thread_pool_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/thread_pool_stall_limit_basic.result b/mysql-test/suite/sys_vars/r/thread_pool_stall_limit_basic.result
new file mode 100644
index 00000000000..eda4e6baebe
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/thread_pool_stall_limit_basic.result
@@ -0,0 +1,47 @@
+SET @start_global_value = @@global.thread_pool_stall_limit;
+select @@global.thread_pool_stall_limit;
+@@global.thread_pool_stall_limit
+500
+select @@session.thread_pool_stall_limit;
+ERROR HY000: Variable 'thread_pool_stall_limit' is a GLOBAL variable
+show global variables like 'thread_pool_stall_limit';
+Variable_name Value
+thread_pool_stall_limit 500
+show session variables like 'thread_pool_stall_limit';
+Variable_name Value
+thread_pool_stall_limit 500
+select * from information_schema.global_variables where variable_name='thread_pool_stall_limit';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_POOL_STALL_LIMIT 500
+select * from information_schema.session_variables where variable_name='thread_pool_stall_limit';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_POOL_STALL_LIMIT 500
+set global thread_pool_stall_limit=60;
+select @@global.thread_pool_stall_limit;
+@@global.thread_pool_stall_limit
+60
+set global thread_pool_stall_limit=4294967295;
+select @@global.thread_pool_stall_limit;
+@@global.thread_pool_stall_limit
+4294967295
+set session thread_pool_stall_limit=1;
+ERROR HY000: Variable 'thread_pool_stall_limit' is a GLOBAL variable and should be set with SET GLOBAL
+set global thread_pool_stall_limit=1.1;
+ERROR 42000: Incorrect argument type to variable 'thread_pool_stall_limit'
+set global thread_pool_stall_limit=1e1;
+ERROR 42000: Incorrect argument type to variable 'thread_pool_stall_limit'
+set global thread_pool_stall_limit="foo";
+ERROR 42000: Incorrect argument type to variable 'thread_pool_stall_limit'
+set global thread_pool_stall_limit=-1;
+Warnings:
+Warning 1292 Truncated incorrect thread_pool_stall_limit value: '-1'
+select @@global.thread_pool_stall_limit;
+@@global.thread_pool_stall_limit
+10
+set global thread_pool_stall_limit=10000000000;
+Warnings:
+Warning 1292 Truncated incorrect thread_pool_stall_limit value: '10000000000'
+select @@global.thread_pool_stall_limit;
+@@global.thread_pool_stall_limit
+4294967295
+set @@global.thread_pool_stall_limit = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/slow_launch_time_func.test b/mysql-test/suite/sys_vars/t/slow_launch_time_func.test
index c9fc357b10f..4a4951535ac 100644
--- a/mysql-test/suite/sys_vars/t/slow_launch_time_func.test
+++ b/mysql-test/suite/sys_vars/t/slow_launch_time_func.test
@@ -29,10 +29,7 @@
#
# Setup
#
-
---source include/not_embedded.inc
---source include/not_threadpool.inc
-
+--source include/one_thread_per_connection.inc
SET @global_slow_launch_time = @@GLOBAL.slow_launch_time;
--echo ** Connection default **
diff --git a/mysql-test/suite/sys_vars/t/thread_cache_size_func.test b/mysql-test/suite/sys_vars/t/thread_cache_size_func.test
index 9bffa32ca2b..7382fd671a9 100644
--- a/mysql-test/suite/sys_vars/t/thread_cache_size_func.test
+++ b/mysql-test/suite/sys_vars/t/thread_cache_size_func.test
@@ -27,9 +27,8 @@
# Setup
#
---source include/not_embedded.inc
---source include/not_threadpool.inc
+--source include/one_thread_per_connection.inc
SET @global_thread_cache_size = @@GLOBAL.thread_cache_size;
FLUSH STATUS;
diff --git a/mysql-test/suite/sys_vars/t/thread_pool_idle_timeout_basic.test b/mysql-test/suite/sys_vars/t/thread_pool_idle_timeout_basic.test
new file mode 100644
index 00000000000..4afcc0379f0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/thread_pool_idle_timeout_basic.test
@@ -0,0 +1,43 @@
+# uint global
+--source include/not_windows.inc
+--source include/not_embedded.inc
+SET @start_global_value = @@global.thread_pool_idle_timeout;
+
+#
+# exists as global only
+#
+select @@global.thread_pool_idle_timeout;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.thread_pool_idle_timeout;
+show global variables like 'thread_pool_idle_timeout';
+show session variables like 'thread_pool_idle_timeout';
+select * from information_schema.global_variables where variable_name='thread_pool_idle_timeout';
+select * from information_schema.session_variables where variable_name='thread_pool_idle_timeout';
+
+#
+# show that it's writable
+#
+set global thread_pool_idle_timeout=60;
+select @@global.thread_pool_idle_timeout;
+set global thread_pool_idle_timeout=4294967295;
+select @@global.thread_pool_idle_timeout;
+--error ER_GLOBAL_VARIABLE
+set session thread_pool_idle_timeout=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_pool_idle_timeout=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_pool_idle_timeout=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_pool_idle_timeout="foo";
+
+
+set global thread_pool_idle_timeout=-1;
+select @@global.thread_pool_idle_timeout;
+set global thread_pool_idle_timeout=10000000000;
+select @@global.thread_pool_idle_timeout;
+
+SET @@global.thread_pool_idle_timeout = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/thread_pool_max_threads_basic.test b/mysql-test/suite/sys_vars/t/thread_pool_max_threads_basic.test
new file mode 100644
index 00000000000..3d5cd5f5198
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/thread_pool_max_threads_basic.test
@@ -0,0 +1,42 @@
+# uint global
+--source include/not_embedded.inc
+SET @start_global_value = @@global.thread_pool_max_threads;
+
+#
+# exists as global only
+#
+select @@global.thread_pool_max_threads;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.thread_pool_max_threads;
+show global variables like 'thread_pool_max_threads';
+show session variables like 'thread_pool_max_threads';
+select * from information_schema.global_variables where variable_name='thread_pool_max_threads';
+select * from information_schema.session_variables where variable_name='thread_pool_max_threads';
+
+#
+# show that it's writable
+#
+set global thread_pool_max_threads=1;
+select @@global.thread_pool_max_threads;
+set global thread_pool_max_threads=65536;
+select @@global.thread_pool_max_threads;
+--error ER_GLOBAL_VARIABLE
+set session thread_pool_max_threads=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_pool_max_threads=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_pool_max_threads=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_pool_max_threads="foo";
+
+
+set global thread_pool_max_threads=0;
+select @@global.thread_pool_max_threads;
+set global thread_pool_max_threads=10000000000;
+select @@global.thread_pool_max_threads;
+
+SET @@global.thread_pool_max_threads = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/thread_pool_oversubscribe_basic.test b/mysql-test/suite/sys_vars/t/thread_pool_oversubscribe_basic.test
new file mode 100644
index 00000000000..74f0f5e6ea7
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/thread_pool_oversubscribe_basic.test
@@ -0,0 +1,43 @@
+# uint global
+--source include/not_windows.inc
+--source include/not_embedded.inc
+SET @start_global_value = @@global.thread_pool_oversubscribe;
+
+#
+# exists as global only
+#
+select @@global.thread_pool_oversubscribe;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.thread_pool_oversubscribe;
+show global variables like 'thread_pool_oversubscribe';
+show session variables like 'thread_pool_oversubscribe';
+select * from information_schema.global_variables where variable_name='thread_pool_oversubscribe';
+select * from information_schema.session_variables where variable_name='thread_pool_oversubscribe';
+
+#
+# show that it's writable
+#
+set global thread_pool_oversubscribe=60;
+select @@global.thread_pool_oversubscribe;
+set global thread_pool_oversubscribe=1000;
+select @@global.thread_pool_oversubscribe;
+--error ER_GLOBAL_VARIABLE
+set session thread_pool_oversubscribe=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_pool_oversubscribe=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_pool_oversubscribe=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_pool_oversubscribe="foo";
+
+
+set global thread_pool_oversubscribe=-1;
+select @@global.thread_pool_oversubscribe;
+set global thread_pool_oversubscribe=10000000000;
+select @@global.thread_pool_oversubscribe;
+
+set @@global.thread_pool_oversubscribe = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/thread_pool_size_basic.test b/mysql-test/suite/sys_vars/t/thread_pool_size_basic.test
new file mode 100644
index 00000000000..eeed58956a4
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/thread_pool_size_basic.test
@@ -0,0 +1,47 @@
+# uint global
+--source include/not_windows.inc
+--source include/not_embedded.inc
+SET @start_global_value = @@global.thread_pool_size;
+
+#
+# exists as global only
+#
+--replace_column 1 #
+select @@global.thread_pool_size;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.thread_pool_size;
+--replace_column 2 #
+show global variables like 'thread_pool_size';
+--replace_column 2 #
+show session variables like 'thread_pool_size';
+--replace_column 2 #
+select * from information_schema.global_variables where variable_name='thread_pool_size';
+--replace_column 2 #
+select * from information_schema.session_variables where variable_name='thread_pool_size';
+--replace_column 2 #
+
+#
+# show that it's writable
+#
+set global thread_pool_size=1;
+select @@global.thread_pool_size;
+set global thread_pool_size=128;
+select @@global.thread_pool_size;
+--error ER_GLOBAL_VARIABLE
+set session thread_pool_size=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_pool_size=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_pool_size=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_pool_size="foo";
+
+set global thread_pool_size=-1;
+
+set global thread_pool_size=100000;
+
+SET @@global.thread_pool_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/thread_pool_stall_limit_basic.test b/mysql-test/suite/sys_vars/t/thread_pool_stall_limit_basic.test
new file mode 100644
index 00000000000..9b4e1df7ab0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/thread_pool_stall_limit_basic.test
@@ -0,0 +1,43 @@
+# uint global
+--source include/not_windows.inc
+--source include/not_embedded.inc
+SET @start_global_value = @@global.thread_pool_stall_limit;
+
+#
+# exists as global only
+#
+select @@global.thread_pool_stall_limit;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.thread_pool_stall_limit;
+show global variables like 'thread_pool_stall_limit';
+show session variables like 'thread_pool_stall_limit';
+select * from information_schema.global_variables where variable_name='thread_pool_stall_limit';
+select * from information_schema.session_variables where variable_name='thread_pool_stall_limit';
+
+#
+# show that it's writable
+#
+set global thread_pool_stall_limit=60;
+select @@global.thread_pool_stall_limit;
+set global thread_pool_stall_limit=4294967295;
+select @@global.thread_pool_stall_limit;
+--error ER_GLOBAL_VARIABLE
+set session thread_pool_stall_limit=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_pool_stall_limit=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_pool_stall_limit=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_pool_stall_limit="foo";
+
+
+set global thread_pool_stall_limit=-1;
+select @@global.thread_pool_stall_limit;
+set global thread_pool_stall_limit=10000000000;
+select @@global.thread_pool_stall_limit;
+
+set @@global.thread_pool_stall_limit = @start_global_value;
diff --git a/mysql-test/t/flush_read_lock_kill.test b/mysql-test/t/flush_read_lock_kill.test
index a672fa5dfc5..e0a772d9fbb 100644
--- a/mysql-test/t/flush_read_lock_kill.test
+++ b/mysql-test/t/flush_read_lock_kill.test
@@ -65,7 +65,7 @@ KILL CONNECTION @id;
connection con1;
--echo # Try to reap FLUSH TABLES WITH READ LOCK,
--echo # it fail due to killed statement and connection.
---error 1317,2013
+--error 1317,2013,1927
reap;
--echo # Switching to 'con2'.
diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test
index 7c6c37ecfc6..d0a82ae3749 100644
--- a/mysql-test/t/kill.test
+++ b/mysql-test/t/kill.test
@@ -142,9 +142,12 @@ KILL @id;
SET DEBUG_SYNC= 'now WAIT_FOR con1_end';
connection con1;
---error 1317,1053,2006,2013
+--error 1317,1053,2006,2013,1927
reap;
+--disable_query_log
+--error 2013,0
SELECT 1;
+--enable_query_log
connection default;
SET DEBUG_SYNC = 'RESET';
diff --git a/mysql-test/t/pool_of_threads.cnf b/mysql-test/t/pool_of_threads.cnf
index d719cc22ad4..c03e1da6450 100644
--- a/mysql-test/t/pool_of_threads.cnf
+++ b/mysql-test/t/pool_of_threads.cnf
@@ -2,12 +2,13 @@
[mysqld.1]
loose-thread-handling= pool-of-threads
-loose-thread_pool_size= 2
+loose-thread_pool_size= 2
+loose-thread_pool_max_threads= 2
extra-port= @ENV.MASTER_EXTRA_PORT
extra-max-connections=1
[client]
-connect-timeout= 2
+connect-timeout= 2
[ENV]
MASTER_EXTRA_PORT= @OPT.port
diff --git a/mysql-test/t/pool_of_threads.test b/mysql-test/t/pool_of_threads.test
index 530038cee91..23ac8e063e2 100644
--- a/mysql-test/t/pool_of_threads.test
+++ b/mysql-test/t/pool_of_threads.test
@@ -13,14 +13,15 @@
# connections on the extra port.
# First set two connections running, and check that extra connection
-# on normal port fails due to--thread-pool-size=2
+# on normal port fails due to--thread-pool-max_threads=2
connection default;
send SELECT sleep(5);
+--sleep 1
connect(con2,localhost,root,,);
connection con2;
send SELECT sleep(5);
---sleep 1
+--sleep 0.5
--disable_abort_on_error
--disable_result_log
@@ -32,11 +33,11 @@ connect(con3,localhost,root,,);
let $error = $mysql_errno;
if (!$error)
{
- --echo # -- Error: managed to establish more than --thread-pool-size connections
+ --echo # -- Error: managed to establish more than --thread_pool_max_threads connections
}
if ($error)
{
- --echo # -- Success: more than --thread-pool-size normal connections not possible
+ --echo # -- Success: more than --thread_pool_max_threads normal connections not possible
}
connection default;
diff --git a/mysql-test/t/wait_timeout.test b/mysql-test/t/wait_timeout.test
index eb86cf17ebb..68c0957347d 100644
--- a/mysql-test/t/wait_timeout.test
+++ b/mysql-test/t/wait_timeout.test
@@ -8,7 +8,7 @@
###############################################################################
# These tests cannot run with the embedded server
-- source include/not_embedded.inc
--- source include/one_thread_per_connection.inc
+#-- source include/one_thread_per_connection.inc
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
diff --git a/mysql-test/t/xa.test b/mysql-test/t/xa.test
index 26c2f0ce210..78f41763e20 100644
--- a/mysql-test/t/xa.test
+++ b/mysql-test/t/xa.test
@@ -358,6 +358,7 @@ let $wait_condition=
AND info = "INSERT INTO t2 SELECT a FROM t1";
--echo # Waiting until INSERT ... is blocked
--source include/wait_condition.inc
+--sleep 0.1
DELETE FROM t1;
COMMIT;