Bug #18741 Can't close binlog (failed assertion)
Submitted: 3 Apr 2006 14:48 Modified: 6 Nov 2007 19:24
Reporter: Lars Thalmann Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.1 source OS:Any
Assigned to: Mats Kindahl CPU Architecture:Any

[3 Apr 2006 14:48] Lars Thalmann
Description:
Assertion in binlog_close_connection failed for a failed OPTIMIZE statement 
(rpl_failed_optimize.test).  The bug is hard to repeat.

mysqld: log.cc:1053: int binlog_close_connection(THD*): Assertion `mysql_bin_log.is_open() && trx_data->empty()' failed.

How to repeat:
Could not repeat it.

Suggested fix:
1. Split DBUG_ASSERT(mysql_bin_log.is_open() && trx_data->empty());
    into two assertions, so that it is easier to debug if this happens again.
    In log.cc line 1053 in function binlog_close_connection.

2. Check how binlog can be closed and ensure that all possible ways 
    ensure that the assertion is true.
[18 Sep 2006 9:55] Paul McCullagh
This assertion also fails every time when performing the following test, with the latest BK source tree:

./mysql-test-run --mysqld=--default-storage-engine=innodb --start-from=rpl_loaddata
[6 Nov 2007 19:24] Mats Kindahl
I tried to repeat this bug in 5.1.23-beta and failed to repeat it even with Paul's tips. There has been a number of changes in the handling of the log events that might have patched this bug, so I'm closing this with a "Can't repeat". Open it again if the bug appears again.