List:Commits« Previous MessageNext Message »
From:Dao-Gang.Qu Date:August 31 2010 12:55am
Subject:bzr push into mysql-next-mr branch (Dao-Gang.Qu:3169 to 3170) WL#4033
View as plain text  
 3170 Dao-Gang.Qu@stripped	2010-08-06
      WL #4033 Support for informational log events
      
      Added test cases for requirement of QA notes
     @ mysql-test/include/have_binlog_rows_query.inc
        Added file to skip test cases if server doesn't support
        binlog_rows_query_log_events
     @ mysql-test/suite/rpl/r/rpl_ignorable_event.result
        Renamed to rpl_row_ignorable_event.result
     @ mysql-test/suite/rpl/r/rpl_row_ignorable_event.result
        Test result for WL#4033.
     @ mysql-test/suite/rpl/t/rpl_ignorable_event-master.opt
        Renamed to rpl_row_ignorable_event-master.opt
     @ mysql-test/suite/rpl/t/rpl_ignorable_event-slave.opt
        Renamed to rpl_row_ignorable_event-slave.opt
     @ mysql-test/suite/rpl/t/rpl_ignorable_event.test
        Renamed to rpl_row_ignorable_event.test
     @ mysql-test/suite/rpl/t/rpl_row_ignorable_event-master.opt
        Added the file to set the value of '--binlog-row-event-max-size',
        so that the load data statement can be logged in two rows and
        test that the Rows_query log event will work fine with the case.
     @ mysql-test/suite/rpl/t/rpl_row_ignorable_event-slave.opt
        Added the file to test replicate filter rules.
     @ mysql-test/suite/rpl/t/rpl_row_ignorable_event.test
        Added test file to verify if the query of the rows event
        is displayed with its rows event as comment in RBR by
        SHOW BINLOG EVENTS and MYSQLBINLOG DUMP.

    removed:
      mysql-test/suite/rpl/r/rpl_ignorable_event.result
      mysql-test/suite/rpl/t/rpl_ignorable_event-master.opt
      mysql-test/suite/rpl/t/rpl_ignorable_event-slave.opt
      mysql-test/suite/rpl/t/rpl_ignorable_event.test
    added:
      mysql-test/include/have_binlog_rows_query.inc
      mysql-test/r/have_binlog_rows_query.require
      mysql-test/suite/rpl/r/rpl_row_ignorable_event.result
      mysql-test/suite/rpl/t/rpl_row_ignorable_event-master.opt
      mysql-test/suite/rpl/t/rpl_row_ignorable_event-slave.opt
      mysql-test/suite/rpl/t/rpl_row_ignorable_event.test
 3169 Dao-Gang.Qu@stripped	2010-07-14
      WL#5404 Propagation of Rows_query log event when using a relay
             
      Rows_query was introduced to record the original query for rows events
      in RBR, but the Rows query will be lost when replicating on slave or
      re-applying the statments dumped by mysqlbinlog. This worklog will fix
      that.
     @ mysql-test/suite/rpl/t/rpl_ignorable_event-master.opt
        Added the file to set the value of '--binlog-row-event-max-size',
        so that the load data statement can be logged in two rows and
        test that the Rows_query log event will work fine with the case.
     @ mysql-test/suite/rpl/t/rpl_ignorable_event-slave.opt
        Added the file to test replicate filter rules.
     @ sql/log_event.cc
        Added code to make that the Rows_query log event can be applied
        and relayed
     @ sql/rpl_rli.cc
        Added code to clear the last Rows_query log event recorded
        in Relay_log_info when the SQL thread is stopped before
        executing its rows event
     @ sql/rpl_slave.cc
        Added code to invoke 'handle_rows_query_log_event' func to delay to
        delete the Rows_query log event untill all its rows event is applied
        on slave side
     @ sql/sql_binlog.cc
        Added code to invoke 'handle_rows_query_log_event' func to delay to
        delete the Rows_query log event untill all its rows event is applied
        on server side

    added:
      mysql-test/suite/rpl/t/rpl_ignorable_event-master.opt
      mysql-test/suite/rpl/t/rpl_ignorable_event-slave.opt
    modified:
      mysql-test/suite/rpl/r/rpl_ignorable_event.result
      mysql-test/suite/rpl/t/rpl_ignorable_event.test
      sql/log_event.cc
      sql/log_event.h
      sql/rpl_rli.cc
      sql/rpl_rli.h
      sql/rpl_slave.cc
      sql/sql_binlog.cc
=== added file 'mysql-test/include/have_binlog_rows_query.inc'
--- a/mysql-test/include/have_binlog_rows_query.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/have_binlog_rows_query.inc	2010-08-06 02:20:44 +0000
@@ -0,0 +1,13 @@
+# ==== Purpose ====
+# 
+# Ensure that the server is running with binlog_rows_query_log_events on
+#
+# ==== Usage ====
+#
+# source include/have_binlog_rows_query.inc;
+
+-- require r/have_binlog_rows_query.require
+disable_query_log;
+--replace_result ON OFF
+show variables like 'binlog_rows_query_log_events';
+enable_query_log;

=== added file 'mysql-test/r/have_binlog_rows_query.require'
--- a/mysql-test/r/have_binlog_rows_query.require	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/have_binlog_rows_query.require	2010-08-06 02:20:44 +0000
@@ -0,0 +1,2 @@
+Variable_name	Value
+binlog_rows_query_log_events	OFF

