Bug #46554 Unecessary Delete_rows events in azalea may harm replication's performance
Submitted: 4 Aug 21:50
Reporter: Alfranio Correia
Status: Verified
Category:Server: RBR Severity:S3 (Non-critical)
Version:5.4+ OS:Any
Assigned to: Alfranio Correia Target Version:
Tags: row-based replication, performance
Triage: Triaged: D3 (Medium) / R1 (None/Negligible) / E3 (Medium)

[4 Aug 21:50] Alfranio Correia
Description:
Delete operations in row mode are creating an event per row what may unnecessarily
increase the size of the binary logs and harm replication's
performance.  

How to repeat:
Run the test case below in both 5.1 and azalea 

--source include/have_innodb.inc
--source include/master-slave.inc
--source include/have_binlog_format_row.inc

CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(100)) ENGINE=Innodb;

INSERT INTO t1 VALUES (1,'a'), (2,'b'), (3, 'c');

DELETE FROM t1;

SHOW BINLOG EVENTS;

DROP TABLE t1;

exit;

Result for the delete operation in 5.1:

master-bin.000001       430     Query   1       498     BEGIN
master-bin.000001       498     Table_map       1       542     table_id: 23 (test.t1)
master-bin.000001       542     Delete_rows     1       595     table_id: 23 flags:
STMT_END_F
master-bin.000001       595     Xid     1       622     COMMIT /* xid=23 */

Result for the delete operation in azalea:

master-bin.000001       431     Query   1       499     BEGIN
master-bin.000001       499     Table_map       1       543     table_id: 25 (test.t1)
master-bin.000001       543     Delete_rows     1       577     table_id: 25
master-bin.000001       577     Delete_rows     1       611     table_id: 25
master-bin.000001       611     Delete_rows     1       645     table_id: 25 flags:
STMT_END_F
master-bin.000001       645     Xid     1       672     COMMIT /* xid=27 */