Bug #107247 Documentation on binlog_expire_logs_auto_purge
Submitted: 9 May 2022 23:17 Modified: 13 May 2022 18:37
Reporter: Mershad Irani Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: Jon Stephens CPU Architecture:Any

[9 May 2022 23:17] Mershad Irani
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.
[10 May 2022 7:26] MySQL Verification Team
Hello Mershad,

Thank you for the report and feedback.

regards,
Umesh
[12 May 2022 13:23] Jon Stephens
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly.

Fixed in mysqldoc rev 73186.

Closed.