From 711d7452da8690c4e775313b55c92b12595352bd Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 21 Dec 2011 00:56:34 +0100 Subject: [PATCH] Fix threadpool related test failures --- mysql-test/r/mysqld--help-win.result | 8 ++------ .../suite/sys_vars/r/thread_pool_max_threads_basic.result | 6 +++--- .../suite/sys_vars/t/thread_pool_idle_timeout_basic.test | 2 +- .../suite/sys_vars/t/thread_pool_max_threads_basic.test | 2 +- mysql-test/suite/sys_vars/t/thread_pool_size_basic.test | 2 +- .../suite/sys_vars/t/thread_pool_stall_limit_basic.test | 2 +- sql/sys_vars.cc | 2 +- 7 files changed, 10 insertions(+), 14 deletions(-) diff --git a/mysql-test/r/mysqld--help-win.result b/mysql-test/r/mysqld--help-win.result index 3c2f1935506..7e9cfab4bbb 100644 --- a/mysql-test/r/mysqld--help-win.result +++ b/mysql-test/r/mysqld--help-win.result @@ -817,9 +817,6 @@ The following options may be given as the first argument: (Defaults to on; use --skip-thread-alarm to disable.) --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 @@ -959,7 +956,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-dump-events 0 max-binlog-size 1073741824 @@ -971,7 +968,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 @@ -1093,7 +1090,6 @@ table-open-cache 400 tc-heuristic-recover COMMIT thread-alarm TRUE 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/suite/sys_vars/r/thread_pool_max_threads_basic.result b/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result index 87dc4295c11..4a748ca7629 100644 --- 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 @@ -20,10 +20,10 @@ 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=4294967295; +set global thread_pool_max_threads=65536; select @@global.thread_pool_max_threads; @@global.thread_pool_max_threads -4294967295 +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; @@ -43,5 +43,5 @@ Warnings: Warning 1292 Truncated incorrect thread_pool_max_threads value: '10000000000' select @@global.thread_pool_max_threads; @@global.thread_pool_max_threads -4294967295 +65536 SET @@global.thread_pool_max_threads = @start_global_value; 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 index 9268d45cb55..0f82213ddd6 100644 --- 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 @@ -1,5 +1,5 @@ # uint global - +--source include/not_windows.inc SET @start_global_value = @@global.thread_pool_idle_timeout; # 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 index 0544986acd5..df5e25a9acd 100644 --- 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 @@ -18,7 +18,7 @@ select * from information_schema.session_variables where variable_name='thread_p # set global thread_pool_max_threads=1; select @@global.thread_pool_max_threads; -set global thread_pool_max_threads=4294967295; +set global thread_pool_max_threads=65536; select @@global.thread_pool_max_threads; --error ER_GLOBAL_VARIABLE set session thread_pool_max_threads=1; 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 index 8b43fc52a58..94f0d4e8f10 100644 --- a/mysql-test/suite/sys_vars/t/thread_pool_size_basic.test +++ b/mysql-test/suite/sys_vars/t/thread_pool_size_basic.test @@ -1,5 +1,5 @@ # uint global - +--source include/not_windows.inc SET @start_global_value = @@global.thread_pool_size; # 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 index 0fcfcd1d663..d67c595369b 100644 --- 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 @@ -1,5 +1,5 @@ # uint global - +--source include/not_windows.inc SET @start_global_value = @@global.thread_pool_stall_limit; # diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 4ec6cbe72dd..3c54c256697 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -2247,7 +2247,7 @@ static Sys_var_uint Sys_threadpool_max_threads( "thread_pool_max_threads", "Maximum allowed number of worker threads in the thread pool", GLOBAL_VAR(threadpool_max_threads), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(1, UINT_MAX), DEFAULT(500), BLOCK_SIZE(1), + VALID_RANGE(1, 65536), DEFAULT(500), BLOCK_SIZE(1), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(fix_tp_max_threads) );