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.