=== removed file 'mysql-test/suite/rpl/r/rpl_ignorable_event.result'
--- a/mysql-test/suite/rpl/r/rpl_ignorable_event.result	2010-07-14 07:30:15 +0000
+++ b/mysql-test/suite/rpl/r/rpl_ignorable_event.result	1970-01-01 00:00:00 +0000
@@ -1,962 +0,0 @@
-stop slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-reset master;
-reset slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-start slave;
-# Test non-transaction
-create table t1(a int, b int) engine= myisam;
-insert into t1(a,b) values(1,1),(2,1);
-update t1 set a = a + 5 where b = 1 LIMIT 1;
-delete from t1 where a = 6;
-# Test transaction
-create table t2(a int, b int) engine=innodb;
-begin;
-insert into t2(a,b) values(2,1),(3,1);
-update t2 set a = a + 5 where b = 1;
-delete from t2 where a = 7;
-commit;
-# Test mixed transaction
-begin;
-insert into t1(a,b) values(1,5);
-insert into t2(a,b) values(2,5);
-insert into t2(a,b) values(2,6);
-insert into t1(a,b) values(1,7);
-commit;
-drop table t1, t2;
-create table t3(a int, b int) engine= myisam;
-create table t4(a int, b int) engine= myisam;
-create table t5(a int, b int) engine= myisam;
-insert into t3(a, b) values(1,1);
-# Test the Rows_query log event will be filtered out if slave applys
-# '--replicate-ignore-table' option on the table
-insert into t4(a, b) values(2,1);
-# Test the Rows_query log event will be relayed if slave
-# filters out part Rows event from a rows statement
-update t3,t4 set t3.a=3, t4.a=4 where t3.b=t4.b;
-# Test the Rows_query log event will be filtered out if slave applys
-# '--replicate-wild-ignore-table' option on the table
-insert into t5(a, b) values(3,1);
-# Test the Rows_query log event will be filtered out if slave filters
-# out all its related tables by replication filtering rules
-update t4,t5 set t4.a=4, t5.a=5 where t4.b=t5.b;
-# Test insert delayed ...
-insert delayed into t3(a,b) values(1,5),(1,6),(1,7);
-# Test load data infile
-create table t6(a VARCHAR(60)) engine= myisam;
-load data infile '../../std_data/words.dat' into table t6;
-drop table t3, t6;
-drop table t4, t5;
-# SHOW BINLOG EVENTS ON MASTER before '--exec MYSQL_BINLOG'
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; create table t1(a int, b int) engine= myisam
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,1),(2,1)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# update t1 set a = a + 5 where b = 1 LIMIT 1
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# delete from t1 where a = 6
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
-master-bin.000001	#	Query	#	#	use `test`; create table t2(a int, b int) engine=innodb
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,1),(3,1)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Rows_query	#	#	# update t2 set a = a + 5 where b = 1
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Rows_query	#	#	# delete from t2 where a = 7
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,7)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,6)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; drop table t1, t2
-master-bin.000001	#	Query	#	#	use `test`; create table t3(a int, b int) engine= myisam
-master-bin.000001	#	Query	#	#	use `test`; create table t4(a int, b int) engine= myisam
-master-bin.000001	#	Query	#	#	use `test`; create table t5(a int, b int) engine= myisam
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# insert into t3(a, b) values(1,1)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# insert into t4(a, b) values(2,1)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# update t3,t4 set t3.a=3, t4.a=4 where t3.b=t4.b
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
-master-bin.000001	#	Update_rows	#	#	table_id: #
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# insert into t5(a, b) values(3,1)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t5)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# update t4,t5 set t4.a=4, t5.a=5 where t4.b=t5.b
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t5)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# insert delayed into t3(a,b) values(1,5),(1,6),(1,7)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
-master-bin.000001	#	Query	#	#	use `test`; create table t6(a VARCHAR(60)) engine= myisam
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# load data infile '../../std_data/words.dat' into table t6
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
-master-bin.000001	#	Query	#	#	use `test`; drop table t3, t6
-master-bin.000001	#	Query	#	#	use `test`; drop table t4, t5
-# MYSQL_BINLOG output base on master-bin.000001
-/*!40019 SET @@session.max_insert_delayed_threads=0*/;
-/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-DELIMITER /*!*/;
-# at #
-#server id #  end_log_pos # 	Start: binlog v#, server v #.##.## created # #:#:# at startup
-# Warning: this binlog is either in use or was not closed properly.
-ROLLBACK/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-use test/*!*/;
-SET TIMESTAMP=t/*!*/;
-SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
-SET @@session.sql_mode=0/*!*/;
-SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
-/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
-SET @@session.lc_time_names=0/*!*/;
-SET @@session.collation_database=DEFAULT/*!*/;
-create table t1(a int, b int) engine= myisam
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-BEGIN
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Rows_query
-# insert into t1(a,b) values(1,1),(2,1)
-# at #
-# at #
-#server id #  end_log_pos # 	Table_map: `test`.`t1` mapped to number #
-#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
-### INSERT INTO test.t1
-### SET
-###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-### INSERT INTO test.t1
-### SET
-###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-COMMIT
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-BEGIN
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Rows_query
-# update t1 set a = a + 5 where b = 1 LIMIT 1
-# at #
-# at #
-#server id #  end_log_pos # 	Table_map: `test`.`t1` mapped to number #
-#server id #  end_log_pos # 	Update_rows: table id # flags: STMT_END_F
-### UPDATE test.t1
-### WHERE
-###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-### SET
-###   @1=6 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-COMMIT
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-BEGIN
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Rows_query
-# delete from t1 where a = 6
-# at #
-# at #
-#server id #  end_log_pos # 	Table_map: `test`.`t1` mapped to number #
-#server id #  end_log_pos # 	Delete_rows: table id # flags: STMT_END_F
-### DELETE FROM test.t1
-### WHERE
-###   @1=6 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-COMMIT
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-create table t2(a int, b int) engine=innodb
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-BEGIN
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Rows_query
-# insert into t2(a,b) values(2,1),(3,1)
-# at #
-# at #
-#server id #  end_log_pos # 	Table_map: `test`.`t2` mapped to number #
-#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
-### INSERT INTO test.t2
-### SET
-###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-### INSERT INTO test.t2
-### SET
-###   @1=3 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-# at #
-#server id #  end_log_pos # 	Rows_query
-# update t2 set a = a + 5 where b = 1
-# at #
-# at #
-#server id #  end_log_pos # 	Table_map: `test`.`t2` mapped to number #
-#server id #  end_log_pos # 	Update_rows: table id # flags: STMT_END_F
-### UPDATE test.t2
-### WHERE
-###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-### SET
-###   @1=7 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-### UPDATE test.t2
-### WHERE
-###   @1=3 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-### SET
-###   @1=8 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-# at #
-#server id #  end_log_pos # 	Rows_query
-# delete from t2 where a = 7
-# at #
-# at #
-#server id #  end_log_pos # 	Table_map: `test`.`t2` mapped to number #
-#server id #  end_log_pos # 	Delete_rows: table id # flags: STMT_END_F
-### DELETE FROM test.t2
-### WHERE
-###   @1=7 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-# at #
-#server id #  end_log_pos # 	Xid = #
-COMMIT/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-BEGIN
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Rows_query
-# insert into t1(a,b) values(1,5)
-# at #
-# at #
-#server id #  end_log_pos # 	Table_map: `test`.`t1` mapped to number #
-#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
-### INSERT INTO test.t1
-### SET
-###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=5 /* INT meta=0 nullable=1 is_null=0 */
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-COMMIT
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-BEGIN
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Rows_query
-# insert into t1(a,b) values(1,7)
-# at #
-# at #
-#server id #  end_log_pos # 	Table_map: `test`.`t1` mapped to number #
-#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
-### INSERT INTO test.t1
-### SET
-###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=7 /* INT meta=0 nullable=1 is_null=0 */
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-COMMIT
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-BEGIN
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Rows_query
-# insert into t2(a,b) values(2,5)
-# at #
-# at #
-#server id #  end_log_pos # 	Table_map: `test`.`t2` mapped to number #
-#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
-### INSERT INTO test.t2
-### SET
-###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=5 /* INT meta=0 nullable=1 is_null=0 */
-# at #
-#server id #  end_log_pos # 	Rows_query
-# insert into t2(a,b) values(2,6)
-# at #
-# at #
-#server id #  end_log_pos # 	Table_map: `test`.`t2` mapped to number #
-#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
-### INSERT INTO test.t2
-### SET
-###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=6 /* INT meta=0 nullable=1 is_null=0 */
-# at #
-#server id #  end_log_pos # 	Xid = #
-COMMIT/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-drop table t1, t2
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-create table t3(a int, b int) engine= myisam
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-create table t4(a int, b int) engine= myisam
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-create table t5(a int, b int) engine= myisam
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-BEGIN
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Rows_query
-# insert into t3(a, b) values(1,1)
-# at #
-# at #
-#server id #  end_log_pos # 	Table_map: `test`.`t3` mapped to number #
-#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
-### INSERT INTO test.t3
-### SET
-###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-COMMIT
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-BEGIN
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Rows_query
-# insert into t4(a, b) values(2,1)
-# at #
-# at #
-#server id #  end_log_pos # 	Table_map: `test`.`t4` mapped to number #
-#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
-### INSERT INTO test.t4
-### SET
-###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-COMMIT
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-BEGIN
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Rows_query
-# update t3,t4 set t3.a=3, t4.a=4 where t3.b=t4.b
-# at #
-# at #
-# at #
-# at #
-#server id #  end_log_pos # 	Table_map: `test`.`t3` mapped to number #
-#server id #  end_log_pos # 	Table_map: `test`.`t4` mapped to number #
-#server id #  end_log_pos # 	Update_rows: table id #
-#server id #  end_log_pos # 	Update_rows: table id # flags: STMT_END_F
-### UPDATE test.t3
-### WHERE
-###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-### SET
-###   @1=3 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-### UPDATE test.t4
-### WHERE
-###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-### SET
-###   @1=4 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-COMMIT
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-BEGIN
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Rows_query
-# insert into t5(a, b) values(3,1)
-# at #
-# at #
-#server id #  end_log_pos # 	Table_map: `test`.`t5` mapped to number #
-#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
-### INSERT INTO test.t5
-### SET
-###   @1=3 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-COMMIT
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-BEGIN
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Rows_query
-# update t4,t5 set t4.a=4, t5.a=5 where t4.b=t5.b
-# at #
-# at #
-# at #
-#server id #  end_log_pos # 	Table_map: `test`.`t4` mapped to number #
-#server id #  end_log_pos # 	Table_map: `test`.`t5` mapped to number #
-#server id #  end_log_pos # 	Update_rows: table id # flags: STMT_END_F
-### UPDATE test.t5
-### WHERE
-###   @1=3 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-### SET
-###   @1=5 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-COMMIT
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-BEGIN
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Rows_query
-# insert delayed into t3(a,b) values(1,5),(1,6),(1,7)
-# at #
-# at #
-#server id #  end_log_pos # 	Table_map: `test`.`t3` mapped to number #
-#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
-### INSERT INTO test.t3
-### SET
-###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=5 /* INT meta=0 nullable=1 is_null=0 */
-### INSERT INTO test.t3
-### SET
-###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=6 /* INT meta=0 nullable=1 is_null=0 */
-### INSERT INTO test.t3
-### SET
-###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
-###   @2=7 /* INT meta=0 nullable=1 is_null=0 */
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-COMMIT
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-create table t6(a VARCHAR(60)) engine= myisam
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-BEGIN
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Rows_query
-# load data infile '../../std_data/words.dat' into table t6
-# at #
-# at #
-# at #
-#server id #  end_log_pos # 	Table_map: `test`.`t6` mapped to number #
-#server id #  end_log_pos # 	Write_rows: table id #
-#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
-### INSERT INTO test.t6
-### SET
-###   @1='Aarhus' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='Aaron' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='Ababa' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='aback' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abaft' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abandon' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abandoned' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abandoning' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abandonment' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abandons' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='Aarhus' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='Aaron' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='Ababa' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='aback' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abaft' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abandon' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abandoned' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abandoning' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abandonment' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abandons' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abase' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abased' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abasement' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abasements' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abases' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abash' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abashed' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abashes' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abashing' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abasing' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abate' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abated' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abatement' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abatements' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abater' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abates' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abating' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='Abba' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abbe' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abbey' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abbeys' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abbot' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abbots' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='Abbott' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abbreviate' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abbreviated' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abbreviates' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abbreviating' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abbreviation' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abbreviations' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='Abby' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abdomen' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abdomens' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abdominal' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abduct' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abducted' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abduction' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abductions' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abductor' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abductors' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abducts' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='Abe' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='abed' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='Abel' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='Abelian' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='Abelson' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='Aberdeen' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='Abernathy' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='aberrant' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-### INSERT INTO test.t6
-### SET
-###   @1='aberration' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-COMMIT
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-drop table t3, t6
-/*!*/;
-# at #
-#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
-SET TIMESTAMP=t/*!*/;
-drop table t4, t5
-/*!*/;
-DELIMITER ;
-# End of log file
-ROLLBACK /* added by mysqlbinlog */;
-/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
-# Test the Rows_query log event can be applied
-# SHOW BINLOG EVENTS ON MASTER after '--exec MYSQL_BINLOG'
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; create table t1(a int, b int) engine= myisam
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,1),(2,1)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# update t1 set a = a + 5 where b = 1 LIMIT 1
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# delete from t1 where a = 6
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
-master-bin.000001	#	Query	#	#	use `test`; create table t2(a int, b int) engine=innodb
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,1),(3,1)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Rows_query	#	#	# update t2 set a = a + 5 where b = 1
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Rows_query	#	#	# delete from t2 where a = 7
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,7)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
-master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,6)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; drop table t1, t2
-# Test The Rows_query log event can be relayed.
-# SHOW BINLOG EVENTS ON SLAVE
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-slave-bin.000001	#	Query	#	#	use `test`; create table t1(a int, b int) engine= myisam
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,1),(2,1)
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Query	#	#	COMMIT
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# update t1 set a = a + 5 where b = 1 LIMIT 1
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-slave-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Query	#	#	COMMIT
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# delete from t1 where a = 6
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-slave-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Query	#	#	COMMIT
-slave-bin.000001	#	Query	#	#	use `test`; create table t2(a int, b int) engine=innodb
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,1),(3,1)
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Rows_query	#	#	# update t2 set a = a + 5 where b = 1
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-slave-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Rows_query	#	#	# delete from t2 where a = 7
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-slave-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Xid	#	#	COMMIT /* XID */
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,5)
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Query	#	#	COMMIT
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,7)
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Query	#	#	COMMIT
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,5)
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,6)
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Xid	#	#	COMMIT /* XID */
-slave-bin.000001	#	Query	#	#	use `test`; drop table t1, t2
-slave-bin.000001	#	Query	#	#	use `test`; create table t3(a int, b int) engine= myisam
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# insert into t3(a, b) values(1,1)
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Query	#	#	COMMIT
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# update t3,t4 set t3.a=3, t4.a=4 where t3.b=t4.b
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
-slave-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Query	#	#	COMMIT
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# insert delayed into t3(a,b) values(1,5),(1,6),(1,7)
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Query	#	#	COMMIT
-slave-bin.000001	#	Query	#	#	use `test`; create table t6(a VARCHAR(60)) engine= myisam
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# load data infile '../../std_data/words.dat' into table t6
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t6)
-slave-bin.000001	#	Write_rows	#	#	table_id: #
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Query	#	#	COMMIT
-slave-bin.000001	#	Query	#	#	use `test`; drop table t3, t6
-slave-bin.000001	#	Query	#	#	use `test`; create table t1(a int, b int) engine= myisam
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,1),(2,1)
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Query	#	#	COMMIT
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# update t1 set a = a + 5 where b = 1 LIMIT 1
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-slave-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Query	#	#	COMMIT
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# delete from t1 where a = 6
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-slave-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Query	#	#	COMMIT
-slave-bin.000001	#	Query	#	#	use `test`; create table t2(a int, b int) engine=innodb
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,1),(3,1)
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Rows_query	#	#	# update t2 set a = a + 5 where b = 1
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-slave-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Rows_query	#	#	# delete from t2 where a = 7
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-slave-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Xid	#	#	COMMIT /* XID */
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,5)
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Query	#	#	COMMIT
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,7)
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Query	#	#	COMMIT
-slave-bin.000001	#	Query	#	#	BEGIN
-slave-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,5)
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,6)
-slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-slave-bin.000001	#	Xid	#	#	COMMIT /* XID */
-slave-bin.000001	#	Query	#	#	use `test`; drop table t1, t2

