summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/main/mysqld--help.result6
-rw-r--r--mysql-test/suite/binlog/r/binlog_expire_logs_seconds.result10
-rw-r--r--mysql-test/suite/binlog/t/binlog_expire_logs_seconds.test8
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_expire_logs_seconds_basic.result15
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff8
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded.result6
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff8
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result6
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_expire_logs_seconds_basic.test3
9 files changed, 47 insertions, 23 deletions
diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result
index 73f4b512ed5..5857d234525 100644
--- a/mysql-test/main/mysqld--help.result
+++ b/mysql-test/main/mysqld--help.result
@@ -79,8 +79,8 @@ The following specify which files/extra groups are read (specified before remain
--binlog-expire-logs-seconds=#
If non-zero, binary logs will be purged after
binlog_expire_logs_seconds seconds; It and
- expire_logs_days are aliases, such that changes in one
- are converted into the other. Possible purges happen at
+ expire_logs_days are linked, such that changes in one are
+ converted into the other. Possible purges happen at
startup and at binary log rotation.
--binlog-file-cache-size=#
The size of file cache for the binary log
@@ -275,7 +275,7 @@ The following specify which files/extra groups are read (specified before remain
--expire-logs-days=#
If non-zero, binary logs will be purged after
expire_logs_days days; It and binlog_expire_logs_seconds
- are aliases, such that changes in one are converted into
+ are linked, such that changes in one are converted into
the other, presentable as a decimal value with 1/1000000
of the day precision; possible purges happen at startup
and at binary log rotation
diff --git a/mysql-test/suite/binlog/r/binlog_expire_logs_seconds.result b/mysql-test/suite/binlog/r/binlog_expire_logs_seconds.result
index 7f19591cc71..11c52683d42 100644
--- a/mysql-test/suite/binlog/r/binlog_expire_logs_seconds.result
+++ b/mysql-test/suite/binlog/r/binlog_expire_logs_seconds.result
@@ -136,5 +136,15 @@ SELECT @@expire_logs_days;
SELECT @@binlog_expire_logs_seconds as Expected_1;
Expected_1
1
+####
+#### 2.5. binlog_expire_logs_seconds = 8553600, testing max value 99days
+####
+SET GLOBAL binlog_expire_logs_seconds= 8553600;
+SELECT @@expire_logs_days;
+@@expire_logs_days
+99.000000
+SELECT @@binlog_expire_logs_seconds as Expected_8553600;
+Expected_8553600
+8553600
SET GLOBAL binlog_expire_logs_seconds= 0;
SET GLOBAL expire_logs_days= 0.000000;
diff --git a/mysql-test/suite/binlog/t/binlog_expire_logs_seconds.test b/mysql-test/suite/binlog/t/binlog_expire_logs_seconds.test
index 2075a37cf10..bb53f2c4130 100644
--- a/mysql-test/suite/binlog/t/binlog_expire_logs_seconds.test
+++ b/mysql-test/suite/binlog/t/binlog_expire_logs_seconds.test
@@ -13,6 +13,7 @@
# 2.2. binlog_expire_logs_seconds > 0 and expire_logs_days = 0
# 2.3. binlog_expire_logs_seconds = 0 and expire_logs_days > 0
# 2.4. binlog_expire_logs_seconds = 1, testing smallest value
+# 2.5. binlog_expire_logs_seconds = 8553600, testing max value 99days
#
# Additional tests for the boundaries of expire_logs_days already
# exist on the sys_vars.expire_logs_days_basic test case.
@@ -109,6 +110,13 @@ SET GLOBAL binlog_expire_logs_seconds= 1;
SELECT @@expire_logs_days;
SELECT @@binlog_expire_logs_seconds as Expected_1;
+--echo ####
+--echo #### 2.5. binlog_expire_logs_seconds = 8553600, testing max value 99days
+--echo ####
+SET GLOBAL binlog_expire_logs_seconds= 8553600;
+SELECT @@expire_logs_days;
+SELECT @@binlog_expire_logs_seconds as Expected_8553600;
+
# 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/sys_vars/r/binlog_expire_logs_seconds_basic.result b/mysql-test/suite/sys_vars/r/binlog_expire_logs_seconds_basic.result
index c0ac3f35fae..11dc27ecfe7 100644
--- 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
@@ -2,7 +2,6 @@ SET @start_value_sec = @@global.binlog_expire_logs_seconds;
SELECT @start_value_sec;
@start_value_sec
0
-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
@@ -49,22 +48,28 @@ Warnings:
Warning 1292 Truncated incorrect binlog_expire_logs_seconds value: '42949672950'
SELECT @@global.binlog_expire_logs_seconds;
@@global.binlog_expire_logs_seconds
-4294967295
+8553600
+SET @@global.binlog_expire_logs_seconds = 8734635;
+Warnings:
+Warning 1292 Truncated incorrect binlog_expire_logs_seconds value: '8734635'
+SELECT @@global.binlog_expire_logs_seconds;
+@@global.binlog_expire_logs_seconds
+8553600
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
+8553600
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
+8553600
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
+8553600
SELECT @@global.binlog_expire_logs_seconds = VARIABLE_VALUE
FROM information_schema.global_variables
WHERE VARIABLE_NAME='binlog_expire_logs_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 144db99a163..6da30c14c7e 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 @@
---- ../../mysql-test/suite/sys_vars/r/sysvars_server_embedded.result 2021-05-10 08:58:14.515886306 +0530
-+++ ../../mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.reject 2021-05-10 09:16:56.826971068 +0530
+--- ../../mysql-test/suite/sys_vars/r/sysvars_server_embedded.result 2021-05-11 19:44:57.048781628 +0530
++++ ../../mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.reject 2021-05-12 15:26:31.616449925 +0530
@@ -34,7 +34,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_BLOCK_SIZE
@@ -170,9 +170,9 @@
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; It and expire_logs_days are aliases, such that changes in one are converted into the other. Possible purges happen at startup and at binary log rotation.
+ VARIABLE_COMMENT If non-zero, binary logs will be purged after binlog_expire_logs_seconds seconds; It and expire_logs_days are linked, such that changes in one are converted into the other. Possible purges happen at startup and at binary log rotation.
NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_MAX_VALUE 8553600
@@ -397,7 +397,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of file cache for the binary log
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 a322a835d6d..fcd70be7cad 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
@@ -385,9 +385,9 @@ 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; It and expire_logs_days are aliases, such that changes in one are converted into the other. Possible purges happen at startup and at binary log rotation.
+VARIABLE_COMMENT If non-zero, binary logs will be purged after binlog_expire_logs_seconds seconds; It and expire_logs_days are linked, such that changes in one are converted into the other. Possible purges happen at startup and at binary log rotation.
NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 4294967295
+NUMERIC_MAX_VALUE 8553600
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -915,7 +915,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME EXPIRE_LOGS_DAYS
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE DOUBLE
-VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; It and binlog_expire_logs_seconds are aliases, such that changes in one are converted into the other, presentable as a decimal value with 1/1000000 of the day precision; 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; It and binlog_expire_logs_seconds are linked, such that changes in one are converted into the other, presentable as a decimal value with 1/1000000 of the day precision; possible purges happen at startup and at binary log rotation
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 99
NUMERIC_BLOCK_SIZE NULL
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 a6a529fd739..d4852f1aef9 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 @@
---- ../../mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result 2021-05-10 08:42:29.501443605 +0530
-+++ ../../mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.reject 2021-05-10 09:19:21.925772681 +0530
+--- ../../mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result 2021-05-12 15:30:19.783373551 +0530
++++ ../../mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.reject 2021-05-12 15:32:40.170343130 +0530
@@ -34,7 +34,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_BLOCK_SIZE
@@ -170,9 +170,9 @@
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; It and expire_logs_days are aliases, such that changes in one are converted into the other. Possible purges happen at startup and at binary log rotation.
+ VARIABLE_COMMENT If non-zero, binary logs will be purged after binlog_expire_logs_seconds seconds; It and expire_logs_days are linked, such that changes in one are converted into the other. Possible purges happen at startup and at binary log rotation.
NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_MAX_VALUE 8553600
@@ -397,7 +397,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of file cache for the binary log
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 886ca52fdab..4dc527efcad 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
@@ -385,9 +385,9 @@ 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; It and expire_logs_days are aliases, such that changes in one are converted into the other. Possible purges happen at startup and at binary log rotation.
+VARIABLE_COMMENT If non-zero, binary logs will be purged after binlog_expire_logs_seconds seconds; It and expire_logs_days are linked, such that changes in one are converted into the other. Possible purges happen at startup and at binary log rotation.
NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 4294967295
+NUMERIC_MAX_VALUE 8553600
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -935,7 +935,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME EXPIRE_LOGS_DAYS
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE DOUBLE
-VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; It and binlog_expire_logs_seconds are aliases, such that changes in one are converted into the other, presentable as a decimal value with 1/1000000 of the day precision; 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; It and binlog_expire_logs_seconds are linked, such that changes in one are converted into the other, presentable as a decimal value with 1/1000000 of the day precision; possible purges happen at startup and at binary log rotation
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 99
NUMERIC_BLOCK_SIZE NULL
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
index 83c4b412466..45704560441 100644
--- 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
@@ -35,7 +35,6 @@ 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;
@@ -72,6 +71,8 @@ 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;
+SET @@global.binlog_expire_logs_seconds = 8734635;
+SELECT @@global.binlog_expire_logs_seconds;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.binlog_expire_logs_seconds = ON;