Bug #7236 --expire_logs_days does not apply if all statements happen in transactions
Submitted: 13 Dec 2004 14:16 Modified: 10 Jan 2005 10:11
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:4.1 OS:Any (all)
Assigned to: Guilhem Bichot CPU Architecture:Any

[13 Dec 2004 14:16] Guilhem Bichot
expire_logs_days variable is checked in
bool MYSQL_LOG::write(Log_event* event_info)
but not in
bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache, bool commit_or_rollback).
So it is checked only if an autocommit statement causes binlog rotation. But if all statements happen in transaction (BEGIN; ... COMMIT;) then first method never causes rotation (as it writes to memory cache), and it's second method which does, but does not test expire_logs_days.

How to repeat:
see code.

Suggested fix:
should be fixed in 4.1.9, after 4.1.8 gets out.
[10 Jan 2005 10:11] Guilhem Bichot
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at

Additional info:

Fixed in 4.1.9 in
ChangeSet@1.2180.9.1, 2005-01-06 23:53:58+01:00, guilhem@mysql.com