diff options
author | Sujatha <sujatha.sivakumar@mariadb.com> | 2021-03-30 18:32:43 +0530 |
---|---|---|
committer | Sujatha <sujatha.sivakumar@mariadb.com> | 2021-03-30 18:32:43 +0530 |
commit | aef2f50f0f01cabdf6bd528e881684de0f5918a1 (patch) | |
tree | 122143b1582386f52ffbe60d7a94e98332226b1d | |
parent | 75db05c5992e5a13ab0836120f46e241fc6de618 (diff) | |
download | mariadb-git-aef2f50f0f01cabdf6bd528e881684de0f5918a1.tar.gz |
MDEV-19371: Implement binlog_expire_logs_seconds for purging of binary logsbb-10.6-MDEV_19371
Backporting upstream changes.
commit a7e1ef858ee82493dd8ad9a76bc9c22fe3b8c05b
Author: Neha Kumari <neha.n.kumari@oracle.com>
Date: Thu Mar 2 12:30:08 2017 +0530
WL#9237: Add a new variable binlog_expire_logs_seconds
This worklog adds a system variable binlog_expire_logs_seconds in
addition to the existing expire_logs_days variable.
The ultimate requirement is that the user can set expire periods
smaller than one day by providing another extra variable.
The new variable binlog_expire_logs_seconds, will be set in those cases
where the expire period is not a integer multiple of days
like 1 day 2 hours and 32 minute.
@ sql/binlog.cc
The purge time now also considers the value of
binlog_expire_logs_seconds.
@ sql/mysqld.h
Declared the new variable binlog_expire_logs_seconds
@ sql/mysqld.cc
The purge time now also considers the value of
binlog_expire_logs_seconds.
@ sql/sys_vars.cc
Added the description for binlog_expire_logs_seconds, and
modified the description for expire_logs_days.
Added test case to test the new variable:
- binlog_expire_logs_seconds: Ensure that when any of the two expire
variable, expire_logs_days or binlog_expire_logs_seconds is set
the purge happens on server restart and in cases where a force
rotation of binlog happens.
Extended the existing test cases:
- expire_logs_days_basic: Added code to test the system variable
binlog_expire_logs_seconds.
commit 9d591e29af1654b99a670d975ad8b9c95b011747
Author: Neha Kumari <neha.n.kumari@oracle.com>
Date: Fri Feb 2 09:12:08 2018 +0530
Bug#27252658 :CHANGE DEFAULT VALUE OF BINLOG_EXPIRE_LOGS_SECONDS
Problem:
At present the default value of binlog_expire_logs_seconds is 0, so in future
when expire_logs_days is removed the default expiration time will be set to
'0', which will make the logs to be not purged at all, where in expectation
they should have been purged after 30 days.
Fix:
To avoid the above scenario these are the three combinations regarding when
to consider the default value of what.
1) If user provides values for both options, both variables are set
accordingly and 'binlog_expire_logs_seconds' takes effect.
2) If user provides a value for only one of the options, that particular
variable is set accordingly, and the other variable defaults to 0.
3) If user does not provide a value for any of the options, then
'binlog_expire_logs_seconds' defaults to 30 * 24 * 60 * 60 and 'expire_logs_days' to 0.
This patch also changes the default value of expire_logs_days to 0.
BUG#27699608: WARNING FOR CONFLICTING EXPIRE-LOGS-[DAYS|SECONDS] SUPPRESSED WITH SKIP-LOG-BIN
Problem:
1. When --expire_logs_days and --binlog-expire-logs-seconds are set
to conflicting values, and the binary log is disabled, the warning
for the conflicting values was not issued and the values were not
corrected.
2. There was no warning when using either of these options when the
binary log is disabled. This differs from other options that are
void when the binary log is disabled, such as --binlog-format and
--log-slave-updates
Fix:
1. Check the conflicting values of these options even when the binary
log is disabled.
2. Generate a warning if any of these options is used when the binary
log is disabled.
30 files changed, 1653 insertions, 316 deletions
diff --git a/mysql-test/include/assert_grep.inc b/mysql-test/include/assert_grep.inc index 9f2c8505262..c4f184405a2 100644 --- a/mysql-test/include/assert_grep.inc +++ b/mysql-test/include/assert_grep.inc @@ -94,12 +94,17 @@ if ($assert_match != '') my $assert_only_after= $ENV{'_AG_ASSERT_ONLY_AFTER'}; my $out= $ENV{'_AG_OUT'}; + if (!defined($assert_count)) { + $assert_count = ''; + } + my $result= ''; my $count= 0; open(FILE, "$file") or die("Error $? opening $file: $!\n"); while (<FILE>) { my $line = $_; - if ($assert_only_after && $line =~ /$assert_only_after/) { + if (($line =~ /^CURRENT_TEST: /) || + ($assert_only_after && $line =~ /$assert_only_after/)) { $result = ""; $count = 0; } @@ -130,10 +135,7 @@ EOF --let $_ag_outcome= `SELECT LOAD_FILE('$_AG_OUT')` if ($_ag_outcome != 'assert_grep.inc ok') { - if ($rpl_server_count != '') - { - --source include/show_rpl_debug_info.inc - } + --source include/show_rpl_debug_info.inc --echo include/assert_grep.inc failed! --echo assert_text: '$assert_text' --echo assert_file: '$assert_file' @@ -152,6 +154,6 @@ if ($_ag_outcome != 'assert_grep.inc ok') --die assert_grep.inc failed. } - +--remove_file $_AG_OUT --let $include_filename= include/assert_grep.inc [$assert_text] --source include/end_include_file.inc diff --git a/mysql-test/include/show_rpl_debug_info.inc b/mysql-test/include/show_rpl_debug_info.inc index 1b2b7360970..eb8258b29b1 100644 --- a/mysql-test/include/show_rpl_debug_info.inc +++ b/mysql-test/include/show_rpl_debug_info.inc @@ -42,6 +42,7 @@ --enable_query_log --enable_result_log --enable_warnings +--enable_connect_log --disable_abort_on_error --horizontal_results @@ -49,6 +50,10 @@ --let $_rpl_old_con= $CURRENT_CONNECTION --let $_rpl_is_first_server= 1 --let $_rpl_server= $rpl_server_count +if ($_rpl_server == '') +{ + --let $_rpl_server= 0 +} --inc $_rpl_server diff --git a/mysql-test/main/flush2-master.opt b/mysql-test/main/flush2-master.opt index 789275fa25e..970d7cc881e 100644 --- a/mysql-test/main/flush2-master.opt +++ b/mysql-test/main/flush2-master.opt @@ -1 +1 @@ ---skip-log-bin +--skip-log-bin --binlog-expire-logs-seconds=0 diff --git a/mysql-test/main/flush2.result b/mysql-test/main/flush2.result index 513715b1aee..20d3fb6a3c4 100644 --- a/mysql-test/main/flush2.result +++ b/mysql-test/main/flush2.result @@ -1,6 +1,8 @@ set @save_expire_logs_days=@@global.expire_logs_days; flush logs; set global expire_logs_days = 3; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead show variables like 'log_bin%'; Variable_name Value log_bin OFF @@ -37,3 +39,5 @@ relay_log_purge ON relay_log_recovery OFF relay_log_space_limit 0 set global expire_logs_days=@save_expire_logs_days; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead diff --git a/mysql-test/main/flush2.test b/mysql-test/main/flush2.test index 6c06eea0f98..211e37bcbf0 100644 --- a/mysql-test/main/flush2.test +++ b/mysql-test/main/flush2.test @@ -3,6 +3,9 @@ # --source include/not_embedded.inc +--disable_query_log +call mtr.add_suppression("You need to use --log-bin to make --binlog-expire-logs-seconds work."); +--enable_query_log set @save_expire_logs_days=@@global.expire_logs_days; diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result index 25e49ddc29b..f16293e3107 100644 --- a/mysql-test/main/mysqld--help.result +++ b/mysql-test/main/mysqld--help.result @@ -76,6 +76,12 @@ The following specify which files/extra groups are read (specified before remain --binlog-do-db=name Tells the master it should log updates for the specified database, and exclude all others not explicitly mentioned. + --binlog-expire-logs-seconds=# + If non-zero, binary logs will be purged after + binlog_expire_logs_seconds seconds; If both this option + and expire_logs_days are set to non-zero values, this + option takes priority. Purges happen at startup and at + binary log rotation. --binlog-file-cache-size=# The size of file cache for the binary log --binlog-format=name @@ -268,8 +274,12 @@ The following specify which files/extra groups are read (specified before remain constant optimization --expire-logs-days=# If non-zero, binary logs will be purged after - expire_logs_days days; possible purges happen at startup - and at binary log rotation + expire_logs_days days; If this option alone is set on the + command line or in a configuration file, it overrides the + default value for binlog-expire-logs-seconds. If both + options are set to nonzero values, + binlog-expire-logs-seconds takes priority. Possible + purges happen at startup and at binary log rotation. --explicit-defaults-for-timestamp This option causes CREATE TABLE to create all TIMESTAMP columns as NULL with DEFAULT NULL attribute, Without this @@ -1469,6 +1479,7 @@ binlog-checksum CRC32 binlog-commit-wait-count 0 binlog-commit-wait-usec 100000 binlog-direct-non-transactional-updates FALSE +binlog-expire-logs-seconds 2592000 binlog-file-cache-size 16384 binlog-format MIXED binlog-optimize-thread-scheduling TRUE diff --git a/mysql-test/main/variables.result b/mysql-test/main/variables.result index 5a5247cf05e..2d7d13ce30b 100644 --- a/mysql-test/main/variables.result +++ b/mysql-test/main/variables.result @@ -1383,15 +1383,20 @@ SET @@session.thread_stack= 7; ERROR HY000: Variable 'thread_stack' is a read only variable SET @@global.thread_stack= 7; ERROR HY000: Variable 'thread_stack' is a read only variable +SELECT @@global.binlog_expire_logs_seconds INTO @old_seconds; +SET @@global.binlog_expire_logs_seconds = 0; SELECT @@global.expire_logs_days INTO @old_eld; SET GLOBAL expire_logs_days = -1; Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead Warning 1292 Truncated incorrect expire_logs_days value: '-1' needs to've been adjusted (0) SELECT @@global.expire_logs_days; @@global.expire_logs_days 0 SET GLOBAL expire_logs_days = 11; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead SET @old_mode=@@sql_mode; SET SESSION sql_mode = 'TRADITIONAL'; SET GLOBAL expire_logs_days = 100; @@ -1403,18 +1408,26 @@ SELECT @@global.expire_logs_days; SET SESSION sql_mode = @old_mode; SET GLOBAL expire_logs_days = 100; Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead Warning 1292 Truncated incorrect expire_logs_days value: '100' needs to've been adjusted (99) SELECT @@global.expire_logs_days; @@global.expire_logs_days 99 SET GLOBAL expire_logs_days = 11; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead SET GLOBAL expire_logs_days = 99; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead needs to pass with no warnings (99) SELECT @@global.expire_logs_days; @@global.expire_logs_days 99 SET GLOBAL expire_logs_days = @old_eld; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead +SET GLOBAL binlog_expire_logs_seconds= @old_seconds; SET GLOBAL auto_increment_offset=-1; Warnings: Warning 1292 Truncated incorrect auto_increment_offset value: '-1' diff --git a/mysql-test/main/variables.test b/mysql-test/main/variables.test index 495ab101352..6a7dff6a10f 100644 --- a/mysql-test/main/variables.test +++ b/mysql-test/main/variables.test @@ -1127,6 +1127,11 @@ SET @@global.thread_stack= 7; # Bug #40657 - assertion with out of range variables and traditional sql_mode # +SELECT @@global.binlog_expire_logs_seconds INTO @old_seconds; + +# Set binlog_expire_logs_seconds to 0 in order to test expire_logs_days +# or we will get error while setting expire_logs_days +SET @@global.binlog_expire_logs_seconds = 0; SELECT @@global.expire_logs_days INTO @old_eld; SET GLOBAL expire_logs_days = -1; @@ -1153,6 +1158,7 @@ SELECT @@global.expire_logs_days; # cleanup SET GLOBAL expire_logs_days = @old_eld; +SET GLOBAL binlog_expire_logs_seconds= @old_seconds; # show that warning uses underscore (sysvar-name), not hyphens (option-name) SET GLOBAL auto_increment_offset=-1; diff --git a/mysql-test/suite/binlog/include/binlog_expire_logs_seconds.inc b/mysql-test/suite/binlog/include/binlog_expire_logs_seconds.inc new file mode 100644 index 00000000000..12e37ed8c5d --- /dev/null +++ b/mysql-test/suite/binlog/include/binlog_expire_logs_seconds.inc @@ -0,0 +1,109 @@ +# +# WL#9237: Add a new variable binlog_expire_logs_seconds + +# Here we will test purging of binary logs when either one or both of these variables are set +# - binlog_expire_logs_seconds +# - expire_logs_days + +# The three scenarios being tested for are: +# 1. FLUSH LOGS +# 2. Rotation of logs because of binlog growing bigger than max_binlog_size +# 3. Server restart +# +# Usuage: --let $binlog_expire_logs_seconds= +# --let $expire_logs_days= +# +# --source suite/binlog/include/binlog_expire_logs_seconds.inc + +--let $expire_logs_seconds= `SELECT @@global.binlog_expire_logs_seconds + @@global.expire_logs_days * 24 * 60 * 60` + +CREATE TABLE t1(s LONGBLOB ); + +--let $max_binlog_size_save= `SELECT @@GLOBAL.MAX_BINLOG_SIZE` + +--let $case= 0 + +while ($case < 3) +{ + --echo Case:$case + --let $first_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1) + + # rotates the log, thence the first log will be closed, and depending upon + # the expire time the purge will/will not happen. + + FLUSH LOGS; + + INSERT INTO t1 VALUES('a'); + + --let $second_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1) + + FLUSH LOGS; + + + # This is done to avoid time out in cases where the expire time is more. + # What we do is in those cases modify the timestamp of the oldest log file + # to be the same as expire time so when we execute the next flush log command + # the oldest log will be purged. + + # Only change the timestamp of binlog file when the expire_logs_seconds which is the total + # time for expiring log is greater than 30 seconds + + if ($expire_logs_seconds > 30) + { + --let _EXPIRE_TIME= `SELECT $expire_logs_seconds + 60` + --let _FIRST_BINLOG_FILE= $MYSQLD_DATADIR/$first_binlog_file +--perl + use strict; + use warnings; + my $expire_time = $ENV{'_EXPIRE_TIME'}; + my $first_binlog_file = $ENV{'_FIRST_BINLOG_FILE'}; + my $epoch = (stat($first_binlog_file))[9]; + my $mtime = $epoch - $expire_time; + utime $mtime, $mtime, $first_binlog_file; + EOF + } + + # Checking this ensures that nothing is purged so far. + --file_exists $MYSQLD_DATADIR/$first_binlog_file + + if ($case == 0) + { + --echo #### 1. FLUSH LOGS + + FLUSH LOGS; + } + if ($case == 1) + { + --echo #### 2. Binlog_size > max_binlog_size + + SET @@GLOBAL.MAX_BINLOG_SIZE= 4096; + + INSERT INTO t1 (s) VALUES (REPEAT('s',50000)); + } + if ($case == 2) + { + --echo #### 3. Server restart + + --let $restart_parameters=--binlog_expire_logs_seconds=$expire_logs_seconds + --source include/restart_mysqld.inc + } + + if ($expire_logs_seconds != 0) + { + --error 1 + --file_exists $MYSQLD_DATADIR/$first_binlog_file + } + if ($expire_logs_seconds == 0) + { + --file_exists $MYSQLD_DATADIR/$first_binlog_file + } + --file_exists $MYSQLD_DATADIR/$second_binlog_file + + --inc $case + RESET MASTER; +} +--echo ##### Cleanup ##### +--eval SET @@GLOBAL.MAX_BINLOG_SIZE= $max_binlog_size_save; +DROP TABLE t1; +RESET MASTER; + diff --git a/mysql-test/suite/binlog/include/binlog_expire_warnings.inc b/mysql-test/suite/binlog/include/binlog_expire_warnings.inc new file mode 100644 index 00000000000..a1bbce40fe7 --- /dev/null +++ b/mysql-test/suite/binlog/include/binlog_expire_warnings.inc @@ -0,0 +1,145 @@ +# ==== Purpose ==== +# +# Test one scenario using a combination of --expire-logs-days and +# --binlog-expire-logs-seconds. Verify that there are/aren't warnings +# as expected, and verify that the values of the global variables are +# as expected. +# +# ==== Usage ==== +# +# --let $ofile = FILE +# --let $options = SERVER_OPTIONS +# --let $days = VALUE +# --let $seconds = VALUE +# --let $expect_deprecation_warning = [0|1] +# --let $expect_combination_warning = [0|1] +# --let $expect_binlog_off_and_days_warning = [0|1] +# --let $expect_binlog_off_and_seconds_warning = [0|1] +# --let $expect_seconds = VALUE +# --let $expect_days = VALUE +# --source include/binlog_expire_warnings.inc +# +# Parameters: +# +# $ofile +# Temporary file to use for the error log. +# +# $options +# Any additional options passed to mysqld during server start. +# +# $days +# The value to set for --expire_logs_days +# +# $seconds +# The value to set for --binlog-expire-logs-seconds +# +# $expect_deprecation_warning +# If zero, assert that there is no deprecation warning. +# If nonzero, assert that there is a deprecation warning. +# +# $expect_combination_warning +# If zero, assert that there is no combination warning. +# If nonzero, assert that there is a combination warning. +# +# $expect_binlog_off_and_days_warning +# If zero, assert that there is no warning due to using +# --expire_logs_days with binlog disabled. +# If nonzero, assert that there is a warning due to using +# --expire_logs_days with binlog disabled. +# +# $expect_binlog_off_and_seconds_warning +# If zero, assert that there is no warning due to using +# --binlog-expire-logs-seconds with binlog disabled. +# If nonzero, assert that there is a warning due to using +# --binlog-expire-logs-seconds with binlog disabled. +# +# $expect_days +# Assert that @@global.expire_logs_days has this value. +# +# $expect_seconds +# Assert that @@global.binlog_expire_logs_seconds has this value. + + +--let $restart_parameters = --log-error=$ofile $options +if ($days != '') { + --let $restart_parameters = $restart_parameters --expire_logs_days=$days +} +if ($seconds != '') { + --let $restart_parameters = $restart_parameters --binlog-expire-logs-seconds=$seconds +} +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--source include/restart_mysqld.inc + + +# For all the assert_grep.inc +--let $extra_debug_eval = LOAD_FILE("$ofile") + + +if (!$expect_deprecation_warning) { + --let $assert_text = There shall be no deprecation warning + --let $assert_count = 0 +} +if ($expect_deprecation_warning) { + --let $assert_text = There shall be a deprecation warning + --let $assert_count = 1 +} +--let $assert_file = $ofile +--let $assert_select = The syntax 'expire-logs-days' is deprecated and will be removed in a future release. +--let $assert_only_after = Shutdown complete +--source include/assert_grep.inc + + +if (!$expect_combination_warning) { + --let $assert_text = There shall be no combination warning + --let $assert_count = 0 +} +if ($expect_combination_warning) { + --let $assert_text = There shall be a combination warning + --let $assert_count = 1 +} +--let $assert_file = $ofile +--let $assert_select = The option expire_logs_days cannot be used together with option binlog_expire_logs_seconds. Therefore, value of expire_logs_days is ignored. +--let $assert_only_after = Shutdown complete +--source include/assert_grep.inc + + +if (!$expect_binlog_off_and_seconds_warning) { + --let $assert_text = There shall be no binlog_off+seconds warning + --let $assert_count = 0 +} +if ($expect_binlog_off_and_seconds_warning) { + --let $assert_text = There shall be a binlog_off+seconds warning + --let $assert_count = 1 +} +--let $assert_file = $ofile +--let $assert_select = You need to use --log-bin to make --binlog-expire-logs-seconds work. +--let $assert_only_after = Shutdown complete +--source include/assert_grep.inc + + +if (!$expect_binlog_off_and_days_warning) { + --let $assert_text = There shall be no binlog_off+days warning + --let $assert_count = 0 +} +if ($expect_binlog_off_and_days_warning) { + --let $assert_text = There shall be a binlog_off+days warning + --let $assert_count = 1 +} +--let $assert_file = $ofile +--let $assert_select = You need to use --log-bin to make --expire_logs_days work. +--let $assert_only_after = Shutdown complete +--source include/assert_grep.inc + + +# For all the assert.inc +--let $extra_debug_eval = CONCAT("days: ", @@global.expire_logs_days, " seconds: ", @@global.binlog_expire_logs_seconds) + + +--let $assert_text = binlog_expire_logs_seconds shall be $expect_seconds +--let $assert_cond = @@global.binlog_expire_logs_seconds = $expect_seconds +--source include/assert.inc + + +--let $assert_text = expire_logs_days shall be $expect_days +--let $assert_cond = @@global.expire_logs_days = $expect_days +--source include/assert.inc diff --git a/mysql-test/suite/binlog/r/binlog_expire_logs_seconds.result b/mysql-test/suite/binlog/r/binlog_expire_logs_seconds.result new file mode 100644 index 00000000000..fa4f449ed94 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_expire_logs_seconds.result @@ -0,0 +1,117 @@ +CALL mtr.add_suppression("The option expire_logs_days cannot be used together*"); +#### +#### 1. When binlog_expire_logs_seconds == 0 and expire_logs_days == 0 +#### no purge should happen +SET GLOBAL binlog_expire_logs_seconds= 0; +SET GLOBAL expire_logs_days= 0; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead +CREATE TABLE t1(s LONGBLOB ); +Case:0 +FLUSH LOGS; +INSERT INTO t1 VALUES('a'); +FLUSH LOGS; +#### 1. FLUSH LOGS +FLUSH LOGS; +RESET MASTER; +Case:1 +FLUSH LOGS; +INSERT INTO t1 VALUES('a'); +FLUSH LOGS; +#### 2. Binlog_size > max_binlog_size +SET @@GLOBAL.MAX_BINLOG_SIZE= 4096; +INSERT INTO t1 (s) VALUES (REPEAT('s',50000)); +RESET MASTER; +Case:2 +FLUSH LOGS; +INSERT INTO t1 VALUES('a'); +FLUSH LOGS; +#### 3. Server restart +# restart: --binlog_expire_logs_seconds=0 +RESET MASTER; +##### Cleanup ##### +SET @@GLOBAL.MAX_BINLOG_SIZE= 1073741824;; +DROP TABLE t1; +RESET MASTER; +#### +#### 2.1: binlog_expire_logs_seconds > 0 and expire_logs_days == 0 +#### +Testing with smaller values of binlog_expire_logs_seconds +SET GLOBAL binlog_expire_logs_seconds= 30; +SET GLOBAL expire_logs_days= 0; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead +FLUSH LOGS; +FLUSH LOGS; +FLUSH LOGS; +RESET MASTER; +Testing with greater values of binlog_expire_logs_seconds +SET GLOBAL binlog_expire_logs_seconds= 3600; +SET GLOBAL expire_logs_days= 0; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead +CREATE TABLE t1(s LONGBLOB ); +Case:0 +FLUSH LOGS; +INSERT INTO t1 VALUES('a'); +FLUSH LOGS; +#### 1. FLUSH LOGS +FLUSH LOGS; +RESET MASTER; +Case:1 +FLUSH LOGS; +INSERT INTO t1 VALUES('a'); +FLUSH LOGS; +#### 2. Binlog_size > max_binlog_size +SET @@GLOBAL.MAX_BINLOG_SIZE= 4096; +INSERT INTO t1 (s) VALUES (REPEAT('s',50000)); +RESET MASTER; +Case:2 +FLUSH LOGS; +INSERT INTO t1 VALUES('a'); +FLUSH LOGS; +#### 3. Server restart +# restart: --binlog_expire_logs_seconds=3600 +RESET MASTER; +##### Cleanup ##### +SET @@GLOBAL.MAX_BINLOG_SIZE= 1073741824;; +DROP TABLE t1; +RESET MASTER; +#### +#### 2.3: binlog_expire_logs_seconds == 0 and expire_logs_days > 0 +#### +SET GLOBAL binlog_expire_logs_seconds= 0; +SET GLOBAL expire_logs_days= 1; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead +CREATE TABLE t1(s LONGBLOB ); +Case:0 +FLUSH LOGS; +INSERT INTO t1 VALUES('a'); +FLUSH LOGS; +#### 1. FLUSH LOGS +FLUSH LOGS; +RESET MASTER; +Case:1 +FLUSH LOGS; +INSERT INTO t1 VALUES('a'); +FLUSH LOGS; +#### 2. Binlog_size > max_binlog_size +SET @@GLOBAL.MAX_BINLOG_SIZE= 4096; +INSERT INTO t1 (s) VALUES (REPEAT('s',50000)); +RESET MASTER; +Case:2 +FLUSH LOGS; +INSERT INTO t1 VALUES('a'); +FLUSH LOGS; +#### 3. Server restart +# restart: --binlog_expire_logs_seconds=86400 +RESET MASTER; +##### Cleanup ##### +SET @@GLOBAL.MAX_BINLOG_SIZE= 1073741824;; +DROP TABLE t1; +RESET MASTER; +SET GLOBAL binlog_expire_logs_seconds= 0; +SET GLOBAL expire_logs_days= 0; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead diff --git a/mysql-test/suite/binlog/r/binlog_expire_warnings.result b/mysql-test/suite/binlog/r/binlog_expire_warnings.result new file mode 100644 index 00000000000..9e31eab75d3 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_expire_warnings.result @@ -0,0 +1,152 @@ +#### Binary log ENABLED #### +==== Don't set any option ==== +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be no combination warning] +include/assert_grep.inc [There shall be no binlog_off+seconds warning] +include/assert_grep.inc [There shall be no binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 60*60*24*30] +include/assert.inc [expire_logs_days shall be 0] +==== Set one option to zero ==== +---- days=0 ---- +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err --expire_logs_days=0 +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be no combination warning] +include/assert_grep.inc [There shall be no binlog_off+seconds warning] +include/assert_grep.inc [There shall be no binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 0] +include/assert.inc [expire_logs_days shall be 0] +---- seconds=0 ---- +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err --binlog-expire-logs-seconds=0 +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be no combination warning] +include/assert_grep.inc [There shall be no binlog_off+seconds warning] +include/assert_grep.inc [There shall be no binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 0] +include/assert.inc [expire_logs_days shall be 0] +==== Set one option to non-zero ==== +---- days=14 ---- +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err --expire_logs_days=14 +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be no combination warning] +include/assert_grep.inc [There shall be no binlog_off+seconds warning] +include/assert_grep.inc [There shall be no binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 0] +include/assert.inc [expire_logs_days shall be 14] +---- seconds=3600 ---- +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err --binlog-expire-logs-seconds=3600 +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be no combination warning] +include/assert_grep.inc [There shall be no binlog_off+seconds warning] +include/assert_grep.inc [There shall be no binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 3600] +include/assert.inc [expire_logs_days shall be 0] +==== Set both options to zero ==== +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err --expire_logs_days=0 --binlog-expire-logs-seconds=0 +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be no combination warning] +include/assert_grep.inc [There shall be no binlog_off+seconds warning] +include/assert_grep.inc [There shall be no binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 0] +include/assert.inc [expire_logs_days shall be 0] +==== Set both options: one to zero and one to non-zero ==== +---- seconds=0 days=14 ---- +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err --expire_logs_days=14 --binlog-expire-logs-seconds=0 +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be no combination warning] +include/assert_grep.inc [There shall be no binlog_off+seconds warning] +include/assert_grep.inc [There shall be no binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 0] +include/assert.inc [expire_logs_days shall be 14] +---- seconds=14 days=0 ---- +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err --expire_logs_days=0 --binlog-expire-logs-seconds=14 +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be no combination warning] +include/assert_grep.inc [There shall be no binlog_off+seconds warning] +include/assert_grep.inc [There shall be no binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 14] +include/assert.inc [expire_logs_days shall be 0] +==== Set both options to non-zero ==== +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err --expire_logs_days=14 --binlog-expire-logs-seconds=14 +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be a combination warning] +include/assert_grep.inc [There shall be no binlog_off+seconds warning] +include/assert_grep.inc [There shall be no binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 14] +include/assert.inc [expire_logs_days shall be 0] +#### Binary log DISABLED #### +==== Don't set any option ==== +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err --skip-log-bin +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be no combination warning] +include/assert_grep.inc [There shall be no binlog_off+seconds warning] +include/assert_grep.inc [There shall be no binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 60*60*24*30] +include/assert.inc [expire_logs_days shall be 0] +==== Set one option to zero ==== +---- days=0 ---- +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err --skip-log-bin --expire_logs_days=0 +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be no combination warning] +include/assert_grep.inc [There shall be no binlog_off+seconds warning] +include/assert_grep.inc [There shall be a binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 0] +include/assert.inc [expire_logs_days shall be 0] +---- seconds=0 ---- +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err --skip-log-bin --binlog-expire-logs-seconds=0 +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be no combination warning] +include/assert_grep.inc [There shall be a binlog_off+seconds warning] +include/assert_grep.inc [There shall be no binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 0] +include/assert.inc [expire_logs_days shall be 0] +==== Set one option to non-zero ==== +---- days=14 ---- +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err --skip-log-bin --expire_logs_days=14 +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be no combination warning] +include/assert_grep.inc [There shall be no binlog_off+seconds warning] +include/assert_grep.inc [There shall be a binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 0] +include/assert.inc [expire_logs_days shall be 14] +---- seconds=3600 ---- +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err --skip-log-bin --binlog-expire-logs-seconds=3600 +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be no combination warning] +include/assert_grep.inc [There shall be a binlog_off+seconds warning] +include/assert_grep.inc [There shall be no binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 3600] +include/assert.inc [expire_logs_days shall be 0] +==== Set both options to zero ==== +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err --skip-log-bin --expire_logs_days=0 --binlog-expire-logs-seconds=0 +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be no combination warning] +include/assert_grep.inc [There shall be a binlog_off+seconds warning] +include/assert_grep.inc [There shall be a binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 0] +include/assert.inc [expire_logs_days shall be 0] +==== Set both options: one to zero and one to non-zero ==== +---- seconds=0 days=14 ---- +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err --skip-log-bin --expire_logs_days=14 --binlog-expire-logs-seconds=0 +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be no combination warning] +include/assert_grep.inc [There shall be a binlog_off+seconds warning] +include/assert_grep.inc [There shall be a binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 0] +include/assert.inc [expire_logs_days shall be 14] +---- seconds=14 days=0 ---- +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err --skip-log-bin --expire_logs_days=0 --binlog-expire-logs-seconds=14 +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be no combination warning] +include/assert_grep.inc [There shall be a binlog_off+seconds warning] +include/assert_grep.inc [There shall be a binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 14] +include/assert.inc [expire_logs_days shall be 0] +==== Set both options to non-zero ==== +# restart: --log-error=MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err --skip-log-bin --expire_logs_days=14 --binlog-expire-logs-seconds=14 +include/assert_grep.inc [There shall be no deprecation warning] +include/assert_grep.inc [There shall be a combination warning] +include/assert_grep.inc [There shall be a binlog_off+seconds warning] +include/assert_grep.inc [There shall be a binlog_off+days warning] +include/assert.inc [binlog_expire_logs_seconds shall be 14] +include/assert.inc [expire_logs_days shall be 0] diff --git a/mysql-test/suite/binlog/t/binlog_expire_logs_seconds-master.opt b/mysql-test/suite/binlog/t/binlog_expire_logs_seconds-master.opt new file mode 100644 index 00000000000..64220e8d282 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_expire_logs_seconds-master.opt @@ -0,0 +1 @@ +--expire-logs-days=0 diff --git a/mysql-test/suite/binlog/t/binlog_expire_logs_seconds.test b/mysql-test/suite/binlog/t/binlog_expire_logs_seconds.test new file mode 100644 index 00000000000..9baf3a61f74 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_expire_logs_seconds.test @@ -0,0 +1,98 @@ +# +# WL#9236: Add a new variable binlog_expire_logs_seconds +# +# ==== Purpose ==== +# The test case test the following: +# +# 1. If binlog_expire_logs_seconds == 0 and expire_logs_days == 0, no purge happens. +# +# 2. In all the below listed cases it puges the binary logs older than the timeout +# and keeps the binary logs newer than the timeout. +# +# 2.1. binlog_expire_logs_seconds > 0 and expire_logs_days > 0 +# 2.2. binlog_expire_logs_seconds > 0 and expire_logs_days == 0 +# 2.3. binlog_expire_logs_seconds == 0 and expire_logs_days > 0 +# +# Additional tests for the boundaries of expire_logs_days already +# exist on the sys_vars.expire_logs_days_basic test case. + +# Test in this file is binlog format agnostic, thus no need +# to rerun it for every format. +CALL mtr.add_suppression("The option expire_logs_days cannot be used together*"); +--source include/have_binlog_format_row.inc +--source include/not_windows.inc +#--source include/not_binlog_transaction_compression_on.inc + +--let $saved_expire_logs_days= `SELECT @@GLOBAL.expire_logs_days` +--let $saved_binlog_expire_logs_seconds= `SELECT @@GLOBAL.binlog_expire_logs_seconds` +# Set the datadir +--let $MYSQLD_DATADIR= `SELECT @@datadir` + +--echo #### +--echo #### 1. When binlog_expire_logs_seconds == 0 and expire_logs_days == 0 +--echo #### no purge should happen + +SET GLOBAL binlog_expire_logs_seconds= 0; +SET GLOBAL expire_logs_days= 0; + +# This will test the expire period for three scenarios, described in the .inc file. +--source suite/binlog/include/binlog_expire_logs_seconds.inc + +--echo #### +--echo #### 2.1: binlog_expire_logs_seconds > 0 and expire_logs_days == 0 +--echo #### + +# Here we will test both with smaller values and larger values + +--echo Testing with smaller values of binlog_expire_logs_seconds + +SET GLOBAL binlog_expire_logs_seconds= 30; +SET GLOBAL expire_logs_days= 0; + +--let $expire_logs_seconds= `SELECT @@global.binlog_expire_logs_seconds + @@global.expire_logs_days * 24 * 60 * 60` + +--let $first_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1) +FLUSH LOGS; + +--sleep $expire_logs_seconds + +--let $second_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1) +FLUSH LOGS; + +# The sleep is in two parts to ensure a time gap between first_binlog_file +# and second_binlog_file, by doing that we can check that one is purged and +# another isn't. +# sleep for n seconds here, n < $expire_logs_seconds +--sleep 3 +FLUSH LOGS; + +--error 1 +--file_exists $MYSQLD_DATADIR/$first_binlog_file + +--file_exists $MYSQLD_DATADIR/$second_binlog_file + +RESET MASTER; +--echo Testing with greater values of binlog_expire_logs_seconds + +SET GLOBAL binlog_expire_logs_seconds= 3600; +SET GLOBAL expire_logs_days= 0; +# This will test the expire period for three scenarios, described in the .inc file. + +--source suite/binlog/include/binlog_expire_logs_seconds.inc + +--echo #### +--echo #### 2.3: binlog_expire_logs_seconds == 0 and expire_logs_days > 0 +--echo #### + +SET GLOBAL binlog_expire_logs_seconds= 0; +SET GLOBAL expire_logs_days= 1; + +# This will test the expire period for three scenarios, described in the .inc file. +--source suite/binlog/include/binlog_expire_logs_seconds.inc + + +# reset the variables +--eval SET GLOBAL binlog_expire_logs_seconds= $saved_binlog_expire_logs_seconds +--eval SET GLOBAL expire_logs_days= $saved_expire_logs_days + + diff --git a/mysql-test/suite/binlog/t/binlog_expire_warnings.test b/mysql-test/suite/binlog/t/binlog_expire_warnings.test new file mode 100644 index 00000000000..04d98c0ea92 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_expire_warnings.test @@ -0,0 +1,210 @@ +# ==== Requirements ==== +# +# Verify the logic for warnings related to expire-logs-days and +# binlog-expire-logs-seconds on server start: +# +# R0. All the following shall hold with binlog disabled and binlog enabled. +# +# R1. Deprecation warnings: +# +# R1.1. expire-logs-days is not used: no deprecation warning. +# +# R1.2. expire-logs-days is used explicitly: no deprecation warning. +# +# R3. Combination warnings: +# +# R3.1. Both expire-logs-days and binlog-expire-logs-seconds are +# explicitly passed and set to nonzero: server shall generate +# a warning for this incompatible combination. +# +# R3.2. At least one of expire-logs-days and +# binlog-expire-logs-seconds is either set to 0 not passed +# at all: server shall not generate a warning for +# incompatible combinations. +# +# R4. Binlog off warnings: +# +# R4.1. If the binary log is disabled, using any of +# binlog-expire-logs-seconds or expire_logs_days shall +# generate a warning. +# +# R4.2. If the binary log is enabled, or if +# binlog-expire-logs-seconds / expire_logs_days is not used, +# there shall be no warning for this case. +# +# R5. Values: +# +# R5.1. None of expire-logs-days or binlog-expire-logs-seconds is +# set: both shall use their default values (days=0, +# seconds=60*60*24*30) +# +# R5.2. Exactly one of expire-logs-days or binlog-expire-logs-seconds +# is set: that value is used and the other option is set to zero. +# +# R5.3. Both expire-logs-days or binlog-expire-logs-seconds are +# set, and at least one of them is set to zero: both are set +# to the given values. +# +# R5.4. Both expire-logs-days and binlog-expire-logs-seconds are +# set, and both are non-zero: binlog_expire_logs_seconds is +# set to the specified value, and expire_logs_days is set to +# 0. +# +# ==== Implementation ==== +# +# Test all combinations of: +# +# - log-bin: on, off +# - expire-logs-days: not set, set to 0, set to nonzero +# - binlog-expire-logs-seconds: not set, set to 0, set to nonzero +# +# For each such scenario, state the expected warnings and values, and +# use extra/binlog_tests/binlog_expire_warnings.inc to execute the +# scenario. +# +# ==== References ==== +# +# WL#10924: Deprecate expire_logs_days +# BUG#26483363: WARNING ABOUT EXPIRE-LOGS-DAYS +# BUG#27699608: WARNING FOR CONFLICTING EXPIRE-LOGS-[DAYS|SECONDS] SUPPRESSED WITH SKIP-LOG-BIN + +# No need to run multiple times. +--source include/have_binlog_format_row.inc + +# Restarts the server with new options. +--source include/force_restart.inc + +# A bit slow, since it restarts the server many times. Also, this is +# unlikely to break in the future, so not important to run frequently. +--source include/big_test.inc + + +--let $ofile = $MYSQLTEST_VARDIR/tmp/binlog_expire_warnings-output.err + +--let $i = 0 +while ($i < 2) { + +if ($i == 0) { + --echo #### Binary log ENABLED #### + --let $options = + --let $binlog_off = 0 + } + if ($i == 1) { + --echo #### Binary log DISABLED #### + --let $options = --skip-log-bin + --let $binlog_off = 1 + } + + --echo ==== Don't set any option ==== + + --let $days = + --let $seconds = + --let $expect_deprecation_warning = 0 + --let $expect_combination_warning = 0 + --let $expect_binlog_off_and_days_warning = 0 + --let $expect_binlog_off_and_seconds_warning = 0 + --let $expect_days = 0 + --let $expect_seconds = 60*60*24*30 + --source suite/binlog/include/binlog_expire_warnings.inc + + --echo ==== Set one option to zero ==== + + --echo ---- days=0 ---- + --let $days = 0 + --let $seconds = + --let $expect_deprecation_warning = 0 + --let $expect_combination_warning = 0 + --let $expect_binlog_off_and_days_warning = $binlog_off + --let $expect_binlog_off_and_seconds_warning = 0 + --let $expect_days = 0 + --let $expect_seconds = 0 + --source suite/binlog/include/binlog_expire_warnings.inc + + --echo ---- seconds=0 ---- + --let $days = + --let $seconds = 0 + --let $expect_deprecation_warning = 0 + --let $expect_combination_warning = 0 + --let $expect_binlog_off_and_days_warning = 0 + --let $expect_binlog_off_and_seconds_warning = $binlog_off + --let $expect_days = 0 + --let $expect_seconds = 0 + --source suite/binlog/include/binlog_expire_warnings.inc + + --echo ==== Set one option to non-zero ==== + + --echo ---- days=14 ---- + --let $days = 14 + --let $seconds = + --let $expect_deprecation_warning = 0 + --let $expect_combination_warning = 0 + --let $expect_binlog_off_and_days_warning = $binlog_off + --let $expect_binlog_off_and_seconds_warning = 0 + --let $expect_days = 14 + --let $expect_seconds = 0 + --source suite/binlog/include/binlog_expire_warnings.inc + + --echo ---- seconds=3600 ---- + --let $days = + --let $seconds = 3600 + --let $expect_deprecation_warning = 0 + --let $expect_combination_warning = 0 + --let $expect_binlog_off_and_days_warning = 0 + --let $expect_binlog_off_and_seconds_warning = $binlog_off + --let $expect_days = 0 + --let $expect_seconds = 3600 + --source suite/binlog/include/binlog_expire_warnings.inc + + --echo ==== Set both options to zero ==== + + --let $days = 0 + --let $seconds = 0 + --let $expect_deprecation_warning = 0 + --let $expect_combination_warning = 0 + --let $expect_binlog_off_and_days_warning = $binlog_off + --let $expect_binlog_off_and_seconds_warning = $binlog_off + --let $expect_days = 0 + --let $expect_seconds = 0 + --source suite/binlog/include/binlog_expire_warnings.inc + + --echo ==== Set both options: one to zero and one to non-zero ==== + + --echo ---- seconds=0 days=14 ---- + --let $days = 14 + --let $seconds = 0 + --let $expect_deprecation_warning = 0 + --let $expect_combination_warning = 0 + --let $expect_binlog_off_and_days_warning = $binlog_off + --let $expect_binlog_off_and_seconds_warning = $binlog_off + --let $expect_days = 14 + --let $expect_seconds = 0 + --source suite/binlog/include/binlog_expire_warnings.inc + + --echo ---- seconds=14 days=0 ---- + --let $days = 0 + --let $seconds = 14 + --let $expect_deprecation_warning = 0 + --let $expect_combination_warning = 0 + --let $expect_binlog_off_and_days_warning = $binlog_off + --let $expect_binlog_off_and_seconds_warning = $binlog_off + --let $expect_days = 0 + --let $expect_seconds = 14 + --source suite/binlog/include/binlog_expire_warnings.inc + + --echo ==== Set both options to non-zero ==== + + --let $days = 14 + --let $seconds = 14 + --let $expect_deprecation_warning = 0 + --let $expect_combination_warning = 1 + --let $expect_binlog_off_and_days_warning = $binlog_off + --let $expect_binlog_off_and_seconds_warning = $binlog_off + --let $expect_days = 0 + --let $expect_seconds = 14 + --source suite/binlog/include/binlog_expire_warnings.inc + + --inc $i +} + +# cleanup +--remove_file $ofile diff --git a/mysql-test/suite/sys_vars/r/binlog_expire_logs_seconds_basic.result b/mysql-test/suite/sys_vars/r/binlog_expire_logs_seconds_basic.result new file mode 100644 index 00000000000..fb3ec28f3aa --- /dev/null +++ b/mysql-test/suite/sys_vars/r/binlog_expire_logs_seconds_basic.result @@ -0,0 +1,117 @@ +SET @start_value = @@global.expire_logs_days; +SELECT @start_value; +@start_value +0 +SET @@global.expire_logs_days = 0; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead +SET @start_value_sec = @@global.binlog_expire_logs_seconds; +SELECT @start_value_sec; +@start_value_sec +2592000 +SET @@global.binlog_expire_logs_seconds = 8734635; +SET @@global.binlog_expire_logs_seconds = DEFAULT; +SELECT @@global.binlog_expire_logs_seconds; +@@global.binlog_expire_logs_seconds +2592000 +SET @@global.binlog_expire_logs_seconds = @start_value_sec; +SELECT @@global.binlog_expire_logs_seconds = 2592000; +@@global.binlog_expire_logs_seconds = 2592000 +1 +SET @@global.binlog_expire_logs_seconds = 0; +SELECT @@global.binlog_expire_logs_seconds; +@@global.binlog_expire_logs_seconds +0 +SET @@global.binlog_expire_logs_seconds = 99; +SELECT @@global.binlog_expire_logs_seconds; +@@global.binlog_expire_logs_seconds +99 +SET @@global.binlog_expire_logs_seconds = 10; +SELECT @@global.binlog_expire_logs_seconds; +@@global.binlog_expire_logs_seconds +10 +SET @@global.binlog_expire_logs_seconds = 21; +SELECT @@global.binlog_expire_logs_seconds; +@@global.binlog_expire_logs_seconds +21 +SET @@global.binlog_expire_logs_seconds = -1; +Warnings: +Warning 1292 Truncated incorrect binlog_expire_logs_seconds value: '-1' +SELECT @@global.binlog_expire_logs_seconds; +@@global.binlog_expire_logs_seconds +0 +SET @@global.binlog_expire_logs_seconds = 10000.01; +ERROR 42000: Incorrect argument type to variable 'binlog_expire_logs_seconds' +SELECT @@global.binlog_expire_logs_seconds; +@@global.binlog_expire_logs_seconds +0 +SET @@global.binlog_expire_logs_seconds = -1024; +Warnings: +Warning 1292 Truncated incorrect binlog_expire_logs_seconds value: '-1024' +SELECT @@global.binlog_expire_logs_seconds; +@@global.binlog_expire_logs_seconds +0 +SET @@global.binlog_expire_logs_seconds = 42949672950; +Warnings: +Warning 1292 Truncated incorrect binlog_expire_logs_seconds value: '42949672950' +SELECT @@global.binlog_expire_logs_seconds; +@@global.binlog_expire_logs_seconds +4294967295 +SET @@global.binlog_expire_logs_seconds = ON; +ERROR 42000: Incorrect argument type to variable 'binlog_expire_logs_seconds' +SELECT @@global.binlog_expire_logs_seconds; +@@global.binlog_expire_logs_seconds +4294967295 +SET @@global.binlog_expire_logs_seconds = 'test'; +ERROR 42000: Incorrect argument type to variable 'binlog_expire_logs_seconds' +SELECT @@global.binlog_expire_logs_seconds; +@@global.binlog_expire_logs_seconds +4294967295 +SET @@session.binlog_expire_logs_seconds = 0; +ERROR HY000: Variable 'binlog_expire_logs_seconds' is a GLOBAL variable and should be set with SET GLOBAL +SELECT @@binlog_expire_logs_seconds; +@@binlog_expire_logs_seconds +4294967295 +SELECT @@global.binlog_expire_logs_seconds = VARIABLE_VALUE +FROM information_schema.global_variables +WHERE VARIABLE_NAME='binlog_expire_logs_seconds'; +@@global.binlog_expire_logs_seconds = VARIABLE_VALUE +1 +SELECT @@binlog_expire_logs_seconds = VARIABLE_VALUE +FROM information_schema.session_variables +WHERE VARIABLE_NAME='binlog_expire_logs_seconds'; +@@binlog_expire_logs_seconds = VARIABLE_VALUE +1 +SET @@global.binlog_expire_logs_seconds = TRUE; +SELECT @@global.binlog_expire_logs_seconds; +@@global.binlog_expire_logs_seconds +1 +SET @@global.binlog_expire_logs_seconds = FALSE; +SELECT @@global.binlog_expire_logs_seconds; +@@global.binlog_expire_logs_seconds +0 +SET @@global.binlog_expire_logs_seconds = 1; +SELECT @@binlog_expire_logs_seconds = @@global.binlog_expire_logs_seconds; +@@binlog_expire_logs_seconds = @@global.binlog_expire_logs_seconds +1 +SET binlog_expire_logs_seconds = 1; +ERROR HY000: Variable 'binlog_expire_logs_seconds' is a GLOBAL variable and should be set with SET GLOBAL +SELECT @@binlog_expire_logs_seconds; +@@binlog_expire_logs_seconds +1 +SELECT local.binlog_expire_logs_seconds; +ERROR 42S02: Unknown table 'local' in field list +SELECT global.binlog_expire_logs_seconds; +ERROR 42S02: Unknown table 'global' in field list +SELECT binlog_expire_logs_seconds = @@session.binlog_expire_logs_seconds; +ERROR 42S22: Unknown column 'binlog_expire_logs_seconds' in 'field list' +SET @@global.binlog_expire_logs_seconds = @start_value_sec; +SELECT @@global.binlog_expire_logs_seconds; +@@global.binlog_expire_logs_seconds +2592000 +SET @@global.expire_logs_days = @start_value; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead +SELECT @@global.expire_logs_days; +@@global.expire_logs_days +0 diff --git a/mysql-test/suite/sys_vars/r/expire_logs_days_basic.result b/mysql-test/suite/sys_vars/r/expire_logs_days_basic.result index ea6f29767d9..ed52bd33e4d 100644 --- a/mysql-test/suite/sys_vars/r/expire_logs_days_basic.result +++ b/mysql-test/suite/sys_vars/r/expire_logs_days_basic.result @@ -1,47 +1,72 @@ SET @start_value = @@global.expire_logs_days; +SELECT @start_value; +@start_value +0 +SET @start_value_sec = @@global.binlog_expire_logs_seconds; +SELECT @start_value_sec; +@start_value_sec +2592000 +SET @@global.binlog_expire_logs_seconds = 0; '#--------------------FN_DYNVARS_029_01------------------------#' SET @@global.expire_logs_days = 99; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead SET @@global.expire_logs_days = DEFAULT; -SELECT @@global.expire_logs_days = 0; -@@global.expire_logs_days = 0 -1 +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead +SELECT @@global.expire_logs_days; +@@global.expire_logs_days +0 '#---------------------FN_DYNVARS_029_02-------------------------#' SET @@global.expire_logs_days = @start_value; -SELECT @@global.expire_logs_days = @start_value; -@@global.expire_logs_days = @start_value +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead +SELECT @@global.expire_logs_days = 0; +@@global.expire_logs_days = 0 1 -'#--------------------FN_DYNVARS_029_03------------------------#' +'#--------------------FN_DYNVARS_029_03_01------------------------#' SET @@global.expire_logs_days = 0; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead SELECT @@global.expire_logs_days; @@global.expire_logs_days 0 SET @@global.expire_logs_days = 99; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead SELECT @@global.expire_logs_days; @@global.expire_logs_days 99 SET @@global.expire_logs_days = 10; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead SELECT @@global.expire_logs_days; @@global.expire_logs_days 10 SET @@global.expire_logs_days = 21; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead SELECT @@global.expire_logs_days; @@global.expire_logs_days 21 -'#--------------------FN_DYNVARS_029_04-------------------------#' +'#--------------------FN_DYNVARS_029_04_01-------------------------#' SET @@global.expire_logs_days = -1; Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead Warning 1292 Truncated incorrect expire_logs_days value: '-1' SELECT @@global.expire_logs_days; @@global.expire_logs_days 0 SET @@global.expire_logs_days = 100; Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead Warning 1292 Truncated incorrect expire_logs_days value: '100' SELECT @@global.expire_logs_days; @@global.expire_logs_days 99 SET @@global.expire_logs_days = 1024; Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead Warning 1292 Truncated incorrect expire_logs_days value: '1024' SELECT @@global.expire_logs_days; @@global.expire_logs_days @@ -53,12 +78,14 @@ SELECT @@global.expire_logs_days; 99 SET @@global.expire_logs_days = -1024; Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead Warning 1292 Truncated incorrect expire_logs_days value: '-1024' SELECT @@global.expire_logs_days; @@global.expire_logs_days 0 SET @@global.expire_logs_days = 42949672950; Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead Warning 1292 Truncated incorrect expire_logs_days value: '42949672950' SELECT @@global.expire_logs_days; @@global.expire_logs_days @@ -73,38 +100,44 @@ ERROR 42000: Incorrect argument type to variable 'expire_logs_days' SELECT @@global.expire_logs_days; @@global.expire_logs_days 99 -'#-------------------FN_DYNVARS_029_05----------------------------#' +'#-------------------FN_DYNVARS_029_05_01----------------------------#' SET @@session.expire_logs_days = 0; ERROR HY000: Variable 'expire_logs_days' is a GLOBAL variable and should be set with SET GLOBAL SELECT @@expire_logs_days; @@expire_logs_days 99 -'#----------------------FN_DYNVARS_029_06------------------------#' +'#----------------------FN_DYNVARS_029_06_01------------------------#' SELECT @@global.expire_logs_days = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='expire_logs_days'; @@global.expire_logs_days = VARIABLE_VALUE 1 SELECT @@expire_logs_days = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES +FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='expire_logs_days'; @@expire_logs_days = VARIABLE_VALUE 1 -'#---------------------FN_DYNVARS_029_07----------------------#' +'#---------------------FN_DYNVARS_029_07_01----------------------#' SET @@global.expire_logs_days = TRUE; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead SELECT @@global.expire_logs_days; @@global.expire_logs_days 1 SET @@global.expire_logs_days = FALSE; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead SELECT @@global.expire_logs_days; @@global.expire_logs_days 0 -'#---------------------FN_DYNVARS_029_08----------------------#' +'#---------------------FN_DYNVARS_029_08_01----------------------#' SET @@global.expire_logs_days = 1; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead SELECT @@expire_logs_days = @@global.expire_logs_days; @@expire_logs_days = @@global.expire_logs_days 1 -'#---------------------FN_DYNVARS_029_09----------------------#' +'#---------------------FN_DYNVARS_029_09_01----------------------#' SET expire_logs_days = 1; ERROR HY000: Variable 'expire_logs_days' is a GLOBAL variable and should be set with SET GLOBAL SELECT @@expire_logs_days; @@ -117,3 +150,12 @@ ERROR 42S02: Unknown table 'global' in field list SELECT expire_logs_days = @@session.expire_logs_days; ERROR 42S22: Unknown column 'expire_logs_days' in 'field list' SET @@global.expire_logs_days = @start_value; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead +SELECT @@global.expire_logs_days; +@@global.expire_logs_days +0 +SET @@global.binlog_expire_logs_seconds = @start_value_sec; +SELECT @@global.binlog_expire_logs_seconds; +@@global.binlog_expire_logs_seconds +2592000 diff --git a/mysql-test/suite/sys_vars/r/expire_logs_days_grant.result b/mysql-test/suite/sys_vars/r/expire_logs_days_grant.result index f7a3ddc76c1..1e8146e5de9 100644 --- a/mysql-test/suite/sys_vars/r/expire_logs_days_grant.result +++ b/mysql-test/suite/sys_vars/r/expire_logs_days_grant.result @@ -1,6 +1,8 @@ # # MDEV-21963 Bind BINLOG ADMIN to a number of global system variables # +SELECT @@global.binlog_expire_logs_seconds INTO @old_seconds; +SET @@global.binlog_expire_logs_seconds = 0; SET @global=@@global.expire_logs_days; # Test that "SET expire_logs_days" is not allowed without BINLOG ADMIN or SUPER CREATE USER user1@localhost; @@ -23,6 +25,8 @@ GRANT BINLOG ADMIN ON *.* TO user1@localhost; connect user1,localhost,user1,,; connection user1; SET GLOBAL expire_logs_days=33; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead SET expire_logs_days=33; ERROR HY000: Variable 'expire_logs_days' is a GLOBAL variable and should be set with SET GLOBAL SET SESSION expire_logs_days=33; @@ -36,6 +40,8 @@ GRANT SUPER ON *.* TO user1@localhost; connect user1,localhost,user1,,; connection user1; SET GLOBAL expire_logs_days=33; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead SET expire_logs_days=33; ERROR HY000: Variable 'expire_logs_days' is a GLOBAL variable and should be set with SET GLOBAL SET SESSION expire_logs_days=33; @@ -44,3 +50,6 @@ disconnect user1; connection default; DROP USER user1@localhost; SET @@global.expire_logs_days=@global; +Warnings: +Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use '@@binlog_expire_logs_seconds' instead +SET GLOBAL binlog_expire_logs_seconds= @old_seconds; diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff index c8049d28c35..7ddbc7b062f 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff +++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff @@ -1,5 +1,5 @@ ---- suite/sys_vars/r/sysvars_server_embedded.result 2021-02-02 14:07:21.616784062 +0200 -+++ suite/sys_vars/r/sysvars_server_embedded,32bit.reject 2021-02-02 18:56:53.727764717 +0200 +--- suite/sys_vars/r/sysvars_server_embedded.result 2021-02-08 16:29:33.260023445 +0530 ++++ suite/sys_vars/r/sysvars_server_embedded,32bit.reject 2021-02-08 17:20:55.527936907 +0530 @@ -35,7 +35,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME ARIA_BLOCK_SIZE @@ -164,7 +164,16 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -388,7 +388,7 @@ +@@ -385,7 +385,7 @@ + COMMAND_LINE_ARGUMENT OPTIONAL + VARIABLE_NAME BINLOG_EXPIRE_LOGS_SECONDS + VARIABLE_SCOPE GLOBAL +-VARIABLE_TYPE BIGINT UNSIGNED ++VARIABLE_TYPE INT UNSIGNED + VARIABLE_COMMENT If non-zero, binary logs will be purged after binlog_expire_logs_seconds seconds; If both this option and expire_logs_days are set to non-zero values, this option takes priority. Purges happen at startup and at binary log rotation. + NUMERIC_MIN_VALUE 0 + NUMERIC_MAX_VALUE 4294967295 +@@ -398,7 +398,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT The size of file cache for the binary log NUMERIC_MIN_VALUE 8192 @@ -173,7 +182,7 @@ NUMERIC_BLOCK_SIZE 4096 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -438,7 +438,7 @@ +@@ -448,7 +448,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT The size of the statement cache for updates to non-transactional engines for the binary log. If you often use statements updating a great number of rows, you can increase this to get more performance. NUMERIC_MIN_VALUE 4096 @@ -182,7 +191,7 @@ NUMERIC_BLOCK_SIZE 4096 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -448,7 +448,7 @@ +@@ -458,7 +458,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Size of tree cache used in bulk insert optimisation. Note that this is a limit per thread! NUMERIC_MIN_VALUE 0 @@ -191,7 +200,7 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -635,7 +635,7 @@ +@@ -645,7 +645,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME CONNECT_TIMEOUT VARIABLE_SCOPE GLOBAL @@ -200,7 +209,7 @@ VARIABLE_COMMENT The number of seconds the mysqld server is waiting for a connect packet before responding with 'Bad handshake' NUMERIC_MIN_VALUE 2 NUMERIC_MAX_VALUE 31536000 -@@ -685,7 +685,7 @@ +@@ -695,7 +695,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_LONG VARIABLE_SCOPE SESSION @@ -209,7 +218,7 @@ VARIABLE_COMMENT Long search depth for the two-step deadlock detection NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 33 -@@ -695,7 +695,7 @@ +@@ -705,7 +705,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_SHORT VARIABLE_SCOPE SESSION @@ -218,7 +227,7 @@ VARIABLE_COMMENT Short search depth for the two-step deadlock detection NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 32 -@@ -705,7 +705,7 @@ +@@ -715,7 +715,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME DEADLOCK_TIMEOUT_LONG VARIABLE_SCOPE SESSION @@ -227,7 +236,7 @@ VARIABLE_COMMENT Long timeout for the two-step deadlock detection (in microseconds) NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -715,7 +715,7 @@ +@@ -725,7 +725,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME DEADLOCK_TIMEOUT_SHORT VARIABLE_SCOPE SESSION @@ -236,7 +245,7 @@ VARIABLE_COMMENT Short timeout for the two-step deadlock detection (in microseconds) NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -765,7 +765,7 @@ +@@ -775,7 +775,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME DEFAULT_WEEK_FORMAT VARIABLE_SCOPE SESSION @@ -245,7 +254,7 @@ VARIABLE_COMMENT The default week format used by WEEK() functions NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 7 -@@ -775,7 +775,7 @@ +@@ -785,7 +785,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME DELAYED_INSERT_LIMIT VARIABLE_SCOPE GLOBAL @@ -254,7 +263,7 @@ VARIABLE_COMMENT After inserting delayed_insert_limit rows, the INSERT DELAYED handler will check if there are any SELECT statements pending. If so, it allows these to execute before continuing. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -785,7 +785,7 @@ +@@ -795,7 +795,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME DELAYED_INSERT_TIMEOUT VARIABLE_SCOPE GLOBAL @@ -263,7 +272,7 @@ VARIABLE_COMMENT How long a INSERT DELAYED thread should wait for INSERT statements before terminating NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 31536000 -@@ -795,7 +795,7 @@ +@@ -805,7 +805,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME DELAYED_QUEUE_SIZE VARIABLE_SCOPE GLOBAL @@ -272,7 +281,7 @@ VARIABLE_COMMENT What size queue (in rows) should be allocated for handling INSERT DELAYED. If the queue becomes full, any client that does INSERT DELAYED will wait until there is room in the queue again NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -825,7 +825,7 @@ +@@ -835,7 +835,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME DIV_PRECISION_INCREMENT VARIABLE_SCOPE SESSION @@ -281,16 +290,16 @@ VARIABLE_COMMENT Precision of the result of '/' operator will be increased on that value NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 38 -@@ -905,7 +905,7 @@ +@@ -915,7 +915,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME EXPIRE_LOGS_DAYS VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED +VARIABLE_TYPE INT UNSIGNED - VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; possible purges happen at startup and at binary log rotation + VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; If this option alone is set on the command line or in a configuration file, it overrides the default value for binlog-expire-logs-seconds. If both options are set to nonzero values, binlog-expire-logs-seconds takes priority. Possible purges happen at startup and at binary log rotation. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 99 -@@ -935,7 +935,7 @@ +@@ -945,7 +945,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME EXTRA_MAX_CONNECTIONS VARIABLE_SCOPE GLOBAL @@ -299,7 +308,7 @@ VARIABLE_COMMENT The number of connections on extra-port NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 100000 -@@ -965,7 +965,7 @@ +@@ -975,7 +975,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME FLUSH_TIME VARIABLE_SCOPE GLOBAL @@ -308,7 +317,7 @@ VARIABLE_COMMENT A dedicated thread is created to flush all tables at the given interval NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 31536000 -@@ -995,7 +995,7 @@ +@@ -1005,7 +1005,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME FT_MAX_WORD_LEN VARIABLE_SCOPE GLOBAL @@ -317,7 +326,7 @@ VARIABLE_COMMENT The maximum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable NUMERIC_MIN_VALUE 10 NUMERIC_MAX_VALUE 84 -@@ -1005,7 +1005,7 @@ +@@ -1015,7 +1015,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME FT_MIN_WORD_LEN VARIABLE_SCOPE GLOBAL @@ -326,7 +335,7 @@ VARIABLE_COMMENT The minimum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 84 -@@ -1015,7 +1015,7 @@ +@@ -1025,7 +1025,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME FT_QUERY_EXPANSION_LIMIT VARIABLE_SCOPE GLOBAL @@ -335,7 +344,7 @@ VARIABLE_COMMENT Number of best matches to use for query expansion NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1000 -@@ -1185,7 +1185,7 @@ +@@ -1195,7 +1195,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME HISTOGRAM_SIZE VARIABLE_SCOPE SESSION @@ -344,7 +353,7 @@ VARIABLE_COMMENT Number of bytes used for a histogram. If set to 0, no histograms are created by ANALYZE. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 255 -@@ -1215,7 +1215,7 @@ +@@ -1225,7 +1225,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME HOST_CACHE_SIZE VARIABLE_SCOPE GLOBAL @@ -353,7 +362,7 @@ VARIABLE_COMMENT How many host names should be cached to avoid resolving. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 65536 -@@ -1325,7 +1325,7 @@ +@@ -1335,7 +1335,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME INTERACTIVE_TIMEOUT VARIABLE_SCOPE SESSION @@ -362,7 +371,7 @@ VARIABLE_COMMENT The number of seconds the server waits for activity on an interactive connection before closing it NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 31536000 -@@ -1358,7 +1358,7 @@ +@@ -1368,7 +1368,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT The size of the buffer that is used for joins NUMERIC_MIN_VALUE 128 @@ -371,7 +380,7 @@ NUMERIC_BLOCK_SIZE 128 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1375,7 +1375,7 @@ +@@ -1385,7 +1385,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME JOIN_CACHE_LEVEL VARIABLE_SCOPE SESSION @@ -380,7 +389,7 @@ VARIABLE_COMMENT Controls what join operations can be executed with join buffers. Odd numbers are used for plain join buffers while even numbers are used for linked buffers NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 8 -@@ -1398,7 +1398,7 @@ +@@ -1408,7 +1408,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT The size of the buffer used for index blocks for MyISAM tables. Increase this to get better index handling (for all reads and multiple writes) to as much as you can afford NUMERIC_MIN_VALUE 0 @@ -389,7 +398,7 @@ NUMERIC_BLOCK_SIZE 4096 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1555,7 +1555,7 @@ +@@ -1565,7 +1565,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME LOCK_WAIT_TIMEOUT VARIABLE_SCOPE SESSION @@ -398,7 +407,7 @@ VARIABLE_COMMENT Timeout in seconds to wait for a lock before returning an error. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 31536000 -@@ -1675,7 +1675,7 @@ +@@ -1685,7 +1685,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME LOG_SLOW_RATE_LIMIT VARIABLE_SCOPE SESSION @@ -407,7 +416,7 @@ VARIABLE_COMMENT Write to slow log every #th slow query. Set to 1 to log everything. Increase it to reduce the size of the slow or the performance impact of slow logging NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -1705,7 +1705,7 @@ +@@ -1715,7 +1715,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME LOG_WARNINGS VARIABLE_SCOPE SESSION @@ -416,7 +425,7 @@ VARIABLE_COMMENT Log some not critical warnings to the general log file.Value can be between 0 and 11. Higher values mean more verbosity NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -1755,7 +1755,7 @@ +@@ -1765,7 +1765,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME MAX_ALLOWED_PACKET VARIABLE_SCOPE SESSION @@ -425,7 +434,7 @@ VARIABLE_COMMENT Max packet length to send to or receive from the server NUMERIC_MIN_VALUE 1024 NUMERIC_MAX_VALUE 1073741824 -@@ -1768,14 +1768,14 @@ +@@ -1778,14 +1778,14 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Sets the total size of the transactional cache NUMERIC_MIN_VALUE 4096 @@ -442,7 +451,7 @@ VARIABLE_COMMENT Binary log will be rotated automatically when the size exceeds this value. NUMERIC_MIN_VALUE 4096 NUMERIC_MAX_VALUE 1073741824 -@@ -1788,14 +1788,14 @@ +@@ -1798,14 +1798,14 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Sets the total size of the statement cache NUMERIC_MIN_VALUE 4096 @@ -459,7 +468,7 @@ VARIABLE_COMMENT The number of simultaneous clients allowed NUMERIC_MIN_VALUE 10 NUMERIC_MAX_VALUE 100000 -@@ -1805,7 +1805,7 @@ +@@ -1815,7 +1815,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_CONNECT_ERRORS VARIABLE_SCOPE GLOBAL @@ -468,7 +477,7 @@ VARIABLE_COMMENT If there is more than this number of interrupted connections from a host this host will be blocked from further connections NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -1815,7 +1815,7 @@ +@@ -1825,7 +1825,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_DELAYED_THREADS VARIABLE_SCOPE SESSION @@ -477,7 +486,7 @@ VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 16384 -@@ -1835,7 +1835,7 @@ +@@ -1845,7 +1845,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_ERROR_COUNT VARIABLE_SCOPE SESSION @@ -486,7 +495,7 @@ VARIABLE_COMMENT Max number of errors/warnings to store for a statement NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 65535 -@@ -1848,14 +1848,14 @@ +@@ -1858,14 +1858,14 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Don't allow creation of heap tables bigger than this NUMERIC_MIN_VALUE 16384 @@ -503,7 +512,7 @@ VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 16384 -@@ -1875,7 +1875,7 @@ +@@ -1885,7 +1885,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_LENGTH_FOR_SORT_DATA VARIABLE_SCOPE SESSION @@ -512,7 +521,7 @@ VARIABLE_COMMENT Max number of bytes in sorted records NUMERIC_MIN_VALUE 4 NUMERIC_MAX_VALUE 8388608 -@@ -1905,7 +1905,7 @@ +@@ -1915,7 +1915,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_RECURSIVE_ITERATIONS VARIABLE_SCOPE SESSION @@ -521,7 +530,7 @@ VARIABLE_COMMENT Maximum number of iterations when executing recursive queries NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -1918,14 +1918,14 @@ +@@ -1928,14 +1928,14 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT The maximum size of the container of a rowid filter NUMERIC_MIN_VALUE 1024 @@ -538,7 +547,7 @@ VARIABLE_COMMENT Limit assumed max number of seeks when looking up rows based on a key NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -1945,7 +1945,7 @@ +@@ -1955,7 +1955,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_SORT_LENGTH VARIABLE_SCOPE SESSION @@ -547,7 +556,7 @@ VARIABLE_COMMENT The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored) NUMERIC_MIN_VALUE 64 NUMERIC_MAX_VALUE 8388608 -@@ -1955,7 +1955,7 @@ +@@ -1965,7 +1965,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_SP_RECURSION_DEPTH VARIABLE_SCOPE SESSION @@ -556,7 +565,7 @@ VARIABLE_COMMENT Maximum stored procedure recursion depth NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 255 -@@ -1975,7 +1975,7 @@ +@@ -1985,7 +1985,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_TMP_TABLES VARIABLE_SCOPE SESSION @@ -565,7 +574,7 @@ VARIABLE_COMMENT Unused, will be removed. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -1995,7 +1995,7 @@ +@@ -2005,7 +2005,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_WRITE_LOCK_COUNT VARIABLE_SCOPE GLOBAL @@ -574,7 +583,7 @@ VARIABLE_COMMENT After this many write locks, allow some read locks to run in between NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -2005,7 +2005,7 @@ +@@ -2015,7 +2015,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME METADATA_LOCKS_CACHE_SIZE VARIABLE_SCOPE GLOBAL @@ -583,7 +592,7 @@ VARIABLE_COMMENT Unused NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 1048576 -@@ -2015,7 +2015,7 @@ +@@ -2025,7 +2025,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME METADATA_LOCKS_HASH_INSTANCES VARIABLE_SCOPE GLOBAL @@ -592,7 +601,7 @@ VARIABLE_COMMENT Unused NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 1024 -@@ -2025,7 +2025,7 @@ +@@ -2035,7 +2035,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MIN_EXAMINED_ROW_LIMIT VARIABLE_SCOPE SESSION @@ -601,7 +610,7 @@ VARIABLE_COMMENT Don't write queries to slow log that examine fewer rows than that NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -2035,7 +2035,7 @@ +@@ -2045,7 +2045,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MRR_BUFFER_SIZE VARIABLE_SCOPE SESSION @@ -610,7 +619,7 @@ VARIABLE_COMMENT Size of buffer to use when using MRR with range access NUMERIC_MIN_VALUE 8192 NUMERIC_MAX_VALUE 2147483647 -@@ -2045,7 +2045,7 @@ +@@ -2055,7 +2055,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MYISAM_BLOCK_SIZE VARIABLE_SCOPE GLOBAL @@ -619,7 +628,7 @@ VARIABLE_COMMENT Block size to be used for MyISAM index pages NUMERIC_MIN_VALUE 1024 NUMERIC_MAX_VALUE 16384 -@@ -2055,7 +2055,7 @@ +@@ -2065,7 +2065,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MYISAM_DATA_POINTER_SIZE VARIABLE_SCOPE GLOBAL @@ -628,7 +637,7 @@ VARIABLE_COMMENT Default pointer size to be used for MyISAM tables NUMERIC_MIN_VALUE 2 NUMERIC_MAX_VALUE 7 -@@ -2078,7 +2078,7 @@ +@@ -2088,7 +2088,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Restricts the total memory used for memory mapping of MySQL tables NUMERIC_MIN_VALUE 7 @@ -637,7 +646,7 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY YES -@@ -2095,10 +2095,10 @@ +@@ -2105,10 +2105,10 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME MYISAM_REPAIR_THREADS VARIABLE_SCOPE SESSION @@ -650,7 +659,7 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -2108,7 +2108,7 @@ +@@ -2118,7 +2118,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE NUMERIC_MIN_VALUE 4096 @@ -659,7 +668,7 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -2145,7 +2145,7 @@ +@@ -2155,7 +2155,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME NET_BUFFER_LENGTH VARIABLE_SCOPE SESSION @@ -668,7 +677,7 @@ VARIABLE_COMMENT Buffer length for TCP/IP and socket communication NUMERIC_MIN_VALUE 1024 NUMERIC_MAX_VALUE 1048576 -@@ -2155,7 +2155,7 @@ +@@ -2165,7 +2165,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME NET_READ_TIMEOUT VARIABLE_SCOPE SESSION @@ -677,7 +686,7 @@ VARIABLE_COMMENT Number of seconds to wait for more data from a connection before aborting the read NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 31536000 -@@ -2165,7 +2165,7 @@ +@@ -2175,7 +2175,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME NET_RETRY_COUNT VARIABLE_SCOPE SESSION @@ -686,7 +695,7 @@ VARIABLE_COMMENT If a read on a communication port is interrupted, retry this many times before giving up NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -2175,7 +2175,7 @@ +@@ -2185,7 +2185,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME NET_WRITE_TIMEOUT VARIABLE_SCOPE SESSION @@ -695,7 +704,7 @@ VARIABLE_COMMENT Number of seconds to wait for a block to be written to a connection before aborting the write NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 31536000 -@@ -2225,7 +2225,7 @@ +@@ -2235,7 +2235,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME OPEN_FILES_LIMIT VARIABLE_SCOPE GLOBAL @@ -704,7 +713,7 @@ VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 or autoset then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -2235,17 +2235,17 @@ +@@ -2245,17 +2245,17 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME OPTIMIZER_MAX_SEL_ARG_WEIGHT VARIABLE_SCOPE SESSION @@ -725,7 +734,7 @@ VARIABLE_COMMENT Controls the heuristic(s) applied during query optimization to prune less-promising partial plans from the optimizer search space. Meaning: 0 - do not apply any heuristic, thus perform exhaustive search; 1 - prune plans based on number of retrieved rows NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1 -@@ -2255,7 +2255,7 @@ +@@ -2265,7 +2265,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME OPTIMIZER_SEARCH_DEPTH VARIABLE_SCOPE SESSION @@ -734,7 +743,7 @@ VARIABLE_COMMENT Maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to compile a query. Values smaller than the number of tables in a relation result in faster optimization, but may produce very bad query plans. If set to 0, the system will automatically pick a reasonable value. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 62 -@@ -2265,7 +2265,7 @@ +@@ -2275,7 +2275,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME OPTIMIZER_SELECTIVITY_SAMPLING_LIMIT VARIABLE_SCOPE SESSION @@ -743,7 +752,7 @@ VARIABLE_COMMENT Controls number of record samples to check condition selectivity NUMERIC_MIN_VALUE 10 NUMERIC_MAX_VALUE 4294967295 -@@ -2295,17 +2295,17 @@ +@@ -2305,17 +2305,17 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME OPTIMIZER_TRACE_MAX_MEM_SIZE VARIABLE_SCOPE SESSION @@ -764,7 +773,7 @@ VARIABLE_COMMENT Controls selectivity of which conditions the optimizer takes into account to calculate cardinality of a partial join when it searches for the best execution plan Meaning: 1 - use selectivity of index backed range conditions to calculate the cardinality of a partial join if the last joined table is accessed by full table scan or an index scan, 2 - use selectivity of index backed range conditions to calculate the cardinality of a partial join in any case, 3 - additionally always use selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join, 4 - use histograms to calculate selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join.5 - additionally use selectivity of certain non-range predicates calculated on record samples NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 5 -@@ -2325,7 +2325,7 @@ +@@ -2335,7 +2335,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME PERFORMANCE_SCHEMA_ACCOUNTS_SIZE VARIABLE_SCOPE GLOBAL @@ -773,7 +782,7 @@ VARIABLE_COMMENT Maximum number of instrumented user@host accounts. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2335,7 +2335,7 @@ +@@ -2345,7 +2345,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_DIGESTS_SIZE VARIABLE_SCOPE GLOBAL @@ -782,7 +791,7 @@ VARIABLE_COMMENT Size of the statement digest. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2345,7 +2345,7 @@ +@@ -2355,7 +2355,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_LONG_SIZE VARIABLE_SCOPE GLOBAL @@ -791,7 +800,7 @@ VARIABLE_COMMENT Number of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2355,7 +2355,7 @@ +@@ -2365,7 +2365,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_SIZE VARIABLE_SCOPE GLOBAL @@ -800,7 +809,7 @@ VARIABLE_COMMENT Number of rows per thread in EVENTS_STAGES_HISTORY. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1024 -@@ -2365,7 +2365,7 @@ +@@ -2375,7 +2375,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_LONG_SIZE VARIABLE_SCOPE GLOBAL @@ -809,7 +818,7 @@ VARIABLE_COMMENT Number of rows in EVENTS_STATEMENTS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2375,7 +2375,7 @@ +@@ -2385,7 +2385,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_SIZE VARIABLE_SCOPE GLOBAL @@ -818,7 +827,7 @@ VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_HISTORY. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1024 -@@ -2385,7 +2385,7 @@ +@@ -2395,7 +2395,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_LONG_SIZE VARIABLE_SCOPE GLOBAL @@ -827,7 +836,7 @@ VARIABLE_COMMENT Number of rows in EVENTS_TRANSACTIONS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2395,7 +2395,7 @@ +@@ -2405,7 +2405,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_SIZE VARIABLE_SCOPE GLOBAL @@ -836,7 +845,7 @@ VARIABLE_COMMENT Number of rows per thread in EVENTS_TRANSACTIONS_HISTORY. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1024 -@@ -2405,7 +2405,7 @@ +@@ -2415,7 +2415,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE VARIABLE_SCOPE GLOBAL @@ -845,7 +854,7 @@ VARIABLE_COMMENT Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2415,7 +2415,7 @@ +@@ -2425,7 +2425,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE VARIABLE_SCOPE GLOBAL @@ -854,7 +863,7 @@ VARIABLE_COMMENT Number of rows per thread in EVENTS_WAITS_HISTORY. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1024 -@@ -2425,7 +2425,7 @@ +@@ -2435,7 +2435,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_HOSTS_SIZE VARIABLE_SCOPE GLOBAL @@ -863,7 +872,7 @@ VARIABLE_COMMENT Maximum number of instrumented hosts. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2435,7 +2435,7 @@ +@@ -2445,7 +2445,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_CLASSES VARIABLE_SCOPE GLOBAL @@ -872,7 +881,7 @@ VARIABLE_COMMENT Maximum number of condition instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 256 -@@ -2445,7 +2445,7 @@ +@@ -2455,7 +2455,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_INSTANCES VARIABLE_SCOPE GLOBAL @@ -881,7 +890,7 @@ VARIABLE_COMMENT Maximum number of instrumented condition objects. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2455,7 +2455,7 @@ +@@ -2465,7 +2465,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_DIGEST_LENGTH VARIABLE_SCOPE GLOBAL @@ -890,7 +899,7 @@ VARIABLE_COMMENT Maximum length considered for digest text, when stored in performance_schema tables. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1048576 -@@ -2465,7 +2465,7 @@ +@@ -2475,7 +2475,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_CLASSES VARIABLE_SCOPE GLOBAL @@ -899,7 +908,7 @@ VARIABLE_COMMENT Maximum number of file instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 256 -@@ -2475,7 +2475,7 @@ +@@ -2485,7 +2485,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_HANDLES VARIABLE_SCOPE GLOBAL @@ -908,7 +917,7 @@ VARIABLE_COMMENT Maximum number of opened instrumented files. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1048576 -@@ -2485,7 +2485,7 @@ +@@ -2495,7 +2495,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_INSTANCES VARIABLE_SCOPE GLOBAL @@ -917,7 +926,7 @@ VARIABLE_COMMENT Maximum number of instrumented files. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2495,7 +2495,7 @@ +@@ -2505,7 +2505,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_INDEX_STAT VARIABLE_SCOPE GLOBAL @@ -926,7 +935,7 @@ VARIABLE_COMMENT Maximum number of index statistics for instrumented tables. Use 0 to disable, -1 for automated scaling. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2505,7 +2505,7 @@ +@@ -2515,7 +2515,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MEMORY_CLASSES VARIABLE_SCOPE GLOBAL @@ -935,7 +944,7 @@ VARIABLE_COMMENT Maximum number of memory pool instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1024 -@@ -2515,7 +2515,7 @@ +@@ -2525,7 +2525,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_METADATA_LOCKS VARIABLE_SCOPE GLOBAL @@ -944,7 +953,7 @@ VARIABLE_COMMENT Maximum number of metadata locks. Use 0 to disable, -1 for automated scaling. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 104857600 -@@ -2525,7 +2525,7 @@ +@@ -2535,7 +2535,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES VARIABLE_SCOPE GLOBAL @@ -953,7 +962,7 @@ VARIABLE_COMMENT Maximum number of mutex instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 256 -@@ -2535,7 +2535,7 @@ +@@ -2545,7 +2545,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES VARIABLE_SCOPE GLOBAL @@ -962,7 +971,7 @@ VARIABLE_COMMENT Maximum number of instrumented MUTEX objects. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 104857600 -@@ -2545,7 +2545,7 @@ +@@ -2555,7 +2555,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_PREPARED_STATEMENTS_INSTANCES VARIABLE_SCOPE GLOBAL @@ -971,7 +980,7 @@ VARIABLE_COMMENT Maximum number of instrumented prepared statements. Use 0 to disable, -1 for automated scaling. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2555,7 +2555,7 @@ +@@ -2565,7 +2565,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_PROGRAM_INSTANCES VARIABLE_SCOPE GLOBAL @@ -980,7 +989,7 @@ VARIABLE_COMMENT Maximum number of instrumented programs. Use 0 to disable, -1 for automated scaling. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2565,7 +2565,7 @@ +@@ -2575,7 +2575,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES VARIABLE_SCOPE GLOBAL @@ -989,7 +998,7 @@ VARIABLE_COMMENT Maximum number of rwlock instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 256 -@@ -2575,7 +2575,7 @@ +@@ -2585,7 +2585,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCES VARIABLE_SCOPE GLOBAL @@ -998,7 +1007,7 @@ VARIABLE_COMMENT Maximum number of instrumented RWLOCK objects. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 104857600 -@@ -2585,7 +2585,7 @@ +@@ -2595,7 +2595,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_CLASSES VARIABLE_SCOPE GLOBAL @@ -1007,7 +1016,7 @@ VARIABLE_COMMENT Maximum number of socket instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 256 -@@ -2595,7 +2595,7 @@ +@@ -2605,7 +2605,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_INSTANCES VARIABLE_SCOPE GLOBAL @@ -1016,7 +1025,7 @@ VARIABLE_COMMENT Maximum number of opened instrumented sockets. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2605,7 +2605,7 @@ +@@ -2615,7 +2615,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SQL_TEXT_LENGTH VARIABLE_SCOPE GLOBAL @@ -1025,7 +1034,7 @@ VARIABLE_COMMENT Maximum length of displayed sql text. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1048576 -@@ -2615,7 +2615,7 @@ +@@ -2625,7 +2625,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STAGE_CLASSES VARIABLE_SCOPE GLOBAL @@ -1034,7 +1043,7 @@ VARIABLE_COMMENT Maximum number of stage instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 256 -@@ -2625,7 +2625,7 @@ +@@ -2635,7 +2635,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES VARIABLE_SCOPE GLOBAL @@ -1043,7 +1052,7 @@ VARIABLE_COMMENT Maximum number of statement instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 256 -@@ -2635,7 +2635,7 @@ +@@ -2645,7 +2645,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_STACK VARIABLE_SCOPE GLOBAL @@ -1052,7 +1061,7 @@ VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_CURRENT. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 256 -@@ -2645,7 +2645,7 @@ +@@ -2655,7 +2655,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES VARIABLE_SCOPE GLOBAL @@ -1061,7 +1070,7 @@ VARIABLE_COMMENT Maximum number of opened instrumented tables. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2655,7 +2655,7 @@ +@@ -2665,7 +2665,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_INSTANCES VARIABLE_SCOPE GLOBAL @@ -1070,7 +1079,7 @@ VARIABLE_COMMENT Maximum number of instrumented tables. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2665,7 +2665,7 @@ +@@ -2675,7 +2675,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_LOCK_STAT VARIABLE_SCOPE GLOBAL @@ -1079,7 +1088,7 @@ VARIABLE_COMMENT Maximum number of lock statistics for instrumented tables. Use 0 to disable, -1 for automated scaling. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2675,7 +2675,7 @@ +@@ -2685,7 +2685,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES VARIABLE_SCOPE GLOBAL @@ -1088,7 +1097,7 @@ VARIABLE_COMMENT Maximum number of thread instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 256 -@@ -2685,7 +2685,7 @@ +@@ -2695,7 +2695,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES VARIABLE_SCOPE GLOBAL @@ -1097,7 +1106,7 @@ VARIABLE_COMMENT Maximum number of instrumented threads. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2695,7 +2695,7 @@ +@@ -2705,7 +2705,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE VARIABLE_SCOPE GLOBAL @@ -1106,7 +1115,7 @@ VARIABLE_COMMENT Size of session attribute string buffer per thread. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2705,7 +2705,7 @@ +@@ -2715,7 +2715,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_ACTORS_SIZE VARIABLE_SCOPE GLOBAL @@ -1115,7 +1124,7 @@ VARIABLE_COMMENT Maximum number of rows in SETUP_ACTORS. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1024 -@@ -2715,7 +2715,7 @@ +@@ -2725,7 +2725,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_OBJECTS_SIZE VARIABLE_SCOPE GLOBAL @@ -1124,7 +1133,7 @@ VARIABLE_COMMENT Maximum number of rows in SETUP_OBJECTS. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2725,7 +2725,7 @@ +@@ -2735,7 +2735,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_USERS_SIZE VARIABLE_SCOPE GLOBAL @@ -1133,7 +1142,7 @@ VARIABLE_COMMENT Maximum number of instrumented users. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2775,7 +2775,7 @@ +@@ -2785,7 +2785,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PRELOAD_BUFFER_SIZE VARIABLE_SCOPE SESSION @@ -1142,7 +1151,7 @@ VARIABLE_COMMENT The size of the buffer that is allocated when preloading indexes NUMERIC_MIN_VALUE 1024 NUMERIC_MAX_VALUE 1073741824 -@@ -2795,7 +2795,7 @@ +@@ -2805,7 +2805,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME PROFILING_HISTORY_SIZE VARIABLE_SCOPE SESSION @@ -1151,7 +1160,7 @@ VARIABLE_COMMENT Number of statements about which profiling information is maintained. If set to 0, no profiles are stored. See SHOW PROFILES. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 100 -@@ -2805,7 +2805,7 @@ +@@ -2815,7 +2815,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PROGRESS_REPORT_TIME VARIABLE_SCOPE SESSION @@ -1160,7 +1169,7 @@ VARIABLE_COMMENT Seconds between sending progress reports to the client for time-consuming statements. Set to 0 to disable progress reporting. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -2865,7 +2865,7 @@ +@@ -2875,7 +2875,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME QUERY_ALLOC_BLOCK_SIZE VARIABLE_SCOPE SESSION @@ -1169,7 +1178,7 @@ VARIABLE_COMMENT Allocation block size for query parsing and execution NUMERIC_MIN_VALUE 1024 NUMERIC_MAX_VALUE 4294967295 -@@ -2875,7 +2875,7 @@ +@@ -2885,7 +2885,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME QUERY_CACHE_LIMIT VARIABLE_SCOPE GLOBAL @@ -1178,7 +1187,7 @@ VARIABLE_COMMENT Don't cache results that are bigger than this NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -2885,7 +2885,7 @@ +@@ -2895,7 +2895,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME QUERY_CACHE_MIN_RES_UNIT VARIABLE_SCOPE GLOBAL @@ -1187,7 +1196,7 @@ VARIABLE_COMMENT The minimum size for blocks allocated by the query cache NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -2898,7 +2898,7 @@ +@@ -2908,7 +2908,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT The memory allocated to store results from old queries NUMERIC_MIN_VALUE 0 @@ -1196,7 +1205,7 @@ NUMERIC_BLOCK_SIZE 1024 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -2935,7 +2935,7 @@ +@@ -2945,7 +2945,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME QUERY_PREALLOC_SIZE VARIABLE_SCOPE SESSION @@ -1205,7 +1214,7 @@ VARIABLE_COMMENT Persistent buffer for query parsing and execution NUMERIC_MIN_VALUE 1024 NUMERIC_MAX_VALUE 4294967295 -@@ -2948,7 +2948,7 @@ +@@ -2958,7 +2958,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes NUMERIC_MIN_VALUE 0 @@ -1214,7 +1223,7 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -2958,14 +2958,14 @@ +@@ -2968,14 +2968,14 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes NUMERIC_MIN_VALUE 0 @@ -1231,7 +1240,7 @@ VARIABLE_COMMENT Allocation block size for storing ranges during optimization NUMERIC_MIN_VALUE 4096 NUMERIC_MAX_VALUE 4294967295 -@@ -2975,7 +2975,7 @@ +@@ -2985,7 +2985,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME READ_BUFFER_SIZE VARIABLE_SCOPE SESSION @@ -1240,7 +1249,7 @@ VARIABLE_COMMENT Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value NUMERIC_MIN_VALUE 8192 NUMERIC_MAX_VALUE 2147483647 -@@ -2995,7 +2995,7 @@ +@@ -3005,7 +3005,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME READ_RND_BUFFER_SIZE VARIABLE_SCOPE SESSION @@ -1249,7 +1258,7 @@ VARIABLE_COMMENT When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 2147483647 -@@ -3015,10 +3015,10 @@ +@@ -3025,10 +3025,10 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME ROWID_MERGE_BUFF_SIZE VARIABLE_SCOPE SESSION @@ -1262,7 +1271,7 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -3055,7 +3055,7 @@ +@@ -3065,7 +3065,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME SERVER_ID VARIABLE_SCOPE SESSION @@ -1271,7 +1280,7 @@ VARIABLE_COMMENT Uniquely identifies the server instance in the community of replication partners NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -3125,7 +3125,7 @@ +@@ -3135,7 +3135,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME SLAVE_MAX_ALLOWED_PACKET VARIABLE_SCOPE GLOBAL @@ -1280,7 +1289,7 @@ VARIABLE_COMMENT The maximum packet length to sent successfully from the master to slave. NUMERIC_MIN_VALUE 1024 NUMERIC_MAX_VALUE 1073741824 -@@ -3135,7 +3135,7 @@ +@@ -3145,7 +3145,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME SLOW_LAUNCH_TIME VARIABLE_SCOPE GLOBAL @@ -1289,7 +1298,7 @@ VARIABLE_COMMENT If creating the thread takes longer than this value (in seconds), the Slow_launch_threads counter will be incremented NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 31536000 -@@ -3178,7 +3178,7 @@ +@@ -3188,7 +3188,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Each thread that needs to do a sort allocates a buffer of this size NUMERIC_MIN_VALUE 1024 @@ -1298,7 +1307,7 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -3395,7 +3395,7 @@ +@@ -3405,7 +3405,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME STORED_PROGRAM_CACHE VARIABLE_SCOPE GLOBAL @@ -1307,7 +1316,7 @@ VARIABLE_COMMENT The soft upper limit for number of cached stored routines for one connection. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 524288 -@@ -3475,7 +3475,7 @@ +@@ -3485,7 +3485,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME TABLE_DEFINITION_CACHE VARIABLE_SCOPE GLOBAL @@ -1316,7 +1325,7 @@ VARIABLE_COMMENT The number of cached table definitions NUMERIC_MIN_VALUE 400 NUMERIC_MAX_VALUE 2097152 -@@ -3485,7 +3485,7 @@ +@@ -3495,7 +3495,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME TABLE_OPEN_CACHE VARIABLE_SCOPE GLOBAL @@ -1325,7 +1334,7 @@ VARIABLE_COMMENT The number of cached open tables NUMERIC_MIN_VALUE 10 NUMERIC_MAX_VALUE 1048576 -@@ -3545,7 +3545,7 @@ +@@ -3555,7 +3555,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME THREAD_CACHE_SIZE VARIABLE_SCOPE GLOBAL @@ -1334,7 +1343,7 @@ VARIABLE_COMMENT How many threads we should keep in a cache for reuse. These are freed after 5 minutes of idle time NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 16384 -@@ -3628,7 +3628,7 @@ +@@ -3638,7 +3638,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Max size for data for an internal temporary on-disk MyISAM or Aria table. NUMERIC_MIN_VALUE 1024 @@ -1343,7 +1352,7 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -3638,7 +3638,7 @@ +@@ -3648,7 +3648,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table. Same as tmp_table_size. NUMERIC_MIN_VALUE 0 @@ -1352,7 +1361,7 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -3648,14 +3648,14 @@ +@@ -3658,14 +3658,14 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Alias for tmp_memory_table_size. If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table. NUMERIC_MIN_VALUE 0 @@ -1369,7 +1378,7 @@ VARIABLE_COMMENT Allocation block size for transactions to be stored in binary log NUMERIC_MIN_VALUE 1024 NUMERIC_MAX_VALUE 134217728 -@@ -3665,7 +3665,7 @@ +@@ -3675,7 +3675,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME TRANSACTION_PREALLOC_SIZE VARIABLE_SCOPE SESSION @@ -1378,7 +1387,7 @@ VARIABLE_COMMENT Persistent buffer for transactions to be stored in binary log NUMERIC_MIN_VALUE 1024 NUMERIC_MAX_VALUE 134217728 -@@ -3805,7 +3805,7 @@ +@@ -3815,7 +3815,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME WAIT_TIMEOUT VARIABLE_SCOPE SESSION @@ -1387,7 +1396,7 @@ VARIABLE_COMMENT The number of seconds the server waits for activity on a connection before closing it NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 31536000 -@@ -3832,7 +3832,7 @@ +@@ -3842,7 +3842,7 @@ VARIABLE_NAME LOG_TC_SIZE GLOBAL_VALUE_ORIGIN AUTO VARIABLE_SCOPE GLOBAL diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result index e4ab38f611d..c671ec28fbb 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result @@ -383,6 +383,16 @@ NUMERIC_BLOCK_SIZE NULL ENUM_VALUE_LIST OFF,ON READ_ONLY NO COMMAND_LINE_ARGUMENT OPTIONAL +VARIABLE_NAME BINLOG_EXPIRE_LOGS_SECONDS +VARIABLE_SCOPE GLOBAL +VARIABLE_TYPE BIGINT UNSIGNED +VARIABLE_COMMENT If non-zero, binary logs will be purged after binlog_expire_logs_seconds seconds; If both this option and expire_logs_days are set to non-zero values, this option takes priority. Purges happen at startup and at binary log rotation. +NUMERIC_MIN_VALUE 0 +NUMERIC_MAX_VALUE 4294967295 +NUMERIC_BLOCK_SIZE 1 +ENUM_VALUE_LIST NULL +READ_ONLY NO +COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME BINLOG_FILE_CACHE_SIZE VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BIGINT UNSIGNED @@ -906,7 +916,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME EXPIRE_LOGS_DAYS VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; possible purges happen at startup and at binary log rotation +VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; If this option alone is set on the command line or in a configuration file, it overrides the default value for binlog-expire-logs-seconds. If both options are set to nonzero values, binlog-expire-logs-seconds takes priority. Possible purges happen at startup and at binary log rotation. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 99 NUMERIC_BLOCK_SIZE 1 diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff index 3ce1ed7b082..9322ff8a7c1 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff +++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff @@ -1,5 +1,5 @@ ---- sysvars_server_notembedded.result 2020-04-29 11:35:30.046243428 +0300 -+++ sysvars_server_notembedded,32bit.reject 2020-04-30 11:45:50.488748076 +0300 +--- suite/sys_vars/r/sysvars_server_notembedded.result 2021-02-05 14:58:30.945014441 +0530 ++++ suite/sys_vars/r/sysvars_server_notembedded,32bit.reject 2021-02-08 14:05:18.007587723 +0530 @@ -35,7 +35,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME ARIA_BLOCK_SIZE @@ -164,7 +164,16 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -388,7 +388,7 @@ +@@ -385,7 +385,7 @@ + COMMAND_LINE_ARGUMENT OPTIONAL + VARIABLE_NAME BINLOG_EXPIRE_LOGS_SECONDS + VARIABLE_SCOPE GLOBAL +-VARIABLE_TYPE BIGINT UNSIGNED ++VARIABLE_TYPE INT UNSIGNED + VARIABLE_COMMENT If non-zero, binary logs will be purged after binlog_expire_logs_seconds seconds; If both this option and expire_logs_days are set to non-zero values, this option takes priority. Purges happen at startup and at binary log rotation. + NUMERIC_MIN_VALUE 0 + NUMERIC_MAX_VALUE 4294967295 +@@ -398,7 +398,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT The size of file cache for the binary log NUMERIC_MIN_VALUE 8192 @@ -173,7 +182,7 @@ NUMERIC_BLOCK_SIZE 4096 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -438,7 +438,7 @@ +@@ -448,7 +448,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT The size of the statement cache for updates to non-transactional engines for the binary log. If you often use statements updating a great number of rows, you can increase this to get more performance. NUMERIC_MIN_VALUE 4096 @@ -182,7 +191,7 @@ NUMERIC_BLOCK_SIZE 4096 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -448,7 +448,7 @@ +@@ -458,7 +458,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Size of tree cache used in bulk insert optimisation. Note that this is a limit per thread! NUMERIC_MIN_VALUE 0 @@ -191,7 +200,7 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -635,7 +635,7 @@ +@@ -645,7 +645,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME CONNECT_TIMEOUT VARIABLE_SCOPE GLOBAL @@ -200,7 +209,7 @@ VARIABLE_COMMENT The number of seconds the mysqld server is waiting for a connect packet before responding with 'Bad handshake' NUMERIC_MIN_VALUE 2 NUMERIC_MAX_VALUE 31536000 -@@ -685,7 +685,7 @@ +@@ -695,7 +695,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_LONG VARIABLE_SCOPE SESSION @@ -209,7 +218,7 @@ VARIABLE_COMMENT Long search depth for the two-step deadlock detection NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 33 -@@ -695,7 +695,7 @@ +@@ -705,7 +705,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_SHORT VARIABLE_SCOPE SESSION @@ -218,7 +227,7 @@ VARIABLE_COMMENT Short search depth for the two-step deadlock detection NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 32 -@@ -705,7 +705,7 @@ +@@ -715,7 +715,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME DEADLOCK_TIMEOUT_LONG VARIABLE_SCOPE SESSION @@ -227,7 +236,7 @@ VARIABLE_COMMENT Long timeout for the two-step deadlock detection (in microseconds) NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -715,7 +715,7 @@ +@@ -725,7 +725,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME DEADLOCK_TIMEOUT_SHORT VARIABLE_SCOPE SESSION @@ -236,7 +245,7 @@ VARIABLE_COMMENT Short timeout for the two-step deadlock detection (in microseconds) NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -775,7 +775,7 @@ +@@ -785,7 +785,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME DEFAULT_WEEK_FORMAT VARIABLE_SCOPE SESSION @@ -245,7 +254,7 @@ VARIABLE_COMMENT The default week format used by WEEK() functions NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 7 -@@ -785,7 +785,7 @@ +@@ -795,7 +795,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME DELAYED_INSERT_LIMIT VARIABLE_SCOPE GLOBAL @@ -254,7 +263,7 @@ VARIABLE_COMMENT After inserting delayed_insert_limit rows, the INSERT DELAYED handler will check if there are any SELECT statements pending. If so, it allows these to execute before continuing. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -795,7 +795,7 @@ +@@ -805,7 +805,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME DELAYED_INSERT_TIMEOUT VARIABLE_SCOPE GLOBAL @@ -263,7 +272,7 @@ VARIABLE_COMMENT How long a INSERT DELAYED thread should wait for INSERT statements before terminating NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 31536000 -@@ -805,7 +805,7 @@ +@@ -815,7 +815,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME DELAYED_QUEUE_SIZE VARIABLE_SCOPE GLOBAL @@ -272,7 +281,7 @@ VARIABLE_COMMENT What size queue (in rows) should be allocated for handling INSERT DELAYED. If the queue becomes full, any client that does INSERT DELAYED will wait until there is room in the queue again NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -835,7 +835,7 @@ +@@ -845,7 +845,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME DIV_PRECISION_INCREMENT VARIABLE_SCOPE SESSION @@ -281,16 +290,16 @@ VARIABLE_COMMENT Precision of the result of '/' operator will be increased on that value NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 38 -@@ -925,7 +925,7 @@ +@@ -935,7 +935,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME EXPIRE_LOGS_DAYS VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED +VARIABLE_TYPE INT UNSIGNED - VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; possible purges happen at startup and at binary log rotation + VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; If this option alone is set on the command line or in a configuration file, it overrides the default value for binlog-expire-logs-seconds. If both options are set to nonzero values, binlog-expire-logs-seconds takes priority. Possible purges happen at startup and at binary log rotation. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 99 -@@ -955,7 +955,7 @@ +@@ -965,7 +965,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME EXTRA_MAX_CONNECTIONS VARIABLE_SCOPE GLOBAL @@ -299,7 +308,7 @@ VARIABLE_COMMENT The number of connections on extra-port NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 100000 -@@ -985,7 +985,7 @@ +@@ -995,7 +995,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME FLUSH_TIME VARIABLE_SCOPE GLOBAL @@ -308,7 +317,7 @@ VARIABLE_COMMENT A dedicated thread is created to flush all tables at the given interval NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 31536000 -@@ -1015,7 +1015,7 @@ +@@ -1025,7 +1025,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME FT_MAX_WORD_LEN VARIABLE_SCOPE GLOBAL @@ -317,7 +326,7 @@ VARIABLE_COMMENT The maximum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable NUMERIC_MIN_VALUE 10 NUMERIC_MAX_VALUE 84 -@@ -1025,7 +1025,7 @@ +@@ -1035,7 +1035,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME FT_MIN_WORD_LEN VARIABLE_SCOPE GLOBAL @@ -326,7 +335,7 @@ VARIABLE_COMMENT The minimum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 84 -@@ -1035,7 +1035,7 @@ +@@ -1045,7 +1045,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME FT_QUERY_EXPANSION_LIMIT VARIABLE_SCOPE GLOBAL @@ -335,16 +344,7 @@ VARIABLE_COMMENT Number of best matches to use for query expansion NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1000 -@@ -1078,7 +1078,7 @@ - VARIABLE_TYPE BIGINT UNSIGNED - VARIABLE_COMMENT The maximum length of the result of function GROUP_CONCAT() - NUMERIC_MIN_VALUE 4 --NUMERIC_MAX_VALUE 18446744073709551615 -+NUMERIC_MAX_VALUE 4294967295 - NUMERIC_BLOCK_SIZE 1 - ENUM_VALUE_LIST NULL - READ_ONLY NO -@@ -1285,7 +1285,7 @@ +@@ -1295,7 +1295,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME HISTOGRAM_SIZE VARIABLE_SCOPE SESSION @@ -353,7 +353,7 @@ VARIABLE_COMMENT Number of bytes used for a histogram. If set to 0, no histograms are created by ANALYZE. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 255 -@@ -1315,7 +1315,7 @@ +@@ -1325,7 +1325,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME HOST_CACHE_SIZE VARIABLE_SCOPE GLOBAL @@ -362,7 +362,7 @@ VARIABLE_COMMENT How many host names should be cached to avoid resolving. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 65536 -@@ -1425,7 +1425,7 @@ +@@ -1435,7 +1435,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME INTERACTIVE_TIMEOUT VARIABLE_SCOPE SESSION @@ -371,7 +371,7 @@ VARIABLE_COMMENT The number of seconds the server waits for activity on an interactive connection before closing it NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 31536000 -@@ -1458,7 +1458,7 @@ +@@ -1468,7 +1468,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT The size of the buffer that is used for joins NUMERIC_MIN_VALUE 128 @@ -380,7 +380,7 @@ NUMERIC_BLOCK_SIZE 128 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1475,7 +1475,7 @@ +@@ -1485,7 +1485,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME JOIN_CACHE_LEVEL VARIABLE_SCOPE SESSION @@ -389,7 +389,7 @@ VARIABLE_COMMENT Controls what join operations can be executed with join buffers. Odd numbers are used for plain join buffers while even numbers are used for linked buffers NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 8 -@@ -1498,7 +1498,7 @@ +@@ -1508,7 +1508,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT The size of the buffer used for index blocks for MyISAM tables. Increase this to get better index handling (for all reads and multiple writes) to as much as you can afford NUMERIC_MIN_VALUE 0 @@ -398,7 +398,7 @@ NUMERIC_BLOCK_SIZE 4096 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1665,7 +1665,7 @@ +@@ -1675,7 +1675,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME LOCK_WAIT_TIMEOUT VARIABLE_SCOPE SESSION @@ -407,7 +407,7 @@ VARIABLE_COMMENT Timeout in seconds to wait for a lock before returning an error. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 31536000 -@@ -1815,7 +1815,7 @@ +@@ -1825,7 +1825,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME LOG_SLOW_RATE_LIMIT VARIABLE_SCOPE SESSION @@ -416,7 +416,7 @@ VARIABLE_COMMENT Write to slow log every #th slow query. Set to 1 to log everything. Increase it to reduce the size of the slow or the performance impact of slow logging NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -1845,7 +1845,7 @@ +@@ -1855,7 +1855,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME LOG_WARNINGS VARIABLE_SCOPE SESSION @@ -425,7 +425,7 @@ VARIABLE_COMMENT Log some not critical warnings to the general log file.Value can be between 0 and 11. Higher values mean more verbosity NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -1905,7 +1905,7 @@ +@@ -1915,7 +1915,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME MAX_ALLOWED_PACKET VARIABLE_SCOPE SESSION @@ -434,7 +434,7 @@ VARIABLE_COMMENT Max packet length to send to or receive from the server NUMERIC_MIN_VALUE 1024 NUMERIC_MAX_VALUE 1073741824 -@@ -1918,14 +1918,14 @@ +@@ -1928,14 +1928,14 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Sets the total size of the transactional cache NUMERIC_MIN_VALUE 4096 @@ -451,7 +451,7 @@ VARIABLE_COMMENT Binary log will be rotated automatically when the size exceeds this value. NUMERIC_MIN_VALUE 4096 NUMERIC_MAX_VALUE 1073741824 -@@ -1938,14 +1938,14 @@ +@@ -1948,14 +1948,14 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Sets the total size of the statement cache NUMERIC_MIN_VALUE 4096 @@ -468,7 +468,7 @@ VARIABLE_COMMENT The number of simultaneous clients allowed NUMERIC_MIN_VALUE 10 NUMERIC_MAX_VALUE 100000 -@@ -1955,7 +1955,7 @@ +@@ -1965,7 +1965,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_CONNECT_ERRORS VARIABLE_SCOPE GLOBAL @@ -477,7 +477,7 @@ VARIABLE_COMMENT If there is more than this number of interrupted connections from a host this host will be blocked from further connections NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -1965,7 +1965,7 @@ +@@ -1975,7 +1975,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_DELAYED_THREADS VARIABLE_SCOPE SESSION @@ -486,7 +486,7 @@ VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 16384 -@@ -1985,7 +1985,7 @@ +@@ -1995,7 +1995,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_ERROR_COUNT VARIABLE_SCOPE SESSION @@ -495,7 +495,7 @@ VARIABLE_COMMENT Max number of errors/warnings to store for a statement NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 65535 -@@ -1998,14 +1998,14 @@ +@@ -2008,14 +2008,14 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Don't allow creation of heap tables bigger than this NUMERIC_MIN_VALUE 16384 @@ -512,7 +512,7 @@ VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 16384 -@@ -2025,7 +2025,7 @@ +@@ -2035,7 +2035,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_LENGTH_FOR_SORT_DATA VARIABLE_SCOPE SESSION @@ -521,7 +521,7 @@ VARIABLE_COMMENT Max number of bytes in sorted records NUMERIC_MIN_VALUE 4 NUMERIC_MAX_VALUE 8388608 -@@ -2055,7 +2055,7 @@ +@@ -2065,7 +2065,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_RECURSIVE_ITERATIONS VARIABLE_SCOPE SESSION @@ -530,7 +530,7 @@ VARIABLE_COMMENT Maximum number of iterations when executing recursive queries NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -2078,14 +2078,14 @@ +@@ -2088,14 +2088,14 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT The maximum size of the container of a rowid filter NUMERIC_MIN_VALUE 1024 @@ -547,16 +547,16 @@ VARIABLE_COMMENT Limit assumed max number of seeks when looking up rows based on a key NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -2105,7 +2105,7 @@ +@@ -2115,7 +2115,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_SORT_LENGTH VARIABLE_SCOPE SESSION -VARIABLE_TYPE BIGINT UNSIGNED +VARIABLE_TYPE INT UNSIGNED VARIABLE_COMMENT The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored) - NUMERIC_MIN_VALUE 4 + NUMERIC_MIN_VALUE 64 NUMERIC_MAX_VALUE 8388608 -@@ -2115,7 +2115,7 @@ +@@ -2125,7 +2125,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_SP_RECURSION_DEPTH VARIABLE_SCOPE SESSION @@ -565,7 +565,7 @@ VARIABLE_COMMENT Maximum stored procedure recursion depth NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 255 -@@ -2135,7 +2135,7 @@ +@@ -2145,7 +2145,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_TMP_TABLES VARIABLE_SCOPE SESSION @@ -574,7 +574,7 @@ VARIABLE_COMMENT Unused, will be removed. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -2155,7 +2155,7 @@ +@@ -2165,7 +2165,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_WRITE_LOCK_COUNT VARIABLE_SCOPE GLOBAL @@ -583,7 +583,7 @@ VARIABLE_COMMENT After this many write locks, allow some read locks to run in between NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -2165,7 +2165,7 @@ +@@ -2175,7 +2175,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME METADATA_LOCKS_CACHE_SIZE VARIABLE_SCOPE GLOBAL @@ -592,7 +592,7 @@ VARIABLE_COMMENT Unused NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 1048576 -@@ -2175,7 +2175,7 @@ +@@ -2185,7 +2185,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME METADATA_LOCKS_HASH_INSTANCES VARIABLE_SCOPE GLOBAL @@ -601,7 +601,7 @@ VARIABLE_COMMENT Unused NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 1024 -@@ -2185,7 +2185,7 @@ +@@ -2195,7 +2195,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MIN_EXAMINED_ROW_LIMIT VARIABLE_SCOPE SESSION @@ -610,7 +610,7 @@ VARIABLE_COMMENT Don't write queries to slow log that examine fewer rows than that NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -2195,7 +2195,7 @@ +@@ -2205,7 +2205,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MRR_BUFFER_SIZE VARIABLE_SCOPE SESSION @@ -619,7 +619,7 @@ VARIABLE_COMMENT Size of buffer to use when using MRR with range access NUMERIC_MIN_VALUE 8192 NUMERIC_MAX_VALUE 2147483647 -@@ -2205,7 +2205,7 @@ +@@ -2215,7 +2215,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MYISAM_BLOCK_SIZE VARIABLE_SCOPE GLOBAL @@ -628,7 +628,7 @@ VARIABLE_COMMENT Block size to be used for MyISAM index pages NUMERIC_MIN_VALUE 1024 NUMERIC_MAX_VALUE 16384 -@@ -2215,7 +2215,7 @@ +@@ -2225,7 +2225,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MYISAM_DATA_POINTER_SIZE VARIABLE_SCOPE GLOBAL @@ -637,7 +637,7 @@ VARIABLE_COMMENT Default pointer size to be used for MyISAM tables NUMERIC_MIN_VALUE 2 NUMERIC_MAX_VALUE 7 -@@ -2238,7 +2238,7 @@ +@@ -2248,7 +2248,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Restricts the total memory used for memory mapping of MySQL tables NUMERIC_MIN_VALUE 7 @@ -646,7 +646,7 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY YES -@@ -2255,10 +2255,10 @@ +@@ -2265,10 +2265,10 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME MYISAM_REPAIR_THREADS VARIABLE_SCOPE SESSION @@ -659,7 +659,7 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -2268,7 +2268,7 @@ +@@ -2278,7 +2278,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE NUMERIC_MIN_VALUE 4096 @@ -668,7 +668,7 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -2305,7 +2305,7 @@ +@@ -2315,7 +2315,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME NET_BUFFER_LENGTH VARIABLE_SCOPE SESSION @@ -677,7 +677,7 @@ VARIABLE_COMMENT Buffer length for TCP/IP and socket communication NUMERIC_MIN_VALUE 1024 NUMERIC_MAX_VALUE 1048576 -@@ -2315,7 +2315,7 @@ +@@ -2325,7 +2325,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME NET_READ_TIMEOUT VARIABLE_SCOPE SESSION @@ -686,7 +686,7 @@ VARIABLE_COMMENT Number of seconds to wait for more data from a connection before aborting the read NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 31536000 -@@ -2325,7 +2325,7 @@ +@@ -2335,7 +2335,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME NET_RETRY_COUNT VARIABLE_SCOPE SESSION @@ -695,7 +695,7 @@ VARIABLE_COMMENT If a read on a communication port is interrupted, retry this many times before giving up NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -2335,7 +2335,7 @@ +@@ -2345,7 +2345,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME NET_WRITE_TIMEOUT VARIABLE_SCOPE SESSION @@ -704,7 +704,7 @@ VARIABLE_COMMENT Number of seconds to wait for a block to be written to a connection before aborting the write NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 31536000 -@@ -2385,7 +2385,7 @@ +@@ -2395,7 +2395,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME OPEN_FILES_LIMIT VARIABLE_SCOPE GLOBAL @@ -713,7 +713,7 @@ VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 or autoset then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -2395,10 +2395,10 @@ +@@ -2405,17 +2405,17 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME OPTIMIZER_MAX_SEL_ARG_WEIGHT VARIABLE_SCOPE SESSION @@ -726,7 +726,6 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -2405,7 +2405,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME OPTIMIZER_PRUNE_LEVEL VARIABLE_SCOPE SESSION @@ -735,7 +734,7 @@ VARIABLE_COMMENT Controls the heuristic(s) applied during query optimization to prune less-promising partial plans from the optimizer search space. Meaning: 0 - do not apply any heuristic, thus perform exhaustive search; 1 - prune plans based on number of retrieved rows NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1 -@@ -2415,7 +2415,7 @@ +@@ -2425,7 +2425,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME OPTIMIZER_SEARCH_DEPTH VARIABLE_SCOPE SESSION @@ -744,7 +743,7 @@ VARIABLE_COMMENT Maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to compile a query. Values smaller than the number of tables in a relation result in faster optimization, but may produce very bad query plans. If set to 0, the system will automatically pick a reasonable value. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 62 -@@ -2425,7 +2425,7 @@ +@@ -2435,7 +2435,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME OPTIMIZER_SELECTIVITY_SAMPLING_LIMIT VARIABLE_SCOPE SESSION @@ -753,7 +752,7 @@ VARIABLE_COMMENT Controls number of record samples to check condition selectivity NUMERIC_MIN_VALUE 10 NUMERIC_MAX_VALUE 4294967295 -@@ -2455,17 +2455,17 @@ +@@ -2465,17 +2465,17 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME OPTIMIZER_TRACE_MAX_MEM_SIZE VARIABLE_SCOPE SESSION @@ -774,7 +773,7 @@ VARIABLE_COMMENT Controls selectivity of which conditions the optimizer takes into account to calculate cardinality of a partial join when it searches for the best execution plan Meaning: 1 - use selectivity of index backed range conditions to calculate the cardinality of a partial join if the last joined table is accessed by full table scan or an index scan, 2 - use selectivity of index backed range conditions to calculate the cardinality of a partial join in any case, 3 - additionally always use selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join, 4 - use histograms to calculate selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join.5 - additionally use selectivity of certain non-range predicates calculated on record samples NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 5 -@@ -2485,7 +2485,7 @@ +@@ -2495,7 +2495,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME PERFORMANCE_SCHEMA_ACCOUNTS_SIZE VARIABLE_SCOPE GLOBAL @@ -783,7 +782,7 @@ VARIABLE_COMMENT Maximum number of instrumented user@host accounts. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2495,7 +2495,7 @@ +@@ -2505,7 +2505,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_DIGESTS_SIZE VARIABLE_SCOPE GLOBAL @@ -791,8 +790,8 @@ +VARIABLE_TYPE INT VARIABLE_COMMENT Size of the statement digest. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 - NUMERIC_MAX_VALUE 200 -@@ -2505,7 +2505,7 @@ + NUMERIC_MAX_VALUE 1048576 +@@ -2515,7 +2515,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_LONG_SIZE VARIABLE_SCOPE GLOBAL @@ -801,7 +800,7 @@ VARIABLE_COMMENT Number of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2515,7 +2515,7 @@ +@@ -2525,7 +2525,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_SIZE VARIABLE_SCOPE GLOBAL @@ -810,7 +809,7 @@ VARIABLE_COMMENT Number of rows per thread in EVENTS_STAGES_HISTORY. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1024 -@@ -2525,7 +2525,7 @@ +@@ -2535,7 +2535,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_LONG_SIZE VARIABLE_SCOPE GLOBAL @@ -819,7 +818,7 @@ VARIABLE_COMMENT Number of rows in EVENTS_STATEMENTS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2535,7 +2535,7 @@ +@@ -2545,7 +2545,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_SIZE VARIABLE_SCOPE GLOBAL @@ -828,7 +827,7 @@ VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_HISTORY. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1024 -@@ -2545,7 +2545,7 @@ +@@ -2555,7 +2555,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_LONG_SIZE VARIABLE_SCOPE GLOBAL @@ -837,7 +836,7 @@ VARIABLE_COMMENT Number of rows in EVENTS_TRANSACTIONS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2555,7 +2555,7 @@ +@@ -2565,7 +2565,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_SIZE VARIABLE_SCOPE GLOBAL @@ -846,7 +845,7 @@ VARIABLE_COMMENT Number of rows per thread in EVENTS_TRANSACTIONS_HISTORY. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1024 -@@ -2565,7 +2565,7 @@ +@@ -2575,7 +2575,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE VARIABLE_SCOPE GLOBAL @@ -855,7 +854,7 @@ VARIABLE_COMMENT Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2575,7 +2575,7 @@ +@@ -2585,7 +2585,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE VARIABLE_SCOPE GLOBAL @@ -864,7 +863,7 @@ VARIABLE_COMMENT Number of rows per thread in EVENTS_WAITS_HISTORY. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1024 -@@ -2585,7 +2585,7 @@ +@@ -2595,7 +2595,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_HOSTS_SIZE VARIABLE_SCOPE GLOBAL @@ -873,7 +872,7 @@ VARIABLE_COMMENT Maximum number of instrumented hosts. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2595,7 +2595,7 @@ +@@ -2605,7 +2605,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_CLASSES VARIABLE_SCOPE GLOBAL @@ -882,7 +881,7 @@ VARIABLE_COMMENT Maximum number of condition instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 256 -@@ -2605,7 +2605,7 @@ +@@ -2615,7 +2615,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_INSTANCES VARIABLE_SCOPE GLOBAL @@ -891,7 +890,7 @@ VARIABLE_COMMENT Maximum number of instrumented condition objects. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2615,7 +2615,7 @@ +@@ -2625,7 +2625,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_DIGEST_LENGTH VARIABLE_SCOPE GLOBAL @@ -900,7 +899,7 @@ VARIABLE_COMMENT Maximum length considered for digest text, when stored in performance_schema tables. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1048576 -@@ -2625,7 +2625,7 @@ +@@ -2635,7 +2635,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_CLASSES VARIABLE_SCOPE GLOBAL @@ -909,7 +908,7 @@ VARIABLE_COMMENT Maximum number of file instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 256 -@@ -2635,7 +2635,7 @@ +@@ -2645,7 +2645,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_HANDLES VARIABLE_SCOPE GLOBAL @@ -918,7 +917,7 @@ VARIABLE_COMMENT Maximum number of opened instrumented files. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1048576 -@@ -2645,7 +2645,7 @@ +@@ -2655,7 +2655,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_INSTANCES VARIABLE_SCOPE GLOBAL @@ -927,7 +926,7 @@ VARIABLE_COMMENT Maximum number of instrumented files. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2655,7 +2655,7 @@ +@@ -2665,7 +2665,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_INDEX_STAT VARIABLE_SCOPE GLOBAL @@ -936,7 +935,7 @@ VARIABLE_COMMENT Maximum number of index statistics for instrumented tables. Use 0 to disable, -1 for automated scaling. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2665,7 +2665,7 @@ +@@ -2675,7 +2675,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MEMORY_CLASSES VARIABLE_SCOPE GLOBAL @@ -945,7 +944,7 @@ VARIABLE_COMMENT Maximum number of memory pool instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1024 -@@ -2675,7 +2675,7 @@ +@@ -2685,7 +2685,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_METADATA_LOCKS VARIABLE_SCOPE GLOBAL @@ -954,7 +953,7 @@ VARIABLE_COMMENT Maximum number of metadata locks. Use 0 to disable, -1 for automated scaling. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 104857600 -@@ -2685,7 +2685,7 @@ +@@ -2695,7 +2695,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES VARIABLE_SCOPE GLOBAL @@ -963,7 +962,7 @@ VARIABLE_COMMENT Maximum number of mutex instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 256 -@@ -2695,7 +2695,7 @@ +@@ -2705,7 +2705,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES VARIABLE_SCOPE GLOBAL @@ -972,7 +971,7 @@ VARIABLE_COMMENT Maximum number of instrumented MUTEX objects. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 104857600 -@@ -2705,7 +2705,7 @@ +@@ -2715,7 +2715,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_PREPARED_STATEMENTS_INSTANCES VARIABLE_SCOPE GLOBAL @@ -981,7 +980,7 @@ VARIABLE_COMMENT Maximum number of instrumented prepared statements. Use 0 to disable, -1 for automated scaling. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2715,7 +2715,7 @@ +@@ -2725,7 +2725,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_PROGRAM_INSTANCES VARIABLE_SCOPE GLOBAL @@ -990,7 +989,7 @@ VARIABLE_COMMENT Maximum number of instrumented programs. Use 0 to disable, -1 for automated scaling. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2725,7 +2725,7 @@ +@@ -2735,7 +2735,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES VARIABLE_SCOPE GLOBAL @@ -999,7 +998,7 @@ VARIABLE_COMMENT Maximum number of rwlock instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 256 -@@ -2735,7 +2735,7 @@ +@@ -2745,7 +2745,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCES VARIABLE_SCOPE GLOBAL @@ -1008,7 +1007,7 @@ VARIABLE_COMMENT Maximum number of instrumented RWLOCK objects. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 104857600 -@@ -2745,7 +2745,7 @@ +@@ -2755,7 +2755,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_CLASSES VARIABLE_SCOPE GLOBAL @@ -1017,7 +1016,7 @@ VARIABLE_COMMENT Maximum number of socket instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 256 -@@ -2755,7 +2755,7 @@ +@@ -2765,7 +2765,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_INSTANCES VARIABLE_SCOPE GLOBAL @@ -1026,7 +1025,7 @@ VARIABLE_COMMENT Maximum number of opened instrumented sockets. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2765,7 +2765,7 @@ +@@ -2775,7 +2775,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SQL_TEXT_LENGTH VARIABLE_SCOPE GLOBAL @@ -1035,7 +1034,7 @@ VARIABLE_COMMENT Maximum length of displayed sql text. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1048576 -@@ -2775,7 +2775,7 @@ +@@ -2785,7 +2785,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STAGE_CLASSES VARIABLE_SCOPE GLOBAL @@ -1044,7 +1043,7 @@ VARIABLE_COMMENT Maximum number of stage instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 256 -@@ -2785,7 +2785,7 @@ +@@ -2795,7 +2795,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES VARIABLE_SCOPE GLOBAL @@ -1053,7 +1052,7 @@ VARIABLE_COMMENT Maximum number of statement instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 256 -@@ -2795,7 +2795,7 @@ +@@ -2805,7 +2805,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_STACK VARIABLE_SCOPE GLOBAL @@ -1062,7 +1061,7 @@ VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_CURRENT. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 256 -@@ -2805,7 +2805,7 @@ +@@ -2815,7 +2815,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES VARIABLE_SCOPE GLOBAL @@ -1071,7 +1070,7 @@ VARIABLE_COMMENT Maximum number of opened instrumented tables. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2815,7 +2815,7 @@ +@@ -2825,7 +2825,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_INSTANCES VARIABLE_SCOPE GLOBAL @@ -1080,7 +1079,7 @@ VARIABLE_COMMENT Maximum number of instrumented tables. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2825,7 +2825,7 @@ +@@ -2835,7 +2835,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_LOCK_STAT VARIABLE_SCOPE GLOBAL @@ -1089,7 +1088,7 @@ VARIABLE_COMMENT Maximum number of lock statistics for instrumented tables. Use 0 to disable, -1 for automated scaling. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2835,7 +2835,7 @@ +@@ -2845,7 +2845,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES VARIABLE_SCOPE GLOBAL @@ -1098,7 +1097,7 @@ VARIABLE_COMMENT Maximum number of thread instruments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 256 -@@ -2845,7 +2845,7 @@ +@@ -2855,7 +2855,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES VARIABLE_SCOPE GLOBAL @@ -1107,7 +1106,7 @@ VARIABLE_COMMENT Maximum number of instrumented threads. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2855,7 +2855,7 @@ +@@ -2865,7 +2865,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE VARIABLE_SCOPE GLOBAL @@ -1116,7 +1115,7 @@ VARIABLE_COMMENT Size of session attribute string buffer per thread. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2865,7 +2865,7 @@ +@@ -2875,7 +2875,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_ACTORS_SIZE VARIABLE_SCOPE GLOBAL @@ -1125,7 +1124,7 @@ VARIABLE_COMMENT Maximum number of rows in SETUP_ACTORS. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1024 -@@ -2875,7 +2875,7 @@ +@@ -2885,7 +2885,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_OBJECTS_SIZE VARIABLE_SCOPE GLOBAL @@ -1134,7 +1133,7 @@ VARIABLE_COMMENT Maximum number of rows in SETUP_OBJECTS. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2885,7 +2885,7 @@ +@@ -2895,7 +2895,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_USERS_SIZE VARIABLE_SCOPE GLOBAL @@ -1143,7 +1142,7 @@ VARIABLE_COMMENT Maximum number of instrumented users. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 NUMERIC_MAX_VALUE 1048576 -@@ -2935,7 +2935,7 @@ +@@ -2945,7 +2945,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PRELOAD_BUFFER_SIZE VARIABLE_SCOPE SESSION @@ -1152,7 +1151,7 @@ VARIABLE_COMMENT The size of the buffer that is allocated when preloading indexes NUMERIC_MIN_VALUE 1024 NUMERIC_MAX_VALUE 1073741824 -@@ -2955,7 +2955,7 @@ +@@ -2965,7 +2965,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME PROFILING_HISTORY_SIZE VARIABLE_SCOPE SESSION @@ -1161,7 +1160,7 @@ VARIABLE_COMMENT Number of statements about which profiling information is maintained. If set to 0, no profiles are stored. See SHOW PROFILES. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 100 -@@ -2965,7 +2965,7 @@ +@@ -2975,7 +2975,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PROGRESS_REPORT_TIME VARIABLE_SCOPE SESSION @@ -1170,7 +1169,7 @@ VARIABLE_COMMENT Seconds between sending progress reports to the client for time-consuming statements. Set to 0 to disable progress reporting. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -3025,7 +3025,7 @@ +@@ -3035,7 +3035,7 @@ COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME QUERY_ALLOC_BLOCK_SIZE VARIABLE_SCOPE SESSION @@ -1179,7 +1178,7 @@ VARIABLE_COMMENT Allocation block size for query parsing and execution NUMERIC_MIN_VALUE 1024 NUMERIC_MAX_VALUE 4294967295 -@@ -3035,7 +3035,7 @@ +@@ -3045,7 +3045,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME QUERY_CACHE_LIMIT VARIABLE_SCOPE GLOBAL @@ -1188,7 +1187,7 @@ VARIABLE_COMMENT Don't cache results that are bigger than this NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -3045,7 +3045,7 @@ +@@ -3055,7 +3055,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME QUERY_CACHE_MIN_RES_UNIT VARIABLE_SCOPE GLOBAL @@ -1197,7 +1196,7 @@ VARIABLE_COMMENT The minimum size for blocks allocated by the query cache NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -3058,7 +3058,7 @@ +@@ -3068,7 +3068,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT The memory allocated to store results from old queries NUMERIC_MIN_VALUE 0 @@ -1206,7 +1205,7 @@ NUMERIC_BLOCK_SIZE 1024 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -3095,7 +3095,7 @@ +@@ -3105,7 +3105,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME QUERY_PREALLOC_SIZE VARIABLE_SCOPE SESSION @@ -1215,7 +1214,7 @@ VARIABLE_COMMENT Persistent buffer for query parsing and execution NUMERIC_MIN_VALUE 1024 NUMERIC_MAX_VALUE 4294967295 -@@ -3108,7 +3108,7 @@ +@@ -3118,7 +3118,7 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes NUMERIC_MIN_VALUE 0 @@ -1224,7 +1223,7 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -3118,14 +3118,14 @@ +@@ -3128,14 +3128,14 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes NUMERIC_MIN_VALUE 0 @@ -1241,7 +1240,7 @@ VARIABLE_COMMENT Allocation block size for storing ranges during optimization NUMERIC_MIN_VALUE 4096 NUMERIC_MAX_VALUE 4294967295 -@@ -3138,14 +3138,14 @@ +@@ -3148,14 +3148,14 @@ VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Maximum speed(KB/s) to read binlog from master (0 = no limit) NUMERIC_MIN_VALUE 0 @@ -1258,7 +1257,7 @@ VARIABLE_COMMENT Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value NUMERIC_MIN_VALUE 8192 NUMERIC_MAX_VALUE 2147483647 -@@ -3165,7 +3165,7 @@ +@@ -3175,7 +3175,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME READ_RND_BUFFER_SIZE VARIABLE_SCOPE SESSION @@ -1267,7 +1266,7 @@ VARIABLE_COMMENT When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 2147483647 -@@ -3375,10 +3375,10 @@ +@@ -3385,10 +3385,10 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME ROWID_MERGE_BUFF_SIZE VARIABLE_SCOPE SESSION @@ -1280,7 +1279,7 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -3395,20 +3395,20 @@ +@@ -3405,20 +3405,20 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME RPL_SEMI_SYNC_MASTER_TIMEOUT VARIABLE_SCOPE GLOBAL @@ -1305,7 +1304,7 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -3465,10 +3465,10 @@ +@@ -3475,10 +3475,10 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME RPL_SEMI_SYNC_SLAVE_TRACE_LEVEL VARIABLE_SCOPE GLOBAL @@ -1318,7 +1317,7 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -3505,7 +3505,7 @@ +@@ -3515,7 +3515,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME SERVER_ID VARIABLE_SCOPE SESSION diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result index 7cdfdff7129..cda40809a90 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result @@ -383,6 +383,16 @@ NUMERIC_BLOCK_SIZE NULL ENUM_VALUE_LIST OFF,ON READ_ONLY NO COMMAND_LINE_ARGUMENT OPTIONAL +VARIABLE_NAME BINLOG_EXPIRE_LOGS_SECONDS +VARIABLE_SCOPE GLOBAL +VARIABLE_TYPE BIGINT UNSIGNED +VARIABLE_COMMENT If non-zero, binary logs will be purged after binlog_expire_logs_seconds seconds; If both this option and expire_logs_days are set to non-zero values, this option takes priority. Purges happen at startup and at binary log rotation. +NUMERIC_MIN_VALUE 0 +NUMERIC_MAX_VALUE 4294967295 +NUMERIC_BLOCK_SIZE 1 +ENUM_VALUE_LIST NULL +READ_ONLY NO +COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME BINLOG_FILE_CACHE_SIZE VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BIGINT UNSIGNED @@ -926,7 +936,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME EXPIRE_LOGS_DAYS VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; possible purges happen at startup and at binary log rotation +VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; If this option alone is set on the command line or in a configuration file, it overrides the default value for binlog-expire-logs-seconds. If both options are set to nonzero values, binlog-expire-logs-seconds takes priority. Possible purges happen at startup and at binary log rotation. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 99 NUMERIC_BLOCK_SIZE 1 diff --git a/mysql-test/suite/sys_vars/t/binlog_expire_logs_seconds_basic.test b/mysql-test/suite/sys_vars/t/binlog_expire_logs_seconds_basic.test new file mode 100644 index 00000000000..25ea5c9bd1f --- /dev/null +++ b/mysql-test/suite/sys_vars/t/binlog_expire_logs_seconds_basic.test @@ -0,0 +1,146 @@ +############## mysql-test\t\binlog_expire_logs_seconds_basic.test ################ +# # +# Variable Name: binlog_expire_logs_seconds # +# Scope: GLOBAL # +# Access Type: Dynamic # +# Data Type: numeric # +# Default Value:0 # +# Range: 0- (2^32 -1) # +# # +# # +# Creation Date: 2017-11-28 # +# Author: Neha kumari # +# # +# Description: Test Cases of Dynamic System Variable # +# binlog_expire_logs_seconds that checks the behavior of this # +# variable in the following ways # +# * Default Value # +# * Valid & Invalid values # +# * Scope & Access method # +# * Data Integrity # +# # +# Reference: https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html# +# # +################################################################################## + +--source include/load_sysvars.inc + +######################################################################## +# START OF binlog_expire_logs_seconds TESTS # +######################################################################## + +SET @start_value = @@global.expire_logs_days; +SELECT @start_value; + +# Set expire_logs_days to 0 in order to test binlog_expire_logs_seconds +# or we will get error while setting binlog_expire_logs_seconds +SET @@global.expire_logs_days = 0; + +SET @start_value_sec = @@global.binlog_expire_logs_seconds; +SELECT @start_value_sec; +######################################################################## +# Display the DEFAULT value of binlog_expire_logs_seconds # +######################################################################## + +SET @@global.binlog_expire_logs_seconds = 8734635; +SET @@global.binlog_expire_logs_seconds = DEFAULT; +SELECT @@global.binlog_expire_logs_seconds; + +############################################### +# Verify default value of variable # +############################################### + +SET @@global.binlog_expire_logs_seconds = @start_value_sec; +SELECT @@global.binlog_expire_logs_seconds = 2592000; + +################################################################################## +# Change the value of binlog_expire_logs_seconds to a valid value # +################################################################################## + +SET @@global.binlog_expire_logs_seconds = 0; +SELECT @@global.binlog_expire_logs_seconds; +SET @@global.binlog_expire_logs_seconds = 99; +SELECT @@global.binlog_expire_logs_seconds; +SET @@global.binlog_expire_logs_seconds = 10; +SELECT @@global.binlog_expire_logs_seconds; +SET @@global.binlog_expire_logs_seconds = 21; +SELECT @@global.binlog_expire_logs_seconds; + +##################################################################################### +# Change the value of binlog_expire_logs_seconds to invalid value # +##################################################################################### + +SET @@global.binlog_expire_logs_seconds = -1; +SELECT @@global.binlog_expire_logs_seconds; +--Error ER_WRONG_TYPE_FOR_VAR +SET @@global.binlog_expire_logs_seconds = 10000.01; +SELECT @@global.binlog_expire_logs_seconds; +SET @@global.binlog_expire_logs_seconds = -1024; +SELECT @@global.binlog_expire_logs_seconds; +SET @@global.binlog_expire_logs_seconds = 42949672950; +SELECT @@global.binlog_expire_logs_seconds; + +--Error ER_WRONG_TYPE_FOR_VAR +SET @@global.binlog_expire_logs_seconds = ON; +SELECT @@global.binlog_expire_logs_seconds; +--Error ER_WRONG_TYPE_FOR_VAR +SET @@global.binlog_expire_logs_seconds = 'test'; +SELECT @@global.binlog_expire_logs_seconds; + +##################################################################################### +# Test if accessing session binlog_expire_logs_seconds gives error # +##################################################################################### + +--Error ER_GLOBAL_VARIABLE +SET @@session.binlog_expire_logs_seconds = 0; +SELECT @@binlog_expire_logs_seconds; + +############################################################################## +# Check if the value in GLOBAL & SESSION Tables matches values in variable # +############################################################################## + +--disable_warnings +SELECT @@global.binlog_expire_logs_seconds = VARIABLE_VALUE +FROM information_schema.global_variables +WHERE VARIABLE_NAME='binlog_expire_logs_seconds'; + +SELECT @@binlog_expire_logs_seconds = VARIABLE_VALUE +FROM information_schema.session_variables +WHERE VARIABLE_NAME='binlog_expire_logs_seconds'; +--enable_warnings + +################################################################### +# Check if TRUE and FALSE values can be used on variable # +################################################################### + +SET @@global.binlog_expire_logs_seconds = TRUE; +SELECT @@global.binlog_expire_logs_seconds; +SET @@global.binlog_expire_logs_seconds = FALSE; +SELECT @@global.binlog_expire_logs_seconds; + + +#################################################################################### +# Check if binlog_expire_logs_seconds can be accessed with and without @@ sign # +#################################################################################### +SET @@global.binlog_expire_logs_seconds = 1; +SELECT @@binlog_expire_logs_seconds = @@global.binlog_expire_logs_seconds; + +--Error ER_GLOBAL_VARIABLE +SET binlog_expire_logs_seconds = 1; +SELECT @@binlog_expire_logs_seconds; +--Error ER_UNKNOWN_TABLE +SELECT local.binlog_expire_logs_seconds; +--Error ER_UNKNOWN_TABLE +SELECT global.binlog_expire_logs_seconds; +--Error ER_BAD_FIELD_ERROR +SELECT binlog_expire_logs_seconds = @@session.binlog_expire_logs_seconds; + +############################## +# Restore initial value # +############################## + +SET @@global.binlog_expire_logs_seconds = @start_value_sec; +SELECT @@global.binlog_expire_logs_seconds; + +SET @@global.expire_logs_days = @start_value; +SELECT @@global.expire_logs_days; diff --git a/mysql-test/suite/sys_vars/t/expire_logs_days_basic.test b/mysql-test/suite/sys_vars/t/expire_logs_days_basic.test index f95c7c55f6e..bdef6eed056 100644 --- a/mysql-test/suite/sys_vars/t/expire_logs_days_basic.test +++ b/mysql-test/suite/sys_vars/t/expire_logs_days_basic.test @@ -11,7 +11,7 @@ # Creation Date: 2008-02-07 # # Author: Salman # # # -# Description: Test Cases of Dynamic System Variable expire_logs_days # +# Description: Test Cases of Dynamic System Variable expire_logs_days and # # that checks the behavior of this variable in the following ways# # * Default Value # # * Valid & Invalid values # @@ -25,7 +25,6 @@ --source include/load_sysvars.inc - ######################################################################## # START OF expire_logs_days TESTS # ######################################################################## @@ -36,6 +35,12 @@ ######################################################################## SET @start_value = @@global.expire_logs_days; +SELECT @start_value; +SET @start_value_sec = @@global.binlog_expire_logs_seconds; +SELECT @start_value_sec; +# Set binlog_expire_logs_seconds to 0 in order to test expire_logs_days +# or we will get error while setting expire_logs_days +SET @@global.binlog_expire_logs_seconds = 0; --echo '#--------------------FN_DYNVARS_029_01------------------------#' @@ -45,7 +50,7 @@ SET @start_value = @@global.expire_logs_days; SET @@global.expire_logs_days = 99; SET @@global.expire_logs_days = DEFAULT; -SELECT @@global.expire_logs_days = 0; +SELECT @@global.expire_logs_days; --echo '#---------------------FN_DYNVARS_029_02-------------------------#' @@ -54,10 +59,9 @@ SELECT @@global.expire_logs_days = 0; ############################################### SET @@global.expire_logs_days = @start_value; -SELECT @@global.expire_logs_days = @start_value; - +SELECT @@global.expire_logs_days = 0; ---echo '#--------------------FN_DYNVARS_029_03------------------------#' +--echo '#--------------------FN_DYNVARS_029_03_01------------------------#' ######################################################################## # Change the value of expire_logs_days to a valid value # ######################################################################## @@ -72,7 +76,7 @@ SET @@global.expire_logs_days = 21; SELECT @@global.expire_logs_days; ---echo '#--------------------FN_DYNVARS_029_04-------------------------#' +--echo '#--------------------FN_DYNVARS_029_04_01-------------------------#' ########################################################################### # Change the value of expire_logs_days to invalid value # ########################################################################### @@ -99,7 +103,7 @@ SET @@global.expire_logs_days = 'test'; SELECT @@global.expire_logs_days; ---echo '#-------------------FN_DYNVARS_029_05----------------------------#' +--echo '#-------------------FN_DYNVARS_029_05_01----------------------------#' ########################################################################### # Test if accessing session expire_logs_days gives error # ########################################################################### @@ -109,22 +113,23 @@ SET @@session.expire_logs_days = 0; SELECT @@expire_logs_days; ---echo '#----------------------FN_DYNVARS_029_06------------------------#' +--echo '#----------------------FN_DYNVARS_029_06_01------------------------#' ############################################################################## # Check if the value in GLOBAL & SESSION Tables matches values in variable # ############################################################################## +--disable_warnings SELECT @@global.expire_logs_days = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='expire_logs_days'; SELECT @@expire_logs_days = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES +FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='expire_logs_days'; +--enable_warnings - ---echo '#---------------------FN_DYNVARS_029_07----------------------#' +--echo '#---------------------FN_DYNVARS_029_07_01----------------------#' ################################################################### # Check if TRUE and FALSE values can be used on variable # ################################################################### @@ -135,7 +140,7 @@ SET @@global.expire_logs_days = FALSE; SELECT @@global.expire_logs_days; ---echo '#---------------------FN_DYNVARS_029_08----------------------#' +--echo '#---------------------FN_DYNVARS_029_08_01----------------------#' ######################################################################################################## # Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable # ######################################################################################################## @@ -144,7 +149,7 @@ SET @@global.expire_logs_days = 1; SELECT @@expire_logs_days = @@global.expire_logs_days; ---echo '#---------------------FN_DYNVARS_029_09----------------------#' +--echo '#---------------------FN_DYNVARS_029_09_01----------------------#' ########################################################################## # Check if expire_logs_days can be accessed with and without @@ sign # ########################################################################## @@ -159,13 +164,16 @@ SELECT global.expire_logs_days; --Error ER_BAD_FIELD_ERROR SELECT expire_logs_days = @@session.expire_logs_days; +######################################################################## +# END OF expire_logs_days TESTS # +######################################################################## ############################## # Restore initial value # ############################## SET @@global.expire_logs_days = @start_value; +SELECT @@global.expire_logs_days; -######################################################################## -# END OF expire_logs_days TESTS # -######################################################################## +SET @@global.binlog_expire_logs_seconds = @start_value_sec; +SELECT @@global.binlog_expire_logs_seconds; diff --git a/mysql-test/suite/sys_vars/t/expire_logs_days_grant.test b/mysql-test/suite/sys_vars/t/expire_logs_days_grant.test index 65099b745f8..78385953207 100644 --- a/mysql-test/suite/sys_vars/t/expire_logs_days_grant.test +++ b/mysql-test/suite/sys_vars/t/expire_logs_days_grant.test @@ -2,8 +2,17 @@ --echo # MDEV-21963 Bind BINLOG ADMIN to a number of global system variables --echo # +SELECT @@global.binlog_expire_logs_seconds INTO @old_seconds; + +# Set binlog_expire_logs_seconds to 0 in order to test expire_logs_days +# or we will get error while setting expire_logs_days +SET @@global.binlog_expire_logs_seconds = 0; + --let var = expire_logs_days --let grant = BINLOG ADMIN --let value = 33 --source suite/sys_vars/inc/sysvar_global_grant.inc + +# Clean up +SET GLOBAL binlog_expire_logs_seconds= @old_seconds; diff --git a/sql/log.cc b/sql/log.cc index 894fecf93f1..6ce9f6625c2 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -7033,12 +7033,22 @@ void MYSQL_BIN_LOG::purge() { mysql_mutex_assert_not_owner(&LOCK_log); #ifdef HAVE_REPLICATION - if (expire_logs_days) + if (expire_logs_days || binlog_expire_logs_seconds) { DEBUG_SYNC(current_thd, "at_purge_logs_before_date"); - time_t purge_time= my_time(0) - expire_logs_days*24*60*60; + time_t purge_time = 0; + + if (binlog_expire_logs_seconds) + { + purge_time = my_time(0) - binlog_expire_logs_seconds; + } else + purge_time = my_time(0) - expire_logs_days * 24 * 60 * 60; + + DBUG_EXECUTE_IF("expire_logs_always", { purge_time = my_time(0); }); + if (purge_time >= 0) { + ha_flush_logs(); purge_logs_before_date(purge_time); } DEBUG_SYNC(current_thd, "after_purge_logs_before_date"); @@ -7046,7 +7056,6 @@ void MYSQL_BIN_LOG::purge() #endif } - void MYSQL_BIN_LOG::checkpoint_and_purge(ulong binlog_id) { do_checkpoint_request(binlog_id); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index f02a103c8d6..b99550ba0da 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -512,6 +512,7 @@ ulong slow_launch_threads = 0; uint sync_binlog_period= 0, sync_relaylog_period= 0, sync_relayloginfo_period= 0, sync_masterinfo_period= 0; ulong expire_logs_days = 0; +ulong binlog_expire_logs_seconds = 0; /** Soft upper limit for number of sp_head objects that can be stored in the sp_cache for one connection. @@ -724,6 +725,12 @@ char *relay_log_info_file, *report_user, *report_password, *report_host; char *opt_relay_logname = 0, *opt_relaylog_index_name=0; char *opt_logname, *opt_slow_logname, *opt_bin_logname; char *opt_binlog_index_name=0; +/* + True if expire_logs_days and binlog_expire_logs_seconds is set + explictly. +*/ +bool expire_logs_days_supplied = false; +bool binlog_expire_logs_seconds_supplied = false; /* Static variables */ @@ -5285,11 +5292,43 @@ static int init_server_components() } #ifdef HAVE_REPLICATION - if (opt_bin_log && expire_logs_days) + /* + When we pass non-zero values for both expire_logs_days and + binlog_expire_logs_seconds at the server start-up, the value of + expire_logs_days will be ignored and only binlog_expire_logs_seconds + will be used. + */ + if (binlog_expire_logs_seconds_supplied && expire_logs_days_supplied) { - time_t purge_time= server_start_time - expire_logs_days*24*60*60; + if (binlog_expire_logs_seconds != 0 && expire_logs_days != 0) + { + sql_print_warning(ER_THD_OR_DEFAULT(current_thd, + ER_EXPIRE_LOGS_DAYS_IGNORED)); + expire_logs_days = 0; + } + } else if (expire_logs_days_supplied) + binlog_expire_logs_seconds = 0; + DBUG_ASSERT(expire_logs_days == 0 || binlog_expire_logs_seconds == 0); + + if (opt_bin_log) + { + if (expire_logs_days > 0 || binlog_expire_logs_seconds > 0) { + time_t purge_time = server_start_time - binlog_expire_logs_seconds - + expire_logs_days * 24 * 60 * 60; + DBUG_EXECUTE_IF("expire_logs_always_at_start", + { purge_time = server_start_time; }); if (purge_time >= 0) mysql_bin_log.purge_logs_before_date(purge_time); + } + } + else + { + if (binlog_expire_logs_seconds_supplied) + sql_print_warning("You need to use --log-bin to make " + "--binlog-expire-logs-seconds work."); + if (expire_logs_days_supplied) + sql_print_warning("You need to use --log-bin to make " + "--expire_logs_days work."); } #endif @@ -7917,6 +7956,16 @@ mysqld_get_one_option(const struct my_option *opt, const char *argument, break; } #ifdef HAVE_REPLICATION + case (int)OPT_EXPIRE_LOGS_DAYS: + { + expire_logs_days_supplied = true; + break; + } + case (int)OPT_BINLOG_EXPIRE_LOGS_SECONDS: + { + binlog_expire_logs_seconds_supplied = true; + break; + } case (int)OPT_REPLICATE_IGNORE_DB: { cur_rpl_filter->add_ignore_db(argument); diff --git a/sql/mysqld.h b/sql/mysqld.h index 64cf1c5ebb0..894ee95ae61 100644 --- a/sql/mysqld.h +++ b/sql/mysqld.h @@ -156,6 +156,7 @@ extern my_bool locked_in_memory; extern bool opt_using_transactions; extern ulong current_pid; extern ulong expire_logs_days; +extern ulong binlog_expire_logs_seconds; extern my_bool relay_log_recovery; extern uint sync_binlog_period, sync_relaylog_period, sync_relayloginfo_period, sync_masterinfo_period; @@ -776,6 +777,8 @@ enum options_mysqld OPT_BINLOG_FORMAT, OPT_BINLOG_IGNORE_DB, OPT_BIN_LOG, + OPT_EXPIRE_LOGS_DAYS, + OPT_BINLOG_EXPIRE_LOGS_SECONDS, OPT_BOOTSTRAP, OPT_CONSOLE, OPT_DEBUG_SYNC_TIMEOUT, diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index badaaa17716..9ff32e309db 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -7973,3 +7973,7 @@ ER_DATA_WAS_COMMITED_UNDER_ROLLBACK eng "Engine %s does not support rollback. Changes were committed during rollback call" ER_PK_INDEX_CANT_BE_IGNORED eng "A primary key cannot be marked as IGNORE" +ER_EXPIRE_LOGS_DAYS_IGNORED + eng "The option expire_logs_days cannot be used together with option binlog_expire_logs_seconds. Therefore, value of expire_logs_days is ignored." +ER_BINLOG_EXPIRE_LOG_DAYS_AND_SECS_USED_TOGETHER + eng "The option expire_logs_days and binlog_expire_logs_seconds cannot be used together. Please use binlog_expire_logs_seconds to set the expire time (expire_logs_days is deprecated)" diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index b72d4a3c358..9e2224e987c 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -1156,14 +1156,51 @@ static Sys_var_enum Sys_event_scheduler( ON_CHECK(event_scheduler_check), ON_UPDATE(event_scheduler_update)); #endif +static bool check_expire_logs_days(sys_var *, THD *, set_var *var) { + ulonglong expire_logs_days_value = var->save_result.ulonglong_value; + + if (expire_logs_days_value && binlog_expire_logs_seconds) { + my_error(ER_BINLOG_EXPIRE_LOG_DAYS_AND_SECS_USED_TOGETHER, MYF(0)); + return true; + } + return false; +} + +static bool check_expire_logs_seconds(sys_var *, THD *, set_var *var) { + ulonglong expire_logs_seconds_value = var->save_result.ulonglong_value; + + if (expire_logs_days && expire_logs_seconds_value) { + my_error(ER_EXPIRE_LOGS_DAYS_IGNORED, MYF(0)); + return true; + } + return false; +} + static Sys_var_on_access_global<Sys_var_ulong, PRIV_SET_SYSTEM_GLOBAL_VAR_EXPIRE_LOGS_DAYS> Sys_expire_logs_days( - "expire_logs_days", - "If non-zero, binary logs will be purged after expire_logs_days " - "days; possible purges happen at startup and at binary log rotation", - GLOBAL_VAR(expire_logs_days), - CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, 99), DEFAULT(0), BLOCK_SIZE(1)); + "expire_logs_days", + "If non-zero, binary logs will be purged after expire_logs_days " + "days; If this option alone is set on the command line or in a " + "configuration file, it overrides the default value for " + "binlog-expire-logs-seconds. If both options are set to nonzero values, " + "binlog-expire-logs-seconds takes priority. Possible purges happen at " + "startup and at binary log rotation.", + GLOBAL_VAR(expire_logs_days), CMD_LINE(REQUIRED_ARG, OPT_EXPIRE_LOGS_DAYS), + VALID_RANGE(0, 99), DEFAULT(0), BLOCK_SIZE(1), NO_MUTEX_GUARD, + NOT_IN_BINLOG, ON_CHECK(check_expire_logs_days), ON_UPDATE(nullptr), + DEPRECATED("'@@binlog_expire_logs_seconds'")); + +static Sys_var_ulong Sys_binlog_expire_logs_seconds( + "binlog_expire_logs_seconds", + "If non-zero, binary logs will be purged after binlog_expire_logs_seconds" + " seconds; If both this option and expire_logs_days are set to non-zero" + " values, this option takes priority. Purges happen at" + " startup and at binary log rotation.", + GLOBAL_VAR(binlog_expire_logs_seconds), + CMD_LINE(REQUIRED_ARG, OPT_BINLOG_EXPIRE_LOGS_SECONDS), + VALID_RANGE(0, 0xFFFFFFFF), DEFAULT(2592000), BLOCK_SIZE(1), NO_MUTEX_GUARD, + NOT_IN_BINLOG, ON_CHECK(check_expire_logs_seconds), ON_UPDATE(nullptr)); static Sys_var_mybool Sys_flush( "flush", "Flush MyISAM tables to disk between SQL commands", |