Bug #19995 Extreneous table maps generated for statements that does not generate rows
Submitted: 22 May 2006 10:20 Modified: 22 Jun 2006 8:11
Reporter: Mats Kindahl Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S3 (Non-critical)
Version:5.1 OS:Any (ALL)
Assigned to: Mats Kindahl CPU Architecture:Any

[22 May 2006 10:20] Mats Kindahl
Description:
When a statement is executed that does not generate any rows, an extra table map event and associated binrows event (for terminating the statement) is generated.

How to repeat:
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
DELETE FROM t1 WHERE a = 0;

Suggested fix:
Do not generate table maps when no rows will be written to the binary log.
[21 Jun 2006 14:21] Lars Thalmann
Pushed into 5.1.12
[22 Jun 2006 8:11] MC Brown
This has been documented in the ChangeLog for 5.1.12: 

When a statement is executed that does not generate any rows, an extra table map
event and associated binrows event would be generated and written to the binary log. (Bug #19995)
[22 Jun 2006 11:28] 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/commits/8064