Skip to content

Commit a7e89b5

Browse files
author
Neha Kumari
committed
WL#11006: Remove expire-logs-days
In this worklog we remove all the codes and tests related to system variable expire_logs_days. Change-Id: Ie19403460df7975c04b268fb00ff7a93fe61967d
1 parent 1ec7c07 commit a7e89b5

38 files changed

+106
-1631
lines changed

mysql-test/extra/binlog_tests/binlog_expire_warnings.inc

-145
This file was deleted.

mysql-test/r/all_persisted_variables.result

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ include/assert.inc [Expect 500+ variables in the table. Due to open Bugs, we are
4646

4747
# Test SET PERSIST
4848

49-
include/assert.inc [Expect 449 persisted variables in the table.]
49+
include/assert.inc [Expect 448 persisted variables in the table.]
5050

5151
************************************************************
5252
* 3. Restart server, it must preserve the persisted variable
5353
* settings. Verify persisted configuration.
5454
************************************************************
5555
# restart
5656

57-
include/assert.inc [Expect 449 persisted variables in persisted_variables table.]
58-
include/assert.inc [Expect 449 persisted variables shown as PERSISTED in variables_info table.]
59-
include/assert.inc [Expect 449 persisted variables with matching peristed and global values.]
57+
include/assert.inc [Expect 448 persisted variables in persisted_variables table.]
58+
include/assert.inc [Expect 448 persisted variables shown as PERSISTED in variables_info table.]
59+
include/assert.inc [Expect 448 persisted variables with matching peristed and global values.]
6060

6161
************************************************************
6262
* 4. Test RESET PERSIST IF EXISTS. Verify persisted variable

mysql-test/r/flush2.result

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
select @@GLOBAL.relay_log_info_repository into @save_relay_log_info_repository;
22
Warnings:
33
Warning 1287 '@@relay_log_info_repository' is deprecated and will be removed in a future release.
4-
select @@GLOBAL.expire_logs_days into @save_expire_logs_days;
5-
Warnings:
6-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
4+
select @@GLOBAL.binlog_expire_logs_seconds into @save_binlog_expire_logs_seconds;
75
set @@GLOBAL.relay_log_info_repository = 'FILE';
86
Warnings:
97
Warning 1287 '@@relay_log_info_repository' is deprecated and will be removed in a future release.
108
flush logs;
11-
set global expire_logs_days = 3;
12-
Warnings:
13-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
9+
set global binlog_expire_logs_seconds = 259200;
1410
show variables like 'log_bin%';
1511
Variable_name Value
1612
log_bin OFF
@@ -49,6 +45,4 @@ relay_log_space_limit 0
4945
set @@GLOBAL.relay_log_info_repository = @save_relay_log_info_repository;
5046
Warnings:
5147
Warning 1287 '@@relay_log_info_repository' is deprecated and will be removed in a future release.
52-
set @@GLOBAL.expire_logs_days = @save_expire_logs_days;
53-
Warnings:
54-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
48+
set @@GLOBAL.binlog_expire_logs_seconds = @save_binlog_expire_logs_seconds;

mysql-test/r/mysqld--help-notwin.result

+2-13
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,8 @@ The following options may be given as the first argument:
130130
(Defaults to on; use --skip-binlog-expire-logs-auto-purge to disable.)
131131
--binlog-expire-logs-seconds=#
132132
If non-zero, binary logs will be purged after
133-
binlog_expire_logs_seconds seconds; If both this option
134-
and expire_logs_days are set to non-zero values, this
135-
option takes priority. Purges happen at startup and at
136-
binary log rotation.
133+
binlog_expire_logs_seconds seconds; Purges happen at
134+
startup and at binary log rotation.
137135
--binlog-format=name
138136
The format used when writing the binary log. ROW writes
139137
each changed row in a binary format. STATEMENT writes SQL
@@ -364,14 +362,6 @@ The following options may be given as the first argument:
364362
and DISABLED (keep the event scheduler completely
365363
deactivated, it cannot be activated run-time)
366364
-T, --exit-info[=#] Used for debugging. Use at your own risk.
367-
--expire-logs-days=#
368-
If non-zero, binary logs will be purged after
369-
expire_logs_days days; If this option alone is set on the
370-
command line or in a configuration file, it overrides the
371-
default value for binlog-expire-logs-seconds. If both
372-
options are set to nonzero values,
373-
binlog-expire-logs-seconds takes priority. Possible
374-
purges happen at startup and at binary log rotation.
375365
--explain-format[=name]
376366
The default format in which the EXPLAIN statement
377367
displays information. Valid values are TRADITIONAL
@@ -1747,7 +1737,6 @@ end-markers-in-json FALSE
17471737
enforce-gtid-consistency FALSE
17481738
eq-range-index-dive-limit 200
17491739
event-scheduler ON
1750-
expire-logs-days 0
17511740
explain-format TRADITIONAL
17521741
explicit-defaults-for-timestamp TRUE
17531742
external-locking FALSE

mysql-test/r/mysqld--help-win.result

+2-13
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,8 @@ The following options may be given as the first argument:
130130
(Defaults to on; use --skip-binlog-expire-logs-auto-purge to disable.)
131131
--binlog-expire-logs-seconds=#
132132
If non-zero, binary logs will be purged after
133-
binlog_expire_logs_seconds seconds; If both this option
134-
and expire_logs_days are set to non-zero values, this
135-
option takes priority. Purges happen at startup and at
136-
binary log rotation.
133+
binlog_expire_logs_seconds seconds; Purges happen at
134+
startup and at binary log rotation.
137135
--binlog-format=name
138136
The format used when writing the binary log. ROW writes
139137
each changed row in a binary format. STATEMENT writes SQL
@@ -363,14 +361,6 @@ The following options may be given as the first argument:
363361
and DISABLED (keep the event scheduler completely
364362
deactivated, it cannot be activated run-time)
365363
-T, --exit-info[=#] Used for debugging. Use at your own risk.
366-
--expire-logs-days=#
367-
If non-zero, binary logs will be purged after
368-
expire_logs_days days; If this option alone is set on the
369-
command line or in a configuration file, it overrides the
370-
default value for binlog-expire-logs-seconds. If both
371-
options are set to nonzero values,
372-
binlog-expire-logs-seconds takes priority. Possible
373-
purges happen at startup and at binary log rotation.
374364
--explain-format[=name]
375365
The default format in which the EXPLAIN statement
376366
displays information. Valid values are TRADITIONAL
@@ -1757,7 +1747,6 @@ end-markers-in-json FALSE
17571747
enforce-gtid-consistency FALSE
17581748
eq-range-index-dive-limit 200
17591749
event-scheduler ON
1760-
expire-logs-days 0
17611750
explain-format TRADITIONAL
17621751
explicit-defaults-for-timestamp TRUE
17631752
external-locking FALSE

mysql-test/r/variables.result

-69
Original file line numberDiff line numberDiff line change
@@ -1414,75 +1414,6 @@ SET @@session.thread_stack= 7;
14141414
ERROR HY000: Variable 'thread_stack' is a read only variable
14151415
SET @@global.thread_stack= 7;
14161416
ERROR HY000: Variable 'thread_stack' is a read only variable
1417-
SELECT @@global.binlog_expire_logs_seconds INTO @old_seconds;
1418-
SET @@global.binlog_expire_logs_seconds = 0;
1419-
SELECT @@global.expire_logs_days INTO @old_eld;
1420-
Warnings:
1421-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
1422-
SET GLOBAL expire_logs_days = -1;
1423-
Warnings:
1424-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
1425-
Warning 1292 Truncated incorrect expire_logs_days value: '-1'
1426-
needs to've been adjusted (0)
1427-
SELECT @@global.expire_logs_days;
1428-
@@global.expire_logs_days
1429-
0
1430-
Warnings:
1431-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
1432-
SET GLOBAL expire_logs_days = 11;
1433-
Warnings:
1434-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
1435-
SET @old_mode=@@sql_mode;
1436-
SET SESSION sql_mode = 'TRADITIONAL';
1437-
SET GLOBAL expire_logs_days = 100;
1438-
ERROR 42000: Variable 'expire_logs_days' can't be set to the value of '100'
1439-
needs to be unchanged (11)
1440-
SELECT @@global.expire_logs_days;
1441-
@@global.expire_logs_days
1442-
11
1443-
Warnings:
1444-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
1445-
SET SESSION sql_mode = @old_mode;
1446-
SET GLOBAL expire_logs_days = 100;
1447-
Warnings:
1448-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
1449-
Warning 1292 Truncated incorrect expire_logs_days value: '100'
1450-
needs to've been adjusted (99)
1451-
SELECT @@global.expire_logs_days;
1452-
@@global.expire_logs_days
1453-
99
1454-
Warnings:
1455-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
1456-
SET GLOBAL expire_logs_days = 11;
1457-
Warnings:
1458-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
1459-
SET GLOBAL expire_logs_days = 99;
1460-
Warnings:
1461-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
1462-
needs to pass with no warnings (99)
1463-
SELECT @@global.expire_logs_days;
1464-
@@global.expire_logs_days
1465-
99
1466-
Warnings:
1467-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
1468-
SET GLOBAL expire_logs_days = @old_eld;
1469-
Warnings:
1470-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
1471-
SET GLOBAL binlog_expire_logs_seconds= @old_seconds;
1472-
SET @@global.binlog_expire_logs_seconds=0;
1473-
SET @@global.expire_logs_days = 1;
1474-
Warnings:
1475-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
1476-
SET @@global.binlog_expire_logs_seconds=5;
1477-
ERROR HY000: The option expire_logs_days cannot be used together with option binlog_expire_logs_seconds. To set one, first unset the other by setting it to 0.
1478-
SET @@global.expire_logs_days=0;
1479-
Warnings:
1480-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
1481-
SET @@global.binlog_expire_logs_seconds=5;
1482-
SET @@global.binlog_expire_logs_seconds=@old_seconds;
1483-
SET @@global.expire_logs_days=@old_eld;
1484-
Warnings:
1485-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
14861417
SET GLOBAL auto_increment_offset=-1;
14871418
Warnings:
14881419
Warning 1292 Truncated incorrect auto_increment_offset value: '-1'

mysql-test/suite/binlog/include/binlog_expire_logs_seconds.inc

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
#
22
# WL#9237: Add a new variable binlog_expire_logs_seconds
33

4-
# Here we will test purging of binary logs when either one or both of these variables are set
5-
# - binlog_expire_logs_seconds
6-
# - expire_logs_days
4+
# Here we will test purging of binary logs when - binlog_expire_logs_seconds
5+
# is set.
76

87
# The three scenarios being tested for are:
98
# 1. FLUSH LOGS
109
# 2. Rotation of logs because of binlog growing bigger than max_binlog_size
1110
# 3. Server restart
1211
#
13-
# Usuage: --let $binlog_expire_logs_seconds=
14-
# --let $expire_logs_days=
12+
# Usage: --let $binlog_expire_logs_seconds=
1513
#
1614
# --source suite/binlog/include/binlog_expire_logs_seconds.inc
1715

18-
--let $expire_logs_seconds= `SELECT @@global.binlog_expire_logs_seconds + @@global.expire_logs_days * 24 * 60 * 60`
16+
--let $expire_logs_seconds= `SELECT @@global.binlog_expire_logs_seconds`
1917

2018
CREATE TABLE t1(s LONGBLOB );
2119

mysql-test/suite/binlog/r/binlog_expire_logs_auto_purge.result

-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
SET @@global.expire_logs_days = 0;
2-
Warnings:
3-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
41
SET @@global.binlog_expire_logs_auto_purge = OFF;
52
FLUSH LOGS;
63
FLUSH LOGS;
@@ -26,7 +23,4 @@ PURGE BINARY LOGS BEFORE 'DATE';
2623
FLUSH LOGS;
2724
SET GLOBAL binlog_expire_logs_seconds=2592000;
2825
SET GLOBAL binlog_expire_logs_auto_purge=1;
29-
SET GLOBAL expire_logs_days=0;
30-
Warnings:
31-
Warning 1287 '@@expire_logs_days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
3226
RESET BINARY LOGS AND GTIDS;

0 commit comments

Comments
 (0)