Bug #13360 a Query_log_event between a Table_map and a Rows_log_event crashes RBR slave
Submitted: 20 Sep 2005 21:19 Modified: 21 Oct 2005 11:11
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.0-wl1012 OS:Any (ALL)
Assigned to: Mats Kindahl CPU Architecture:Any

[20 Sep 2005 21:19] Guilhem Bichot
Description:
Such order can happen in binlog in valid situations presently, see how-to-repeat; slave should not crash.

How to repeat:
modify rpl_row_delayed_ins.test by removing the no_write_to_binlog keyword in it;
you'll see in binlog:
a Table_map (due to INSERT DELAYED)
then FLUSH TABLES (Query event)
then a Write_rows (due to INSERT DEALYED)
(I see this, you should see it too though it a little timing-dependent).
Then slave crashes.
[1 Oct 2005 15:54] Guilhem Bichot
The one who will fix this bug may remove two assertions like
DBUG_ASSERT(!rli->m_table_map.count());
from log_event.cc.
[3 Oct 2005 12:09] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/30632