Skip to content

Commit

Permalink
MDEV-13375 back_log ignored
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vuvova committed Aug 14, 2017
1 parent d07daa3 commit d924e0b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 36 deletions.
20 changes: 1 addition & 19 deletions 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
1 change: 1 addition & 0 deletions mysql-test/suite/sys_vars/t/back_log_basic.opt
@@ -0,0 +1 @@
--back-log=1000 --max-connections=300
15 changes: 0 additions & 15 deletions mysql-test/suite/sys_vars/t/back_log_basic.test
Expand Up @@ -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;

2 changes: 0 additions & 2 deletions sql/mysqld.cc
Expand Up @@ -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);

Expand Down

0 comments on commit d924e0b

Please sign in to comment.