=== added file 'mysql-test/suite/rpl/r/rpl_row_ignorable_event.result'
--- a/mysql-test/suite/rpl/r/rpl_row_ignorable_event.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_ignorable_event.result	2010-08-06 02:20:44 +0000
@@ -0,0 +1,1007 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+# Test non-transaction
+create table t1(a int, b int) engine= myisam;
+insert into t1(a,b) values(1,1),(2,1);
+update t1 set a = a + 5 where b = 1 LIMIT 1;
+delete from t1 where a = 6;
+# Test transaction
+create table t2(a int, b int) engine=innodb;
+begin;
+insert into t2(a,b) values(2,1),(3,1);
+update t2 set a = a + 5 where b = 1;
+delete from t2 where a = 7;
+commit;
+# Test mixed transaction
+begin;
+insert into t1(a,b) values(1,5);
+insert into t2(a,b) values(2,5);
+insert into t2(a,b) values(2,6);
+insert into t1(a,b) values(1,7);
+commit;
+drop table t1, t2;
+create table t3(a int, b int) engine= myisam;
+create table t4(a int, b int) engine= myisam;
+create table t5(a int, b int) engine= myisam;
+insert into t3(a, b) values(1,1);
+# Test the Rows_query log event will be filtered out if slave applys
+# '--replicate-ignore-table' option on the table
+insert into t4(a, b) values(2,1);
+# Test the Rows_query log event will be relayed if slave
+# filters out part Rows event from a rows statement
+update t3,t4 set t3.a=3, t4.a=4 where t3.b=t4.b;
+# Test the Rows_query log event will be filtered out if slave applys
+# '--replicate-wild-ignore-table' option on the table
+insert into t5(a, b) values(3,1);
+# Test the Rows_query log event will be filtered out if slave filters
+# out all its related tables by replication filtering rules
+update t4,t5 set t4.a=4, t5.a=5 where t4.b=t5.b;
+# Test insert delayed ...
+insert delayed into t3(a,b) values(1,5),(1,6),(1,7);
+# Test load data infile
+create table t6(a VARCHAR(60)) engine= myisam;
+load data infile '../../std_data/words.dat' into table t6;
+drop table t3, t6;
+drop table t4, t5;
+# SHOW BINLOG EVENTS ON MASTER before '--exec MYSQL_BINLOG'
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; create table t1(a int, b int) engine= myisam
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,1),(2,1)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# update t1 set a = a + 5 where b = 1 LIMIT 1
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# delete from t1 where a = 6
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; create table t2(a int, b int) engine=innodb
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,1),(3,1)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Rows_query	#	#	# update t2 set a = a + 5 where b = 1
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Rows_query	#	#	# delete from t2 where a = 7
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,5)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,7)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,5)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,6)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+master-bin.000001	#	Query	#	#	use `test`; drop table t1, t2
+master-bin.000001	#	Query	#	#	use `test`; create table t3(a int, b int) engine= myisam
+master-bin.000001	#	Query	#	#	use `test`; create table t4(a int, b int) engine= myisam
+master-bin.000001	#	Query	#	#	use `test`; create table t5(a int, b int) engine= myisam
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# insert into t3(a, b) values(1,1)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# insert into t4(a, b) values(2,1)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# update t3,t4 set t3.a=3, t4.a=4 where t3.b=t4.b
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
+master-bin.000001	#	Update_rows	#	#	table_id: #
+master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# insert into t5(a, b) values(3,1)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t5)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# update t4,t5 set t4.a=4, t5.a=5 where t4.b=t5.b
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t5)
+master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# insert delayed into t3(a,b) values(1,5),(1,6),(1,7)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; create table t6(a VARCHAR(60)) engine= myisam
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# load data infile '../../std_data/words.dat' into table t6
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t6)
+master-bin.000001	#	Write_rows	#	#	table_id: #
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; drop table t3, t6
+master-bin.000001	#	Query	#	#	use `test`; drop table t4, t5
+# MYSQL_BINLOG output base on master-bin.000001
+/*!40019 SET @@session.max_insert_delayed_threads=0*/;
+/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
+DELIMITER /*!*/;
+# at #
+#server id #  end_log_pos # 	Start: binlog v#, server v #.##.## created # #:#:# at startup
+# Warning: this binlog is either in use or was not closed properly.
+ROLLBACK/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+use test/*!*/;
+SET TIMESTAMP=t/*!*/;
+SET @@session.pseudo_thread_id=#/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.lc_time_names=0/*!*/;
+SET @@session.collation_database=DEFAULT/*!*/;
+create table t1(a int, b int) engine= myisam
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+BEGIN
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Rows_query
+# insert into t1(a,b) values(1,1),(2,1)
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t1` mapped to number #
+#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO test.t1
+### SET
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO test.t1
+### SET
+###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+COMMIT
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+BEGIN
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Rows_query
+# update t1 set a = a + 5 where b = 1 LIMIT 1
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t1` mapped to number #
+#server id #  end_log_pos # 	Update_rows: table id # flags: STMT_END_F
+### UPDATE test.t1
+### WHERE
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+### SET
+###   @1=6 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+COMMIT
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+BEGIN
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Rows_query
+# delete from t1 where a = 6
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t1` mapped to number #
+#server id #  end_log_pos # 	Delete_rows: table id # flags: STMT_END_F
+### DELETE FROM test.t1
+### WHERE
+###   @1=6 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+COMMIT
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+create table t2(a int, b int) engine=innodb
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+BEGIN
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Rows_query
+# insert into t2(a,b) values(2,1),(3,1)
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t2` mapped to number #
+#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO test.t2
+### SET
+###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO test.t2
+### SET
+###   @1=3 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#server id #  end_log_pos # 	Rows_query
+# update t2 set a = a + 5 where b = 1
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t2` mapped to number #
+#server id #  end_log_pos # 	Update_rows: table id # flags: STMT_END_F
+### UPDATE test.t2
+### WHERE
+###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+### SET
+###   @1=7 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+### UPDATE test.t2
+### WHERE
+###   @1=3 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+### SET
+###   @1=8 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#server id #  end_log_pos # 	Rows_query
+# delete from t2 where a = 7
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t2` mapped to number #
+#server id #  end_log_pos # 	Delete_rows: table id # flags: STMT_END_F
+### DELETE FROM test.t2
+### WHERE
+###   @1=7 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#server id #  end_log_pos # 	Xid = #
+COMMIT/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+BEGIN
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Rows_query
+# insert into t1(a,b) values(1,5)
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t1` mapped to number #
+#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO test.t1
+### SET
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=5 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+COMMIT
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+BEGIN
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Rows_query
+# insert into t1(a,b) values(1,7)
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t1` mapped to number #
+#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO test.t1
+### SET
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=7 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+COMMIT
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+BEGIN
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Rows_query
+# insert into t2(a,b) values(2,5)
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t2` mapped to number #
+#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO test.t2
+### SET
+###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=5 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#server id #  end_log_pos # 	Rows_query
+# insert into t2(a,b) values(2,6)
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t2` mapped to number #
+#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO test.t2
+### SET
+###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=6 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#server id #  end_log_pos # 	Xid = #
+COMMIT/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+drop table t1, t2
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+create table t3(a int, b int) engine= myisam
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+create table t4(a int, b int) engine= myisam
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+create table t5(a int, b int) engine= myisam
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+BEGIN
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Rows_query
+# insert into t3(a, b) values(1,1)
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t3` mapped to number #
+#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO test.t3
+### SET
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+COMMIT
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+BEGIN
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Rows_query
+# insert into t4(a, b) values(2,1)
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t4` mapped to number #
+#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO test.t4
+### SET
+###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+COMMIT
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+BEGIN
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Rows_query
+# update t3,t4 set t3.a=3, t4.a=4 where t3.b=t4.b
+# at #
+# at #
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t3` mapped to number #
+#server id #  end_log_pos # 	Table_map: `test`.`t4` mapped to number #
+#server id #  end_log_pos # 	Update_rows: table id #
+#server id #  end_log_pos # 	Update_rows: table id # flags: STMT_END_F
+### UPDATE test.t3
+### WHERE
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+### SET
+###   @1=3 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+### UPDATE test.t4
+### WHERE
+###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+### SET
+###   @1=4 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+COMMIT
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+BEGIN
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Rows_query
+# insert into t5(a, b) values(3,1)
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t5` mapped to number #
+#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO test.t5
+### SET
+###   @1=3 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+COMMIT
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+BEGIN
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Rows_query
+# update t4,t5 set t4.a=4, t5.a=5 where t4.b=t5.b
+# at #
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t4` mapped to number #
+#server id #  end_log_pos # 	Table_map: `test`.`t5` mapped to number #
+#server id #  end_log_pos # 	Update_rows: table id # flags: STMT_END_F
+### UPDATE test.t5
+### WHERE
+###   @1=3 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+### SET
+###   @1=5 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+COMMIT
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+BEGIN
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Rows_query
+# insert delayed into t3(a,b) values(1,5),(1,6),(1,7)
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t3` mapped to number #
+#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO test.t3
+### SET
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=5 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO test.t3
+### SET
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=6 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO test.t3
+### SET
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=7 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+COMMIT
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+create table t6(a VARCHAR(60)) engine= myisam
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+BEGIN
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Rows_query
+# load data infile '../../std_data/words.dat' into table t6
+# at #
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t6` mapped to number #
+#server id #  end_log_pos # 	Write_rows: table id #
+#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO test.t6
+### SET
+###   @1='Aarhus' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='Aaron' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='Ababa' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='aback' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abaft' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abandon' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abandoned' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abandoning' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abandonment' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abandons' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='Aarhus' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='Aaron' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='Ababa' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='aback' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abaft' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abandon' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abandoned' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abandoning' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abandonment' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abandons' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abase' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abased' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abasement' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abasements' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abases' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abash' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abashed' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abashes' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abashing' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abasing' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abate' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abated' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abatement' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abatements' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abater' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abates' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abating' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='Abba' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abbe' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abbey' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abbeys' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abbot' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abbots' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='Abbott' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abbreviate' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abbreviated' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abbreviates' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abbreviating' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abbreviation' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abbreviations' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='Abby' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abdomen' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abdomens' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abdominal' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abduct' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abducted' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abduction' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abductions' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abductor' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abductors' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abducts' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='Abe' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='abed' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='Abel' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='Abelian' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='Abelson' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='Aberdeen' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='Abernathy' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='aberrant' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+### INSERT INTO test.t6
+### SET
+###   @1='aberration' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+COMMIT
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+drop table t3, t6
+/*!*/;
+# at #
+#server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=#
+SET TIMESTAMP=t/*!*/;
+drop table t4, t5
+/*!*/;
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+# Test the Rows_query log event can be applied
+# SHOW BINLOG EVENTS ON MASTER after '--exec MYSQL_BINLOG'
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; create table t1(a int, b int) engine= myisam
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,1),(2,1)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# update t1 set a = a + 5 where b = 1 LIMIT 1
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# delete from t1 where a = 6
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; create table t2(a int, b int) engine=innodb
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,1),(3,1)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Rows_query	#	#	# update t2 set a = a + 5 where b = 1
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Rows_query	#	#	# delete from t2 where a = 7
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,5)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,7)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,5)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,6)
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+master-bin.000001	#	Query	#	#	use `test`; drop table t1, t2
+# SHOW BINLOG EVENTS ON 2nd CONNECTION TO MASTE
+set @@session.binlog_rows_query_log_events= off;
+# Test statements from the 2nd connection have no comment event
+# when setting binlog_rows_query_log_events= off
+create table t7(a bigint) engine= myisam;
+insert into t7(a) values(1),(2);
+delete from t7 where a = 1;
+set session binlog_format=mixed;
+set @@session.binlog_rows_query_log_events= on;
+# Test the comment event is sent in mixed mode for special
+# functions when setting binlog_rows_query_log_events= on
+insert into t7(a) values(UUID_SHORT());
+drop table t7;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; create table t7(a bigint) engine= myisam
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t7)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t7)
+master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Rows_query	#	#	# insert into t7(a) values(UUID_SHORT())
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t7)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; drop table t7
+# Test The Rows_query log event can be relayed.
+# SHOW BINLOG EVENTS ON SLAVE
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+slave-bin.000001	#	Query	#	#	use `test`; create table t1(a int, b int) engine= myisam
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,1),(2,1)
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# update t1 set a = a + 5 where b = 1 LIMIT 1
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+slave-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# delete from t1 where a = 6
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+slave-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	use `test`; create table t2(a int, b int) engine=innodb
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,1),(3,1)
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Rows_query	#	#	# update t2 set a = a + 5 where b = 1
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+slave-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Rows_query	#	#	# delete from t2 where a = 7
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+slave-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Xid	#	#	COMMIT /* XID */
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,5)
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,7)
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,5)
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,6)
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Xid	#	#	COMMIT /* XID */
+slave-bin.000001	#	Query	#	#	use `test`; drop table t1, t2
+slave-bin.000001	#	Query	#	#	use `test`; create table t3(a int, b int) engine= myisam
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# insert into t3(a, b) values(1,1)
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# update t3,t4 set t3.a=3, t4.a=4 where t3.b=t4.b
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
+slave-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# insert delayed into t3(a,b) values(1,5),(1,6),(1,7)
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	use `test`; create table t6(a VARCHAR(60)) engine= myisam
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# load data infile '../../std_data/words.dat' into table t6
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t6)
+slave-bin.000001	#	Write_rows	#	#	table_id: #
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	use `test`; drop table t3, t6
+slave-bin.000001	#	Query	#	#	use `test`; create table t1(a int, b int) engine= myisam
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,1),(2,1)
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# update t1 set a = a + 5 where b = 1 LIMIT 1
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+slave-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# delete from t1 where a = 6
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+slave-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	use `test`; create table t2(a int, b int) engine=innodb
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,1),(3,1)
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Rows_query	#	#	# update t2 set a = a + 5 where b = 1
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+slave-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Rows_query	#	#	# delete from t2 where a = 7
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+slave-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Xid	#	#	COMMIT /* XID */
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,5)
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# insert into t1(a,b) values(1,7)
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,5)
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Rows_query	#	#	# insert into t2(a,b) values(2,6)
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Xid	#	#	COMMIT /* XID */
+slave-bin.000001	#	Query	#	#	use `test`; drop table t1, t2
+slave-bin.000001	#	Query	#	#	use `test`; create table t7(a bigint) engine= myisam
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t7)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t7)
+slave-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# insert into t7(a) values(UUID_SHORT())
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t7)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	use `test`; drop table t7

=== removed file 'mysql-test/suite/rpl/t/rpl_ignorable_event-master.opt'
--- a/mysql-test/suite/rpl/t/rpl_ignorable_event-master.opt	2010-07-14 07:30:15 +0000
+++ b/mysql-test/suite/rpl/t/rpl_ignorable_event-master.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---binlog-row-event-max-size=512 --binlog-rows-query-log-events=1

=== removed file 'mysql-test/suite/rpl/t/rpl_ignorable_event-slave.opt'
--- a/mysql-test/suite/rpl/t/rpl_ignorable_event-slave.opt	2010-07-14 07:30:15 +0000
+++ b/mysql-test/suite/rpl/t/rpl_ignorable_event-slave.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---binlog-row-event-max-size=512 --binlog-rows-query-log-events=1 --replicate-ignore-table=test.t4 --replicate-wild-ignore-table=test.t5

=== removed file 'mysql-test/suite/rpl/t/rpl_ignorable_event.test'
--- a/mysql-test/suite/rpl/t/rpl_ignorable_event.test	2010-07-14 07:30:15 +0000
+++ b/mysql-test/suite/rpl/t/rpl_ignorable_event.test	1970-01-01 00:00:00 +0000
@@ -1,90 +0,0 @@
-#
-# WL#4033 & WL#5404
-# This test verifies if the query of the rows event
-# is displayed with its row event as comment in RBR
-# by SHOW BINLOG EVENTS and MYSQLBINLOG DUMP.
-# Verifies if the Rows_query log event can be applied
-# and relayed 
-#
-
-source include/have_binlog_format_row.inc;
-source include/master-slave.inc;
-source include/have_innodb.inc;
-
---echo # Test non-transaction
-let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
-let $master_binlog= query_get_value(SHOW MASTER STATUS, File, 1);
-create table t1(a int, b int) engine= myisam;
-insert into t1(a,b) values(1,1),(2,1);
-update t1 set a = a + 5 where b = 1 LIMIT 1;
-delete from t1 where a = 6;
-
--- echo # Test transaction
-create table t2(a int, b int) engine=innodb;
-begin;
-insert into t2(a,b) values(2,1),(3,1);
-update t2 set a = a + 5 where b = 1;
-delete from t2 where a = 7;
-commit;
-
---echo # Test mixed transaction
-begin;
-insert into t1(a,b) values(1,5);
-insert into t2(a,b) values(2,5);
-insert into t2(a,b) values(2,6);
-insert into t1(a,b) values(1,7);
-commit;
-
-drop table t1, t2;
-let $end_pos= query_get_value("SHOW MASTER STATUS", Position, 1);
-
-create table t3(a int, b int) engine= myisam;
-create table t4(a int, b int) engine= myisam;
-create table t5(a int, b int) engine= myisam;
-insert into t3(a, b) values(1,1);
---echo # Test the Rows_query log event will be filtered out if slave applys
---echo # '--replicate-ignore-table' option on the table
-insert into t4(a, b) values(2,1);
---echo # Test the Rows_query log event will be relayed if slave
---echo # filters out part Rows event from a rows statement
-update t3,t4 set t3.a=3, t4.a=4 where t3.b=t4.b;
-
---echo # Test the Rows_query log event will be filtered out if slave applys
---echo # '--replicate-wild-ignore-table' option on the table
-insert into t5(a, b) values(3,1);
---echo # Test the Rows_query log event will be filtered out if slave filters
---echo # out all its related tables by replication filtering rules
-update t4,t5 set t4.a=4, t5.a=5 where t4.b=t5.b;
-
---echo # Test insert delayed ...
-insert delayed into t3(a,b) values(1,5),(1,6),(1,7);
-
---echo # Test load data infile
-create table t6(a VARCHAR(60)) engine= myisam;
-load data infile '../../std_data/words.dat' into table t6;
-
-drop table t3, t6;
-drop table t4, t5;
-
---echo # SHOW BINLOG EVENTS ON MASTER before '--exec MYSQL_BINLOG'
-source include/show_binlog_events.inc;
-
---echo # MYSQL_BINLOG output base on master-bin.000001
-let $MYSQLD_DATADIR= `select @@datadir`;
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /TIMESTAMP=[0-9]*/TIMESTAMP=t/ /#[0-9]*[ ]*[0-9]*:[0-9]*:[0-9]* server id [0-9]*/#server id #/ /exec_time=[0-9]*/exec_time=#/ /error_code=[0-9]*/error_code=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /Start: binlog v [0-9]*/Start: binlog v#/ /created [0-9]*[ ]*[0-9]*:[0-9]*:[0-9]* at startup/created # #:#:# at startup/
---exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/$master_binlog
-
-let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
---echo # Test the Rows_query log event can be applied
---exec $MYSQL_BINLOG -v -v --stop-position=$end_pos $MYSQLD_DATADIR/$master_binlog | $MYSQL test 2>&1
-
---echo # SHOW BINLOG EVENTS ON MASTER after '--exec MYSQL_BINLOG'
-source include/show_binlog_events.inc;
-
-sync_slave_with_master;
---let $binlog_start= query_get_value(SHOW BINLOG EVENTS LIMIT 1, End_log_pos, 1)
---echo # Test The Rows_query log event can be relayed.
---echo # SHOW BINLOG EVENTS ON SLAVE
-source include/show_binlog_events.inc;
-

=== added file 'mysql-test/suite/rpl/t/rpl_row_ignorable_event-master.opt'
--- a/mysql-test/suite/rpl/t/rpl_row_ignorable_event-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_ignorable_event-master.opt	2010-08-06 02:20:44 +0000
@@ -0,0 +1 @@
+--binlog-row-event-max-size=512 --binlog-rows-query-log-events=1

=== added file 'mysql-test/suite/rpl/t/rpl_row_ignorable_event-slave.opt'
--- a/mysql-test/suite/rpl/t/rpl_row_ignorable_event-slave.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_ignorable_event-slave.opt	2010-08-06 02:20:44 +0000
@@ -0,0 +1 @@
+--binlog-row-event-max-size=512 --binlog-rows-query-log-events=1 --replicate-ignore-table=test.t4 --replicate-wild-ignore-table=test.t5

=== added file 'mysql-test/suite/rpl/t/rpl_row_ignorable_event.test'
--- a/mysql-test/suite/rpl/t/rpl_row_ignorable_event.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_ignorable_event.test	2010-08-06 02:20:44 +0000
@@ -0,0 +1,110 @@
+#
+# WL#4033 & WL#5404
+# This test verifies if the query of the rows event
+# is displayed with its row event as comment in RBR
+# by SHOW BINLOG EVENTS and MYSQLBINLOG DUMP.
+# Verifies if the Rows_query log event can be applied
+# and relayed 
+#
+
+source include/have_binlog_format_row.inc;
+source include/master-slave.inc;
+source include/have_binlog_rows_query.inc;
+source include/have_innodb.inc;
+
+--echo # Test non-transaction
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+let $master_binlog= query_get_value(SHOW MASTER STATUS, File, 1);
+create table t1(a int, b int) engine= myisam;
+insert into t1(a,b) values(1,1),(2,1);
+update t1 set a = a + 5 where b = 1 LIMIT 1;
+delete from t1 where a = 6;
+
+-- echo # Test transaction
+create table t2(a int, b int) engine=innodb;
+begin;
+insert into t2(a,b) values(2,1),(3,1);
+update t2 set a = a + 5 where b = 1;
+delete from t2 where a = 7;
+commit;
+
+--echo # Test mixed transaction
+begin;
+insert into t1(a,b) values(1,5);
+insert into t2(a,b) values(2,5);
+insert into t2(a,b) values(2,6);
+insert into t1(a,b) values(1,7);
+commit;
+
+drop table t1, t2;
+let $end_pos= query_get_value("SHOW MASTER STATUS", Position, 1);
+
+create table t3(a int, b int) engine= myisam;
+create table t4(a int, b int) engine= myisam;
+create table t5(a int, b int) engine= myisam;
+insert into t3(a, b) values(1,1);
+--echo # Test the Rows_query log event will be filtered out if slave applys
+--echo # '--replicate-ignore-table' option on the table
+insert into t4(a, b) values(2,1);
+--echo # Test the Rows_query log event will be relayed if slave
+--echo # filters out part Rows event from a rows statement
+update t3,t4 set t3.a=3, t4.a=4 where t3.b=t4.b;
+
+--echo # Test the Rows_query log event will be filtered out if slave applys
+--echo # '--replicate-wild-ignore-table' option on the table
+insert into t5(a, b) values(3,1);
+--echo # Test the Rows_query log event will be filtered out if slave filters
+--echo # out all its related tables by replication filtering rules
+update t4,t5 set t4.a=4, t5.a=5 where t4.b=t5.b;
+
+--echo # Test insert delayed ...
+insert delayed into t3(a,b) values(1,5),(1,6),(1,7);
+
+--echo # Test load data infile
+create table t6(a VARCHAR(60)) engine= myisam;
+load data infile '../../std_data/words.dat' into table t6;
+
+drop table t3, t6;
+drop table t4, t5;
+
+--echo # SHOW BINLOG EVENTS ON MASTER before '--exec MYSQL_BINLOG'
+source include/show_binlog_events.inc;
+
+--echo # MYSQL_BINLOG output base on master-bin.000001
+let $MYSQLD_DATADIR= `select @@datadir`;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--replace_regex /TIMESTAMP=[0-9]*/TIMESTAMP=t/ /#[0-9]*[ ]*[0-9]*:[0-9]*:[0-9]* server id [0-9]*/#server id #/ /exec_time=[0-9]*/exec_time=#/ /error_code=[0-9]*/error_code=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /Start: binlog v [0-9]*/Start: binlog v#/ /created [0-9]*[ ]*[0-9]*:[0-9]*:[0-9]* at startup/created # #:#:# at startup/
+--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/$master_binlog
+
+let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+--echo # Test the Rows_query log event can be applied
+--exec $MYSQL_BINLOG -v -v --stop-position=$end_pos $MYSQLD_DATADIR/$master_binlog | $MYSQL test 2>&1
+
+--echo # SHOW BINLOG EVENTS ON MASTER after '--exec MYSQL_BINLOG'
+source include/show_binlog_events.inc;
+
+connect (master2,localhost,root,,);
+connection master2;
+--echo # SHOW BINLOG EVENTS ON 2nd CONNECTION TO MASTE
+set @@session.binlog_rows_query_log_events= off;
+let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+--echo # Test statements from the 2nd connection have no comment event
+--echo # when setting binlog_rows_query_log_events= off
+create table t7(a bigint) engine= myisam;
+insert into t7(a) values(1),(2);
+delete from t7 where a = 1;
+
+set session binlog_format=mixed;
+set @@session.binlog_rows_query_log_events= on;
+--echo # Test the comment event is sent in mixed mode for special
+--echo # functions when setting binlog_rows_query_log_events= on
+insert into t7(a) values(UUID_SHORT());
+drop table t7;
+source include/show_binlog_events.inc;
+
+sync_slave_with_master;
+--let $binlog_start= query_get_value(SHOW BINLOG EVENTS LIMIT 1, End_log_pos, 1)
+--echo # Test The Rows_query log event can be relayed.
+--echo # SHOW BINLOG EVENTS ON SLAVE
+source include/show_binlog_events.inc;
+


Attachment: [text/bzr-bundle] bzr/dao-gang.qu@sun.com-20100806022044-vwffnu445das02l2.bundle
Thread
bzr push into mysql-next-mr branch (Dao-Gang.Qu:3169 to 3170) WL#4033Dao-Gang.Qu31 Aug