Bug #43372 Assertion failed: trx_data->empty()
Submitted: 4 Mar 2009 14:53 Modified: 30 Nov 2009 21:21
Reporter: Tim Clark Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DB2SE for IBM i Severity:S2 (Serious)
Version:5.1.30 OS:Any
Assigned to: CPU Architecture:Any
Tags: assertion, binlog_close_connection, disconnect, trx_data

[4 Mar 2009 14:53] Tim Clark
Description:
After running the statements described below against the IBMDB2I storage engine, the server dies in binlog_close_connection() when the client connection ends. 

Assertion failed: trx_data->empty(), file 
  ./source/mysql-5.1.30/sql/log.cc, line 1337

How to repeat:
I put the following lines in a test file and use mysql-test-run to run them against a server started with options "--binlog-format=row --log-bin=/tmp/blah". The test will pass, but on completion, the server will die with the assertion described above.

create table t1(a int not null) engine=ibmdb2i;
set autocommit=0;
insert into t1 values (1);
set autocommit=1;
drop table t1;

Suggested fix:
It looks like the binlog is not getting flushed after the drop table command. I'm not sure how to fix this.
[6 Mar 2009 19:29] Tim Clark
After further investigation, I believe that this is directly related to Bug#37221, which was only fixed in 6.0.