Description:
I wanted to seek clarification on binlog_expire_logs_auto_purge
According to the doc, this variable
"
binlog_expire_logs_auto_purge enables or disables automatic purging of binary log files. Setting this variable to ON (the default) enables automatic purging; setting it to OFF disables automatic purging.
This setting overrides any other variables or options used to control purging of binary log files, such as binlog_expire_logs_seconds. "
"
However on evaluating this variable, this variable does not override binlog_expire_logs_seconds.
Below is the outcome of my evaluation.
* I executed "flush binary logs" to force purging of binary logs.
* When binlog_expire_logs_seconds =10 and binlog_expire_logs_auto_purge = ON binlogs older than 10 seconds are purged.
* When binlog_expire_logs_seconds = 10 and binlog_expire_logs_auto_purge = OFF binlogs older than 10 seconds are not purged.
So as per my understanding this variable serves as a switch on top of binlog_expire_logs_seconds
Initially this gave me an impression, that irrespective of what value you set for binlog_expire_logs_seconds, the binlog gets auto purged when you execute "flush binary logs".
So I would word it something like this.
"
binlog_expire_logs_seconds enables or disables automatic purging of binary log files. Setting this variable to ON (the default) enables automatic purging; setting it to OFF disables automatic purging of expired binary log files.
The parameter binlog_expire_logs_seconds dictates the binary log expiration period.
"
Reference: https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_...
How to repeat:
Not applicable.