Bug #101221 Error message when setting binlog_expire_logs_seconds with expire_logs_days
Submitted: 18 Oct 2020 8:58 Modified: 19 Oct 2020 12:41
Reporter: Sveta Smirnova (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:8.0.21 OS:Any
Assigned to: CPU Architecture:Any

[18 Oct 2020 8:58] Sveta Smirnova
Description:
Variables binlog_expire_logs_seconds and expire_logs_days cannot be used together. According to https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_... "If a non-zero value for both of those variables is set at startup, the value for binlog_expire_logs_seconds is used as the binary log expiration period, and the value for expire_logs_days is ignored with a warning message."

However, when I change both these variables dynamically, the same warning printed, but variable which has a positive value before the change is in effect.

How to repeat:
mysql> set global binlog_expire_logs_seconds=0;
Query OK, 0 rows affected (0.00 sec)

mysql> set global expire_logs_days=1;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> set global binlog_expire_logs_seconds=2592000;
ERROR 11079 (HY000): The option expire_logs_days cannot be used together with option binlog_expire_logs_seconds. Therefore, value of expire_logs_days is ignored.
mysql> select @@binlog_expire_logs_seconds;
+------------------------------+
| @@binlog_expire_logs_seconds |
+------------------------------+
|                            0 |
+------------------------------+
1 row in set (0.00 sec)

Suggested fix:
Print message that the variable binlog_expire_logs_seconds cannot be set while expire_logs_days is positive.
[19 Oct 2020 12:41] MySQL Verification Team
Hello Sveta,

Thank you for the report and feedback.
Verified as described.

regards,
Umesh