From d924e0b993e76201a1670976860425ce73ecacf4 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 12 Aug 2017 19:09:03 +0200 Subject: [PATCH] MDEV-13375 back_log ignored doing SYSVAR_AUTOSIZE() because of back_log > max_connections enabled "autosized" flag, and that made IS_SYSVAR_AUTOSIZE() true, which triggered the second SYSVAR_AUTOSIZE. Remove back_log <= max_connections limit, back_log doesn't *always* have to be smaller than max_connections. --- .../suite/sys_vars/r/back_log_basic.result | 20 +------------------ .../suite/sys_vars/t/back_log_basic.opt | 1 + .../suite/sys_vars/t/back_log_basic.test | 15 -------------- sql/mysqld.cc | 2 -- 4 files changed, 2 insertions(+), 36 deletions(-) create mode 100644 mysql-test/suite/sys_vars/t/back_log_basic.opt diff --git a/mysql-test/suite/sys_vars/r/back_log_basic.result b/mysql-test/suite/sys_vars/r/back_log_basic.result index 0940ebeef8c..df5eb6d977f 100644 --- a/mysql-test/suite/sys_vars/r/back_log_basic.result +++ b/mysql-test/suite/sys_vars/r/back_log_basic.result @@ -1,21 +1,3 @@ select @@global.back_log; @@global.back_log -80 -select @@session.back_log; -ERROR HY000: Variable 'back_log' is a GLOBAL variable -show global variables like 'back_log'; -Variable_name Value -back_log 80 -show session variables like 'back_log'; -Variable_name Value -back_log 80 -select * from information_schema.global_variables where variable_name='back_log'; -VARIABLE_NAME VARIABLE_VALUE -BACK_LOG 80 -select * from information_schema.session_variables where variable_name='back_log'; -VARIABLE_NAME VARIABLE_VALUE -BACK_LOG 80 -set global back_log=1; -ERROR HY000: Variable 'back_log' is a read only variable -set session back_log=1; -ERROR HY000: Variable 'back_log' is a read only variable +1000 diff --git a/mysql-test/suite/sys_vars/t/back_log_basic.opt b/mysql-test/suite/sys_vars/t/back_log_basic.opt new file mode 100644 index 00000000000..fefc0d536b5 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/back_log_basic.opt @@ -0,0 +1 @@ +--back-log=1000 --max-connections=300 diff --git a/mysql-test/suite/sys_vars/t/back_log_basic.test b/mysql-test/suite/sys_vars/t/back_log_basic.test index 518ca2f0e5f..94a86416e49 100644 --- a/mysql-test/suite/sys_vars/t/back_log_basic.test +++ b/mysql-test/suite/sys_vars/t/back_log_basic.test @@ -2,18 +2,3 @@ # show the global and session values; # select @@global.back_log; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -select @@session.back_log; -show global variables like 'back_log'; -show session variables like 'back_log'; -select * from information_schema.global_variables where variable_name='back_log'; -select * from information_schema.session_variables where variable_name='back_log'; - -# -# show that it's read-only -# ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -set global back_log=1; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -set session back_log=1; - diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 64b6384ca5b..79e205219e1 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -9674,8 +9674,6 @@ static int get_options(int *argc_ptr, char ***argv_ptr) #endif /* Ensure that some variables are not set higher than needed */ - if (back_log > max_connections) - SYSVAR_AUTOSIZE(back_log, max_connections); if (thread_cache_size > max_connections) SYSVAR_AUTOSIZE(thread_cache_size, max_connections);