List:Commits« Previous MessageNext Message »
From:Frazer Clement Date:September 20 2011 12:40pm
Subject:bzr push into mysql-5.1-telco-7.0 branch (frazer.clement:4535 to 4536)
View as plain text  
 4536 Frazer Clement	2011-09-20
      Commit Binlog v2, default v1 for CluB X.X
      
      v1 is default.

    added:
      mysql-test/include/have_binlog_row_v2.inc
      mysql-test/r/have_binlog_row_v2.require
    modified:
      mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test
      mysql-test/include/show_binlog_events2.inc
      mysql-test/include/show_binlog_using_logname.inc
      mysql-test/r/ctype_cp932_binlog_stm.result
      mysql-test/r/flush2.result
      mysql-test/r/sp_trans_log.result
      mysql-test/suite/binlog/r/binlog_database.result
      mysql-test/suite/binlog/r/binlog_innodb.result
      mysql-test/suite/binlog/r/binlog_innodb_row.result
      mysql-test/suite/binlog/r/binlog_mixed_failure_mixing_engines.result
      mysql-test/suite/binlog/r/binlog_mixed_load_data.result
      mysql-test/suite/binlog/r/binlog_multi_engine.result
      mysql-test/suite/binlog/r/binlog_row_binlog.result
      mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result
      mysql-test/suite/binlog/r/binlog_row_insert_select.result
      mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
      mysql-test/suite/binlog/r/binlog_stm_binlog.result
      mysql-test/suite/binlog/r/binlog_stm_row.result
      mysql-test/suite/binlog/t/binlog_incident.test
      mysql-test/suite/binlog/t/binlog_killed_simulate.test
      mysql-test/suite/ndb/r/ndb_discover_db.result
      mysql-test/suite/ndb_binlog/r/ndb_binlog_ddl_multi.result
      mysql-test/suite/ndb_binlog/r/ndb_binlog_discover.result
      mysql-test/suite/ndb_binlog/r/ndb_binlog_log_bin.result
      mysql-test/suite/ndb_binlog/r/ndb_binlog_multi.result
      mysql-test/suite/ndb_binlog/r/ndb_binlog_restore.result
      mysql-test/suite/ndb_rpl/r/ndb_rpl_circular.result
      mysql-test/suite/ndb_rpl/r/ndb_rpl_dd_basic.result
      mysql-test/suite/ndb_rpl/r/ndb_rpl_multi.result
      mysql-test/suite/ndb_rpl/r/ndb_rpl_slave_lsu.result
      mysql-test/suite/ndb_rpl/r/ndb_rpl_slave_lsu_anyval.result
      mysql-test/suite/ndb_rpl/r/ndb_rpl_slave_restart.result
      mysql-test/suite/ndb_rpl/r/rpl_truncate_7ndb.result
      mysql-test/suite/ndb_rpl/r/rpl_truncate_7ndb_2.result
      mysql-test/suite/ndb_rpl/t/ndb_rpl_gap_event.test
      mysql-test/suite/ndb_rpl/t/ndb_rpl_multi.test
      mysql-test/suite/ndb_rpl/t/ndb_rpl_skip_gap_event.test
      mysql-test/suite/ndb_rpl/t/ndb_rpl_slave_restart.test
      mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result
      mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
      mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
      mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result
      mysql-test/suite/rpl/r/rpl_row_conflicts.result
      mysql-test/suite/rpl/r/rpl_row_log.result
      mysql-test/suite/rpl/r/rpl_row_log_innodb.result
      mysql-test/suite/rpl/r/rpl_slave_skip.result
      mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result
      mysql-test/suite/rpl/t/rpl_extra_row_data.test
      mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt
      mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test
      mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test
      mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test
      mysql-test/t/ctype_cp932_binlog_stm.test
      mysql-test/t/mysqlbinlog2.test
      sql/ha_ndbcluster_binlog.cc
      sql/log_event.cc
      sql/log_event.h
      sql/log_event_old.h
      sql/mysql_priv.h
      sql/mysqld.cc
      sql/rpl_constants.h
      sql/rpl_injector.cc
      sql/rpl_injector.h
      sql/set_var.cc
      sql/sql_class.cc
      sql/sql_class.h
 4535 Jonas Oreland	2011-09-19
      ndb index stat - use variable together with condition-variable, so that pthread_signal "doesn't get lost"

    modified:
      sql/ha_ndb_index_stat.cc
=== modified file 'mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test'
--- a/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test	2009-02-03 13:35:56 +0000
+++ b/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test	2011-09-20 12:32:59 +0000
@@ -323,12 +323,20 @@ let $MYSQLD_DATADIR= `select @@datadir`;
 # and does not make slave to stop)
 if (`select @@binlog_format = 'ROW'`)
 {
-  --exec $MYSQL_BINLOG --start-position=525 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output
+  --let $V1_ROW_EVENTS= query_get_value("SELECT Variable_Value='ON' as v1 from INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE Variable_Name LIKE 'log_bin_use_v1_row_events'", v1, 1)
+  --let $START_POS= 530
+  if (! $V1_ROW_EVENTS)
+  {
+    # There are two Row events before this pos, which are each 2 bytes larger with v2
+    # (534)
+    --let $START_POS= $START_POS + (2*2)
+  }
+  --exec $MYSQL_BINLOG --start-position=$START_POS $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output
 }
 
 if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`)
 {
-  --exec $MYSQL_BINLOG --start-position=556 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output
+  --exec $MYSQL_BINLOG --start-position=561 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output
 }
 
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR

=== added file 'mysql-test/include/have_binlog_row_v2.inc'
--- a/mysql-test/include/have_binlog_row_v2.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/have_binlog_row_v2.inc	2011-09-20 12:32:59 +0000
@@ -0,0 +1,8 @@
+# Purpose
+# Ensure server has v2 Binlog row events
+#
+
+--require r/have_binlog_row_v2.require
+disable_query_log;
+show variables like 'log_bin_use_v1_row_events';
+enable_query_log;
\ No newline at end of file

=== modified file 'mysql-test/include/show_binlog_events2.inc'
--- a/mysql-test/include/show_binlog_events2.inc	2008-02-13 18:02:34 +0000
+++ b/mysql-test/include/show_binlog_events2.inc	2011-09-20 12:32:59 +0000
@@ -1,4 +1,11 @@
---let $binlog_start=107
+#--let $binlog_start=107
+--let $binlog_on= query_get_value("SELECT Variable_Value='ON' as binlog from INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE Variable_name like 'log_bin'", binlog, 1)
+--let $binlog_start= query_get_value(SHOW BINLOG EVENTS LIMIT 1, End_log_pos, 1)
+if (!$binlog_on)
+{
+  # Where there's no Binlog, we can use any old value
+  --let $binlog_start= 0
+}
 --replace_result $binlog_start <binlog_start>
 --replace_column 2 # 5 #
 --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/

=== modified file 'mysql-test/include/show_binlog_using_logname.inc'
--- a/mysql-test/include/show_binlog_using_logname.inc	2007-06-21 19:58:59 +0000
+++ b/mysql-test/include/show_binlog_using_logname.inc	2011-09-20 12:32:59 +0000
@@ -6,8 +6,16 @@
 #          name is = log_name
 ######################################################## 
 
+if (!$start_pos)
+{
+  # If $start_pos is not set, we will set it as the second event's
+  # position.  The first event(Description Event) is always ignored. For
+  # description event's length might be changed because of adding new events,
+  # 'SHOW BINLOG EVENTS LIMIT 1' is used to get the right value.
+  --let $start_pos= query_get_value(SHOW BINLOG EVENTS LIMIT 1, End_log_pos, 1)
+}
 --replace_result $start_pos <start_pos> $end_pos <end_pos>
---replace_column 2 #
+--replace_column 2 # 5 <end_pos>
 --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
 --eval show binlog events in '$log_name'  from $start_pos limit $off_set,1
 

=== modified file 'mysql-test/r/ctype_cp932_binlog_stm.result'
--- a/mysql-test/r/ctype_cp932_binlog_stm.result	2010-10-12 11:54:35 +0000
+++ b/mysql-test/r/ctype_cp932_binlog_stm.result	2011-09-20 12:32:59 +0000
@@ -44,7 +44,7 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	use `test`; DROP PROCEDURE bug18293
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t4
 End of 5.0 tests
-SHOW BINLOG EVENTS FROM 365;
+SHOW BINLOG EVENTS FROM 370;
 ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
 Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment.
 CREATE TABLE t1 (a varchar(16)) character set cp932;

=== modified file 'mysql-test/r/flush2.result'
--- a/mysql-test/r/flush2.result	2007-04-16 08:37:50 +0000
+++ b/mysql-test/r/flush2.result	2011-09-20 12:32:59 +0000
@@ -5,10 +5,12 @@ Variable_name	Value
 log_bin	OFF
 log_bin_trust_function_creators	ON
 log_bin_trust_routine_creators	ON
+log_bin_use_v1_row_events	ON
 flush logs;
 show variables like 'log_bin%';
 Variable_name	Value
 log_bin	OFF
 log_bin_trust_function_creators	ON
 log_bin_trust_routine_creators	ON
+log_bin_use_v1_row_events	ON
 set global expire_logs_days = 0;

=== added file 'mysql-test/r/have_binlog_row_v2.require'
--- a/mysql-test/r/have_binlog_row_v2.require	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/have_binlog_row_v2.require	2011-09-20 12:32:59 +0000
@@ -0,0 +1,2 @@
+Variable_name	Value
+log_bin_use_v1_row_events	OFF

=== modified file 'mysql-test/r/sp_trans_log.result'
--- a/mysql-test/r/sp_trans_log.result	2010-10-12 11:54:35 +0000
+++ b/mysql-test/r/sp_trans_log.result	2011-09-20 12:32:59 +0000
@@ -19,7 +19,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 select count(*),@a from t1 /* must be 1,1 */|
 count(*)	@a

=== modified file 'mysql-test/suite/binlog/r/binlog_database.result'
--- a/mysql-test/suite/binlog/r/binlog_database.result	2009-05-31 05:44:41 +0000
+++ b/mysql-test/suite/binlog/r/binlog_database.result	2011-09-20 12:32:59 +0000
@@ -102,12 +102,12 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int)
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	drop database if exists mysqltest1
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE `t1` /* generated by server */
 FLUSH STATUS;

=== modified file 'mysql-test/suite/binlog/r/binlog_innodb.result'
--- a/mysql-test/suite/binlog/r/binlog_innodb.result	2010-10-12 11:54:35 +0000
+++ b/mysql-test/suite/binlog/r/binlog_innodb.result	2011-09-20 12:32:59 +0000
@@ -74,7 +74,7 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Update_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; UPDATE t1 SET b = 3*a WHERE a > 3
@@ -84,11 +84,11 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Update_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Update_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; UPDATE t1 SET b = 3*a WHERE a > 3
@@ -98,19 +98,19 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Update_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Update_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Update_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Update_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 DROP TABLE t1;
 flush status;

=== modified file 'mysql-test/suite/binlog/r/binlog_innodb_row.result'
--- a/mysql-test/suite/binlog/r/binlog_innodb_row.result	2010-03-09 23:41:21 +0000
+++ b/mysql-test/suite/binlog/r/binlog_innodb_row.result	2011-09-20 12:32:59 +0000
@@ -11,7 +11,7 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 delete from t1;
 reset master;
@@ -26,7 +26,7 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 drop table t1;
 RESET MASTER;
@@ -43,7 +43,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 ( c1 int , primary key (c1)) ENGINE=InnoDB
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 ###############################################

=== modified file 'mysql-test/suite/binlog/r/binlog_mixed_failure_mixing_engines.result'
--- a/mysql-test/suite/binlog/r/binlog_mixed_failure_mixing_engines.result	2010-11-27 11:51:07 +0000
+++ b/mysql-test/suite/binlog/r/binlog_mixed_failure_mixing_engines.result	2011-09-20 12:32:59 +0000
@@ -34,8 +34,8 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_2 VALUES ("new text 3", 3)
@@ -55,8 +55,8 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_2)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_2 VALUES ("new text 6", 6)
@@ -80,8 +80,8 @@ master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1 VALUES ("new text 7", 7), ("new text 8", 8)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_2 VALUES ("new text 11", 11)
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 
@@ -101,8 +101,8 @@ master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_2 VALUES ("new text 12", 12), ("new text 13", 13)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_2)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_2 VALUES ("new text 16", 16)
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 
@@ -126,14 +126,14 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_2 VALUES ("new text 21", 21)
@@ -159,14 +159,14 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_2)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_2)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_2 VALUES ("new text 26", 26)
@@ -221,10 +221,10 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_2)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 
 
@@ -246,15 +246,15 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 
 
@@ -272,15 +272,15 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 
 
@@ -298,15 +298,15 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 
 
@@ -326,15 +326,15 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 
 
@@ -352,19 +352,19 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 
 
@@ -384,19 +384,19 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 ###################################################################################
 #                                        CLEAN

=== modified file 'mysql-test/suite/binlog/r/binlog_mixed_load_data.result'
--- a/mysql-test/suite/binlog/r/binlog_mixed_load_data.result	2010-08-03 02:22:19 +0000
+++ b/mysql-test/suite/binlog/r/binlog_mixed_load_data.result	2011-09-20 12:32:59 +0000
@@ -5,6 +5,6 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 DROP TABLE t1;

=== modified file 'mysql-test/suite/binlog/r/binlog_multi_engine.result'
--- a/mysql-test/suite/binlog/r/binlog_multi_engine.result	2009-08-25 19:44:04 +0000
+++ b/mysql-test/suite/binlog/r/binlog_multi_engine.result	2011-09-20 12:32:59 +0000
@@ -50,8 +50,8 @@ mysqld-bin.000001	#	Query	#	#	use `test`
 mysqld-bin.000001	#	Query	#	#	BEGIN
 mysqld-bin.000001	#	Table_map	#	#	table_id: # (test.t1n)
 mysqld-bin.000001	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000001	#	Write_rows	#	#	table_id: #
-mysqld-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	#	#	table_id: #
+mysqld-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	#	#	COMMIT
 mysqld-bin.000001	#	Query	#	#	use `test`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c
 mysqld-bin.000001	#	Query	#	#	use `test`; TRUNCATE t1m
@@ -70,17 +70,17 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 mysqld-bin.000001	#	Query	#	#	BEGIN
 mysqld-bin.000001	#	Table_map	#	#	table_id: # (test.t1m)
-mysqld-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	#	#	COMMIT
 mysqld-bin.000001	#	Query	#	#	BEGIN
 mysqld-bin.000001	#	Table_map	#	#	table_id: # (test.t1b)
-mysqld-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	#	#	COMMIT
 mysqld-bin.000001	#	Query	#	#	BEGIN
 mysqld-bin.000001	#	Table_map	#	#	table_id: # (test.t1n)
 mysqld-bin.000001	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000001	#	Write_rows	#	#	table_id: #
-mysqld-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	#	#	table_id: #
+mysqld-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	#	#	COMMIT
 RESET MASTER;
 DROP TABLE t1m, t1b, t1n;

=== modified file 'mysql-test/suite/binlog/r/binlog_row_binlog.result'
--- a/mysql-test/suite/binlog/r/binlog_row_binlog.result	2011-04-07 19:57:33 +0000
+++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result	2011-09-20 12:32:59 +0000
@@ -14,11 +14,11 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	use `test`; create table t2 (a int) engine=innodb
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 drop table t1,t2;
 reset master;
@@ -31,205 +31,205 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	use `test`; create table t1 (n int) engine=innodb
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Rotate	#	#	master-bin.000002;pos=4
 show binlog events in 'master-bin.000002' from <binlog_start>;
@@ -250,11 +250,11 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	use `test`; create table t1(n int) engine=innodb
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	use `test`; drop table t1
 set @bcs = @@binlog_cache_size;
@@ -266,805 +266,805 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int) engine=innodb
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Rotate	#	#	master-bin.000002;pos=4
 drop table t1;
@@ -1084,7 +1084,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned)
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; drop table t1
 reset master;
@@ -1191,7 +1191,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	use `test`; create table t1 (id tinyint auto_increment primary key)
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; drop table t1
 master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int)
@@ -1205,15 +1205,15 @@ master-bin.000001	#	Query	#	#	use `test`
 )
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (mysql.user)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (mysql.user)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Update_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (mysql.user)
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 drop table t1,t2,t3,tt1;
 create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
@@ -1226,7 +1226,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	use `test`; create table t1 (id tinyint auto_increment primary key)
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; drop table t1
 master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int)
@@ -1240,29 +1240,29 @@ master-bin.000001	#	Query	#	#	use `test`
 )
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (mysql.user)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (mysql.user)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Update_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (mysql.user)
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE `t1`,`t2`,`t3` /* generated by server */
 master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; FLUSH TABLES
 insert delayed into t1 values (null),(null),(null),(null);
@@ -1323,11 +1323,11 @@ Log_name	Pos	Event_type	Server_id	End_lo
 #	#	Query	1	#	use `test`; CREATE TABLE t1 (a INT PRIMARY KEY)
 #	#	Query	1	#	BEGIN
 #	#	Table_map	1	#	table_id: # (test.t1)
-#	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+#	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 #	#	Query	1	#	COMMIT
 #	#	Query	1	#	BEGIN
 #	#	Table_map	1	#	table_id: # (test.t1)
-#	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+#	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 #	#	Query	1	#	COMMIT
 DROP TABLE t1;
 

=== modified file 'mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result'
--- a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result	2009-05-31 05:44:41 +0000
+++ b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result	2011-09-20 12:32:59 +0000
@@ -7,7 +7,7 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 flush logs;
 /*!40019 SET @@session.max_insert_delayed_threads=0*/;

=== modified file 'mysql-test/suite/binlog/r/binlog_row_insert_select.result'
--- a/mysql-test/suite/binlog/r/binlog_row_insert_select.result	2009-05-31 05:44:41 +0000
+++ b/mysql-test/suite/binlog/r/binlog_row_insert_select.result	2011-09-20 12:32:59 +0000
@@ -10,7 +10,7 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 select * from t1;
 a

=== modified file 'mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result'
--- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result	2011-04-07 21:06:07 +0000
+++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result	2011-09-20 12:32:59 +0000
@@ -10,9 +10,9 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 delete from t1;
 delete from t2;
@@ -27,9 +27,9 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 delete from t1;
 delete from t2;
@@ -47,12 +47,12 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	SAVEPOINT `my_savepoint`
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK TO `my_savepoint`
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 delete from t1;
@@ -76,15 +76,15 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	SAVEPOINT `my_savepoint`
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK TO `my_savepoint`
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 delete from t1;
 delete from t2;
@@ -102,9 +102,9 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 delete from t1;
 delete from t2;
@@ -115,11 +115,11 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 delete from t1;
 delete from t2;
@@ -131,11 +131,11 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 insert into t1 values(11);
 commit;
@@ -143,15 +143,15 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 alter table t2 engine=INNODB;
 delete from t1;
@@ -165,9 +165,9 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 delete from t1;
 delete from t2;
@@ -192,7 +192,7 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 delete from t1;
 delete from t2;
@@ -213,9 +213,9 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 delete from t1;
 delete from t2;
@@ -265,32 +265,32 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	use `test`; alter table t2 engine=MyISAM
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; drop table t1,t2
 master-bin.000001	#	Query	#	#	use `test`; create table t0 (n int)
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t0)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t0)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; create table t2 (n int) engine=innodb
 do release_lock("lock1");
@@ -376,46 +376,46 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE if exists t2
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE IF EXISTS t2
 master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; TRUNCATE table t2
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t2
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE `t1` /* generated by server */
 reset master;
@@ -462,9 +462,9 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.ti)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.ti)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 select count(*) from ti /* zero */;
 count(*)
@@ -515,7 +515,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 /* only (!) with fixes for #23333 will show there is the query */;
 select count(*) from t1 /* must be 3 */;
@@ -534,7 +534,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 /* the query must be in regardless of #23333 */;
 select count(*) from t1 /* must be 5 */;
@@ -560,7 +560,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 /* the output must denote there is the query */;
 select count(*) from t1 /* must be 1 */;
@@ -577,8 +577,8 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 /* the output must denote there is the query */;
 select count(*) from t1 /* must be 2 */;
@@ -594,9 +594,9 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Update_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Update_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 /* the output must denote there is the query */;
 select count(*) from t1 /* must be 2 */;
@@ -614,7 +614,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 /* the output must denote there is the query */;
 select count(*) from t1 /* must be 4 */;
@@ -648,7 +648,7 @@ master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 /* the output must denote there is the query */;
 select count(*) from t1 /* must be 1 */;
@@ -670,9 +670,9 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Delete_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 /* the output must denote there is the query */;
 select count(*) from t1 /* must be 1 */;
@@ -695,9 +695,9 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 /* the output must denote there is the query */;
 drop trigger trg_del_t2;
@@ -721,9 +721,9 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.ti)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.ti)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 select count(*) from ti /* zero */;
 count(*)
@@ -774,7 +774,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 select count(*) from t1 /* must be 3 */;
 count(*)
@@ -792,7 +792,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 select count(*) from t1 /* must be 5 */;
 count(*)
@@ -817,7 +817,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 select count(*) from t1 /* must be 1 */;
 count(*)
@@ -833,8 +833,8 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 select count(*) from t1 /* must be 2 */;
 count(*)
@@ -849,9 +849,9 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Update_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Update_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 select count(*) from t1 /* must be 2 */;
 count(*)
@@ -868,7 +868,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 select count(*) from t1 /* must be 4 */;
 count(*)
@@ -901,7 +901,7 @@ master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 select count(*) from t1 /* must be 1 */;
 count(*)
@@ -922,9 +922,9 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Delete_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 select count(*) from t1 /* must be 1 */;
 count(*)
@@ -946,9 +946,9 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	ROLLBACK
 drop trigger trg_del_t2;
 drop table t1,t2,t3,t4,t5;

=== modified file 'mysql-test/suite/binlog/r/binlog_stm_binlog.result'
--- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result	2011-04-07 19:57:33 +0000
+++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result	2011-09-20 12:32:59 +0000
@@ -459,12 +459,12 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 115 )
 master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 114 )
 master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 113 )
-master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 112 )
+master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( <binlog_start> )
 master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 111 )
 master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 110 )
 master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 109 )
 master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 108 )
-master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( <binlog_start> )
+master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 107 )
 master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 106 )
 master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 105 )
 master-bin.000001	#	Query	#	#	use `test`; insert into t1 values( 104 )
@@ -728,15 +728,15 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; FLUSH TABLES
 insert delayed into t1 values (null),(null),(null),(null);
@@ -798,7 +798,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 #	#	Query	1	#	use `test`; INSERT INTO t1 VALUES (1)
 #	#	Query	1	#	BEGIN
 #	#	Table_map	1	#	table_id: # (test.t1)
-#	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+#	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 #	#	Query	1	#	COMMIT
 DROP TABLE t1;
 

=== modified file 'mysql-test/suite/binlog/r/binlog_stm_row.result'
--- a/mysql-test/suite/binlog/r/binlog_stm_row.result	2009-11-18 14:50:31 +0000
+++ b/mysql-test/suite/binlog/r/binlog_stm_row.result	2011-09-20 12:32:59 +0000
@@ -70,7 +70,7 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t2 VALUES (4)
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 DROP TABLE t1;
 DROP TABLE t2;

=== modified file 'mysql-test/suite/binlog/t/binlog_incident.test'
--- a/mysql-test/suite/binlog/t/binlog_incident.test	2009-12-17 15:43:35 +0000
+++ b/mysql-test/suite/binlog/t/binlog_incident.test	2011-09-20 12:32:59 +0000
@@ -20,7 +20,7 @@ REPLACE INTO t1 VALUES (4);
 DROP TABLE t1;
 FLUSH LOGS;
 
-exec $MYSQL_BINLOG --start-position=107 $MYSQLD_DATADIR/master-bin.000001 >$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql;
+exec $MYSQL_BINLOG --start-position=112 $MYSQLD_DATADIR/master-bin.000001 >$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql;
 --disable_query_log
 eval SELECT cont LIKE '%RELOAD DATABASE; # Shall generate syntax error%' AS `Contain RELOAD DATABASE` FROM (SELECT load_file('$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql') AS cont) AS tbl;
 --enable_query_log

=== modified file 'mysql-test/suite/binlog/t/binlog_killed_simulate.test'
--- a/mysql-test/suite/binlog/t/binlog_killed_simulate.test	2010-10-12 11:54:35 +0000
+++ b/mysql-test/suite/binlog/t/binlog_killed_simulate.test	2011-09-20 12:32:59 +0000
@@ -24,7 +24,7 @@ update t1 set a=2 /* will be "killed" af
 #      for some constants like the offset of the first real event
 #      that is different between severs versions.
 let $MYSQLD_DATADIR= `select @@datadir`;
---exec $MYSQL_BINLOG --force-if-open --start-position=107 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
+--exec $MYSQL_BINLOG --force-if-open --start-position=112 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 eval select
 (@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))

=== modified file 'mysql-test/suite/ndb/r/ndb_discover_db.result'
--- a/mysql-test/suite/ndb/r/ndb_discover_db.result	2009-02-01 21:05:19 +0000
+++ b/mysql-test/suite/ndb/r/ndb_discover_db.result	2011-09-20 12:32:59 +0000
@@ -18,8 +18,8 @@ Log_name	Pos	Event_type	Server_id	End_lo
 mysqld-bin.000001	#	Query	1	#	BEGIN
 mysqld-bin.000001	#	Table_map	1	#	table_id: # (discover_db.t1)
 mysqld-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000001	#	Write_rows	1	#	table_id: #
-mysqld-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	1	#	table_id: #
+mysqld-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	1	#	COMMIT
 reset master;
 insert into discover_db_2.t1 values (1,1);
@@ -28,8 +28,8 @@ Log_name	Pos	Event_type	Server_id	End_lo
 mysqld-bin.000001	#	Query	1	#	BEGIN
 mysqld-bin.000001	#	Table_map	1	#	table_id: # (discover_db_2.t1)
 mysqld-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000001	#	Write_rows	1	#	table_id: #
-mysqld-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	1	#	table_id: #
+mysqld-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	1	#	COMMIT
 drop database discover_db;
 drop database discover_db_2;

=== modified file 'mysql-test/suite/ndb_binlog/r/ndb_binlog_ddl_multi.result'
--- a/mysql-test/suite/ndb_binlog/r/ndb_binlog_ddl_multi.result	2009-09-11 10:34:36 +0000
+++ b/mysql-test/suite/ndb_binlog/r/ndb_binlog_ddl_multi.result	2011-09-20 12:32:59 +0000
@@ -49,8 +49,8 @@ Log_name	Pos	Event_type	Server_id	End_lo
 mysqld-bin.000001	#	Query	2	#	BEGIN
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (test.t2)
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000001	#	Write_rows	2	#	table_id: #
-mysqld-bin.000001	#	Write_rows	2	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: #
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	2	#	COMMIT
 mysqld-bin.000001	#	Query	2	#	drop database mysqltest
 mysqld-bin.000001	#	Query	2	#	use `test`; create table t1 (a int primary key) engine=ndb
@@ -185,14 +185,14 @@ mysqld-bin.000001	#	Query	2	#	use `test`
 mysqld-bin.000001	#	Query	2	#	BEGIN
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (test.t1)
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000001	#	Write_rows	2	#	table_id: #
-mysqld-bin.000001	#	Write_rows	2	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: #
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	2	#	COMMIT
 mysqld-bin.000001	#	Query	2	#	use `test`; rename table `test`.`t1` to `test`.`t2`
 mysqld-bin.000001	#	Query	2	#	BEGIN
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (test.t2)
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000001	#	Write_rows	2	#	table_id: #
-mysqld-bin.000001	#	Write_rows	2	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: #
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	2	#	COMMIT
 mysqld-bin.000001	#	Query	2	#	use `test`; drop table t2

=== modified file 'mysql-test/suite/ndb_binlog/r/ndb_binlog_discover.result'
--- a/mysql-test/suite/ndb_binlog/r/ndb_binlog_discover.result	2009-02-11 10:27:14 +0000
+++ b/mysql-test/suite/ndb_binlog/r/ndb_binlog_discover.result	2011-09-20 12:32:59 +0000
@@ -15,7 +15,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 mysqld-bin.000002	#	Query	1	#	BEGIN
 mysqld-bin.000002	#	Table_map	1	#	table_id: # (test.t1)
 mysqld-bin.000002	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000002	#	Write_rows	1	#	table_id: #
-mysqld-bin.000002	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+mysqld-bin.000002	#	Write_rows_v1	1	#	table_id: #
+mysqld-bin.000002	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 mysqld-bin.000002	#	Query	1	#	COMMIT
 drop table t1;

=== modified file 'mysql-test/suite/ndb_binlog/r/ndb_binlog_log_bin.result'
--- a/mysql-test/suite/ndb_binlog/r/ndb_binlog_log_bin.result	2009-09-11 10:34:36 +0000
+++ b/mysql-test/suite/ndb_binlog/r/ndb_binlog_log_bin.result	2011-09-20 12:32:59 +0000
@@ -21,8 +21,8 @@ Log_name	Pos	Event_type	Server_id	End_lo
 mysqld-bin.000001	#	Query	2	#	BEGIN
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (mysqltest.t2)
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000001	#	Write_rows	2	#	table_id: #
-mysqld-bin.000001	#	Write_rows	2	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: #
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	2	#	COMMIT
 reset master;
 use mysqltest;
@@ -36,8 +36,8 @@ Log_name	Pos	Event_type	Server_id	End_lo
 mysqld-bin.000001	#	Query	1	#	BEGIN
 mysqld-bin.000001	#	Table_map	1	#	table_id: # (mysqltest.t2)
 mysqld-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000001	#	Write_rows	1	#	table_id: #
-mysqld-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	1	#	table_id: #
+mysqld-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	1	#	COMMIT
 mysqld-bin.000001	#	Query	1	#	use `mysqltest`; drop table t1
 mysqld-bin.000001	#	Query	1	#	use `mysqltest`; drop table t2
@@ -46,8 +46,8 @@ mysqld-bin.000001	#	Query	1	#	use `mysql
 mysqld-bin.000001	#	Query	1	#	BEGIN
 mysqld-bin.000001	#	Table_map	1	#	table_id: # (mysqltest.t1)
 mysqld-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000001	#	Write_rows	1	#	table_id: #
-mysqld-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	1	#	table_id: #
+mysqld-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	1	#	COMMIT
 use mysqltest;
 insert into t2 values (1,1);
@@ -60,13 +60,13 @@ mysqld-bin.000001	#	Query	2	#	use `mysql
 mysqld-bin.000001	#	Query	2	#	BEGIN
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (mysqltest.t1)
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000001	#	Write_rows	2	#	table_id: #
-mysqld-bin.000001	#	Write_rows	2	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: #
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	2	#	COMMIT
 mysqld-bin.000001	#	Query	2	#	BEGIN
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (mysqltest.t2)
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000001	#	Write_rows	2	#	table_id: #
-mysqld-bin.000001	#	Write_rows	2	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: #
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	2	#	COMMIT
 drop database mysqltest;

=== modified file 'mysql-test/suite/ndb_binlog/r/ndb_binlog_multi.result'
--- a/mysql-test/suite/ndb_binlog/r/ndb_binlog_multi.result	2010-09-03 05:30:17 +0000
+++ b/mysql-test/suite/ndb_binlog/r/ndb_binlog_multi.result	2011-09-20 12:32:59 +0000
@@ -12,8 +12,8 @@ mysqld-bin.000001	#	Query	2	#	use `test`
 mysqld-bin.000001	#	Query	2	#	BEGIN
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (test.t2)
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000001	#	Write_rows	2	#	table_id: #
-mysqld-bin.000001	#	Write_rows	2	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: #
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	2	#	COMMIT
 select * from t2 order by a;
 a	b
@@ -34,8 +34,8 @@ mysqld-bin.000001	#	Query	1	#	use `test`
 mysqld-bin.000001	#	Query	1	#	BEGIN
 mysqld-bin.000001	#	Table_map	1	#	table_id: # (test.t2)
 mysqld-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000001	#	Write_rows	1	#	table_id: #
-mysqld-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	1	#	table_id: #
+mysqld-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	1	#	COMMIT
 mysqld-bin.000001	#	Query	1	#	use `test`; DROP TABLE t2
 SELECT inserts,updates,deletes,schemaops FROM 
@@ -52,8 +52,8 @@ mysqld-bin.000001	#	Query	2	#	use `test`
 mysqld-bin.000001	#	Query	2	#	BEGIN
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (test.t1)
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000001	#	Write_rows	2	#	table_id: #
-mysqld-bin.000001	#	Write_rows	2	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: #
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	2	#	COMMIT
 SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM 
 mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1;
@@ -70,8 +70,8 @@ mysqld-bin.000001	#	Query	2	#	use `test`
 mysqld-bin.000001	#	Query	2	#	BEGIN
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (test.t1)
 mysqld-bin.000001	#	Table_map	2	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000001	#	Write_rows	2	#	table_id: #
-mysqld-bin.000001	#	Write_rows	2	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: #
+mysqld-bin.000001	#	Write_rows_v1	2	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	2	#	COMMIT
 mysqld-bin.000001	#	Query	2	#	use `test`; drop table t1
 SELECT inserts,updates,deletes,schemaops FROM

=== modified file 'mysql-test/suite/ndb_binlog/r/ndb_binlog_restore.result'
--- a/mysql-test/suite/ndb_binlog/r/ndb_binlog_restore.result	2009-12-04 17:15:03 +0000
+++ b/mysql-test/suite/ndb_binlog/r/ndb_binlog_restore.result	2011-09-20 12:32:59 +0000
@@ -39,8 +39,8 @@ Log_name	Pos	Event_type	Server_id	End_lo
 mysqld-bin.000001	#	Query	1	#	BEGIN
 mysqld-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
 mysqld-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-mysqld-bin.000001	#	Write_rows	1	#	table_id: #
-mysqld-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+mysqld-bin.000001	#	Write_rows_v1	1	#	table_id: #
+mysqld-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	1	#	COMMIT
 mysqld-bin.000001	#	Query	1	#	use `test`; create table binlogmarker (a int) engine=ndb
 drop table binlogmarker, t1;

=== modified file 'mysql-test/suite/ndb_rpl/r/ndb_rpl_circular.result'
--- a/mysql-test/suite/ndb_rpl/r/ndb_rpl_circular.result	2011-05-13 07:40:50 +0000
+++ b/mysql-test/suite/ndb_rpl/r/ndb_rpl_circular.result	2011-09-20 12:32:59 +0000
@@ -69,14 +69,14 @@ slave-bin.000001	#	Query	2	#	use `test`;
 slave-bin.000001	#	Query	2	#	BEGIN
 slave-bin.000001	#	Table_map	2	#	table_id: # (test.t1)
 slave-bin.000001	#	Table_map	2	#	table_id: # (mysql.ndb_apply_status)
-slave-bin.000001	#	Write_rows	2	#	table_id: #
-slave-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Write_rows_v1	2	#	table_id: #
+slave-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-bin.000001	#	Query	2	#	COMMIT
 slave-bin.000001	#	Query	2	#	BEGIN
 slave-bin.000001	#	Table_map	2	#	table_id: # (test.t1)
 slave-bin.000001	#	Table_map	2	#	table_id: # (mysql.ndb_apply_status)
-slave-bin.000001	#	Write_rows	2	#	table_id: #
-slave-bin.000001	#	Write_rows	2	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Write_rows_v1	2	#	table_id: #
+slave-bin.000001	#	Write_rows_v1	2	#	table_id: # flags: STMT_END_F
 slave-bin.000001	#	Query	2	#	COMMIT
 include/check_slave_is_running.inc
 SELECT * FROM t1 ORDER BY a;
@@ -99,8 +99,8 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 STOP SLAVE;
 DROP TABLE t1;

=== modified file 'mysql-test/suite/ndb_rpl/r/ndb_rpl_dd_basic.result'
--- a/mysql-test/suite/ndb_rpl/r/ndb_rpl_dd_basic.result	2011-05-13 07:40:50 +0000
+++ b/mysql-test/suite/ndb_rpl/r/ndb_rpl_dd_basic.result	2011-09-20 12:32:59 +0000
@@ -54,8 +54,8 @@ engine ndb
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 drop table t1;
 alter tablespace ts1

=== modified file 'mysql-test/suite/ndb_rpl/r/ndb_rpl_multi.result'
--- a/mysql-test/suite/ndb_rpl/r/ndb_rpl_multi.result	2011-05-13 07:40:50 +0000
+++ b/mysql-test/suite/ndb_rpl/r/ndb_rpl_multi.result	2011-09-20 12:32:59 +0000
@@ -28,12 +28,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 set SQL_LOG_BIN=1;
-@the_pos:=Position	@the_file:=SUBSTRING_INDEX(REPLACE(FILE,'\\','/'), '/', -1)
-107	master-bin.000001
 include/rpl_change_topology.inc [new topology=3->2]
 include/start_slave.inc
 INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4);

=== modified file 'mysql-test/suite/ndb_rpl/r/ndb_rpl_slave_lsu.result'
--- a/mysql-test/suite/ndb_rpl/r/ndb_rpl_slave_lsu.result	2011-05-13 07:40:50 +0000
+++ b/mysql-test/suite/ndb_rpl/r/ndb_rpl_slave_lsu.result	2011-09-20 12:32:59 +0000
@@ -83,24 +83,24 @@ master-bin.000001	#	Query	1	#	use `test`
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_1)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; DROP TABLE bug45756_master_logged_1
 master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_2)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_3)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -163,24 +163,24 @@ master-bin.000001	#	Query	3	#	use `test`
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_1)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; drop table `test`.`bug45756_master_logged_1`
 master-bin.000001	#	Query	3	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_2)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 master-bin.000001	#	Query	3	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_3)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; DROP TABLE bug45756_master_logged_3
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -243,24 +243,24 @@ slave-master-bin.000001	#	Query	5	#	use
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_1)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; drop table `test`.`bug_45756_slave_logged_1`
 slave-master-bin.000001	#	Query	5	#	use `test`; CREATE TABLE bug_45756_slave_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_2)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; DROP TABLE bug_45756_slave_logged_2
 slave-master-bin.000001	#	Query	5	#	use `test`; CREATE TABLE bug_45756_slave_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_3)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; drop table `test`.`bug_45756_slave_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -308,48 +308,48 @@ slave-master-bin.000001	#	Query	6	#	use
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_1)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; drop table `test`.`bug_45756_slave_logged_1`
 slave-master-bin.000001	#	Query	6	#	use `test`; CREATE TABLE bug_45756_slave_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_2)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; drop table `test`.`bug_45756_slave_logged_2`
 slave-master-bin.000001	#	Query	6	#	use `test`; CREATE TABLE bug_45756_slave_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_3)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; DROP TABLE bug_45756_slave_logged_3
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_1 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_1)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_1`
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_2)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_3)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -479,24 +479,24 @@ master-bin.000001	#	Query	1	#	use `test`
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_1)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; DROP TABLE bug45756_master_logged_1
 master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_2)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_3)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -559,24 +559,24 @@ master-bin.000001	#	Query	3	#	use `test`
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_1)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; drop table `test`.`bug45756_master_logged_1`
 master-bin.000001	#	Query	3	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_2)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 master-bin.000001	#	Query	3	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_3)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; DROP TABLE bug45756_master_logged_3
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -639,24 +639,24 @@ slave-master-bin.000001	#	Query	5	#	use
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_1)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; drop table `test`.`bug_45756_slave_logged_1`
 slave-master-bin.000001	#	Query	5	#	use `test`; CREATE TABLE bug_45756_slave_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_2)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; DROP TABLE bug_45756_slave_logged_2
 slave-master-bin.000001	#	Query	5	#	use `test`; CREATE TABLE bug_45756_slave_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_3)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; drop table `test`.`bug_45756_slave_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -704,48 +704,48 @@ slave-master-bin.000001	#	Query	6	#	use
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_1)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; drop table `test`.`bug_45756_slave_logged_1`
 slave-master-bin.000001	#	Query	6	#	use `test`; CREATE TABLE bug_45756_slave_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_2)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; drop table `test`.`bug_45756_slave_logged_2`
 slave-master-bin.000001	#	Query	6	#	use `test`; CREATE TABLE bug_45756_slave_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_3)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; DROP TABLE bug_45756_slave_logged_3
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_1 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_1)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_1`
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_2)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_3)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -875,24 +875,24 @@ master-bin.000001	#	Query	1	#	use `test`
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_1)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; DROP TABLE bug45756_master_logged_1
 master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_2)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_3)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -955,24 +955,24 @@ master-bin.000001	#	Query	3	#	use `test`
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_1)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; drop table `test`.`bug45756_master_logged_1`
 master-bin.000001	#	Query	3	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_2)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 master-bin.000001	#	Query	3	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_3)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; DROP TABLE bug45756_master_logged_3
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -1035,24 +1035,24 @@ slave-master-bin.000001	#	Query	5	#	use
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_1)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; drop table `test`.`bug_45756_slave_logged_1`
 slave-master-bin.000001	#	Query	5	#	use `test`; CREATE TABLE bug_45756_slave_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_2)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; DROP TABLE bug_45756_slave_logged_2
 slave-master-bin.000001	#	Query	5	#	use `test`; CREATE TABLE bug_45756_slave_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_3)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; drop table `test`.`bug_45756_slave_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -1100,48 +1100,48 @@ slave-master-bin.000001	#	Query	6	#	use
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_1)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; drop table `test`.`bug_45756_slave_logged_1`
 slave-master-bin.000001	#	Query	6	#	use `test`; CREATE TABLE bug_45756_slave_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_2)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; drop table `test`.`bug_45756_slave_logged_2`
 slave-master-bin.000001	#	Query	6	#	use `test`; CREATE TABLE bug_45756_slave_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_3)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; DROP TABLE bug_45756_slave_logged_3
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_1 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_1)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; DROP TABLE bug45756_master_logged_1
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_2)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_3)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');

=== modified file 'mysql-test/suite/ndb_rpl/r/ndb_rpl_slave_lsu_anyval.result'
--- a/mysql-test/suite/ndb_rpl/r/ndb_rpl_slave_lsu_anyval.result	2011-05-13 07:40:50 +0000
+++ b/mysql-test/suite/ndb_rpl/r/ndb_rpl_slave_lsu_anyval.result	2011-09-20 12:32:59 +0000
@@ -83,24 +83,24 @@ master-bin.000001	#	Query	1	#	use `test`
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_1)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; DROP TABLE bug45756_master_logged_1
 master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_2)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_3)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -163,24 +163,24 @@ master-bin.000001	#	Query	3	#	use `test`
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_1)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; drop table `test`.`bug45756_master_logged_1`
 master-bin.000001	#	Query	3	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_2)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 master-bin.000001	#	Query	3	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_3)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; DROP TABLE bug45756_master_logged_3
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -243,24 +243,24 @@ slave-master-bin.000001	#	Query	5	#	use
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_1)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; drop table `test`.`bug_45756_slave_logged_1`
 slave-master-bin.000001	#	Query	5	#	use `test`; CREATE TABLE bug_45756_slave_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_2)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; DROP TABLE bug_45756_slave_logged_2
 slave-master-bin.000001	#	Query	5	#	use `test`; CREATE TABLE bug_45756_slave_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_3)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; drop table `test`.`bug_45756_slave_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -308,48 +308,48 @@ slave-master-bin.000001	#	Query	6	#	use
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_1)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; drop table `test`.`bug_45756_slave_logged_1`
 slave-master-bin.000001	#	Query	6	#	use `test`; CREATE TABLE bug_45756_slave_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_2)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; drop table `test`.`bug_45756_slave_logged_2`
 slave-master-bin.000001	#	Query	6	#	use `test`; CREATE TABLE bug_45756_slave_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_3)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; DROP TABLE bug_45756_slave_logged_3
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_1 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_1)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_1`
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_2)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_3)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -479,24 +479,24 @@ master-bin.000001	#	Query	1	#	use `test`
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_1)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; DROP TABLE bug45756_master_logged_1
 master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_2)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_3)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -559,24 +559,24 @@ master-bin.000001	#	Query	3	#	use `test`
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_1)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; drop table `test`.`bug45756_master_logged_1`
 master-bin.000001	#	Query	3	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_2)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 master-bin.000001	#	Query	3	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_3)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; DROP TABLE bug45756_master_logged_3
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -639,24 +639,24 @@ slave-master-bin.000001	#	Query	5	#	use
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_1)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; drop table `test`.`bug_45756_slave_logged_1`
 slave-master-bin.000001	#	Query	5	#	use `test`; CREATE TABLE bug_45756_slave_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_2)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; DROP TABLE bug_45756_slave_logged_2
 slave-master-bin.000001	#	Query	5	#	use `test`; CREATE TABLE bug_45756_slave_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_3)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; drop table `test`.`bug_45756_slave_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -704,48 +704,48 @@ slave-master-bin.000001	#	Query	6	#	use
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_1)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; drop table `test`.`bug_45756_slave_logged_1`
 slave-master-bin.000001	#	Query	6	#	use `test`; CREATE TABLE bug_45756_slave_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_2)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; drop table `test`.`bug_45756_slave_logged_2`
 slave-master-bin.000001	#	Query	6	#	use `test`; CREATE TABLE bug_45756_slave_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_3)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; DROP TABLE bug_45756_slave_logged_3
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_1 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_1)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_1`
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_2)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_3)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -875,24 +875,24 @@ master-bin.000001	#	Query	1	#	use `test`
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_1)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; DROP TABLE bug45756_master_logged_1
 master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_2)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 master-bin.000001	#	Query	1	#	BEGIN
 master-bin.000001	#	Table_map	1	#	table_id: # (test.bug45756_master_logged_3)
 master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	1	#	table_id: #
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	1	#	table_id: #
+master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
 master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -955,24 +955,24 @@ master-bin.000001	#	Query	3	#	use `test`
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_1)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; drop table `test`.`bug45756_master_logged_1`
 master-bin.000001	#	Query	3	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_2)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 master-bin.000001	#	Query	3	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.bug45756_master_logged_3)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 master-bin.000001	#	Query	3	#	use `test`; DROP TABLE bug45756_master_logged_3
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -1035,24 +1035,24 @@ slave-master-bin.000001	#	Query	5	#	use
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_1)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; drop table `test`.`bug_45756_slave_logged_1`
 slave-master-bin.000001	#	Query	5	#	use `test`; CREATE TABLE bug_45756_slave_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_2)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; DROP TABLE bug_45756_slave_logged_2
 slave-master-bin.000001	#	Query	5	#	use `test`; CREATE TABLE bug_45756_slave_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	5	#	BEGIN
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (test.bug_45756_slave_logged_3)
 slave-master-bin.000001	#	Table_map	5	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	5	#	table_id: #
-slave-master-bin.000001	#	Write_rows	5	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	5	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	5	#	COMMIT
 slave-master-bin.000001	#	Query	5	#	use `test`; drop table `test`.`bug_45756_slave_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');
@@ -1100,48 +1100,48 @@ slave-master-bin.000001	#	Query	6	#	use
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_1)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; drop table `test`.`bug_45756_slave_logged_1`
 slave-master-bin.000001	#	Query	6	#	use `test`; CREATE TABLE bug_45756_slave_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_2)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; drop table `test`.`bug_45756_slave_logged_2`
 slave-master-bin.000001	#	Query	6	#	use `test`; CREATE TABLE bug_45756_slave_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug_45756_slave_logged_3)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	6	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	6	#	use `test`; DROP TABLE bug_45756_slave_logged_3
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_1 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_1)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; DROP TABLE bug45756_master_logged_1
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_2 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_2)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_2`
 slave-master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE bug45756_master_logged_3 (a int) engine = NDB
 slave-master-bin.000001	#	Query	6	#	BEGIN
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (test.bug45756_master_logged_3)
 slave-master-bin.000001	#	Table_map	6	#	table_id: # (mysql.ndb_apply_status)
-slave-master-bin.000001	#	Write_rows	6	#	table_id: #
-slave-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
+slave-master-bin.000001	#	Write_rows_v1	6	#	table_id: #
+slave-master-bin.000001	#	Write_rows_v1	1	#	table_id: # flags: STMT_END_F
 slave-master-bin.000001	#	Query	6	#	COMMIT
 slave-master-bin.000001	#	Query	1	#	use `test`; drop table `test`.`bug45756_master_logged_3`
 select replace(right(txt, length(txt)-17), '\r', '') as binlog_entries from raw_binlog_rows where txt like '%server id%' and not (txt like '%Start%' or txt like '%Rotate%');

=== modified file 'mysql-test/suite/ndb_rpl/r/ndb_rpl_slave_restart.result'
--- a/mysql-test/suite/ndb_rpl/r/ndb_rpl_slave_restart.result	2011-05-13 07:40:50 +0000
+++ b/mysql-test/suite/ndb_rpl/r/ndb_rpl_slave_restart.result	2011-09-20 12:32:59 +0000
@@ -28,16 +28,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	3	#	BEGIN
 master-bin.000001	#	Table_map	3	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	3	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	3	#	table_id: #
-master-bin.000001	#	Write_rows	3	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	3	#	table_id: #
+master-bin.000001	#	Write_rows_v1	3	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	3	#	COMMIT
 set SQL_LOG_BIN=1;
-@the_pos:=Position	@the_file:=SUBSTRING_INDEX(REPLACE(FILE,'\\','/'), '/', -1)
-107	master-bin.000001
-CHANGE MASTER TO
-master_port=<MASTER_PORT1>,
-master_log_file = 'master-bin.000001',
-master_log_pos = 107 ;
 start slave;
 INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4);
 DELETE FROM t1 WHERE c3 = 1;

=== modified file 'mysql-test/suite/ndb_rpl/r/rpl_truncate_7ndb.result'
--- a/mysql-test/suite/ndb_rpl/r/rpl_truncate_7ndb.result	2011-05-13 07:40:50 +0000
+++ b/mysql-test/suite/ndb_rpl/r/rpl_truncate_7ndb.result	2011-09-20 12:32:59 +0000
@@ -29,8 +29,8 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; TRUNCATE TABLE t1
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
@@ -64,8 +64,8 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; TRUNCATE TABLE t1
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
@@ -73,14 +73,14 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 include/rpl_end.inc

=== modified file 'mysql-test/suite/ndb_rpl/r/rpl_truncate_7ndb_2.result'
--- a/mysql-test/suite/ndb_rpl/r/rpl_truncate_7ndb_2.result	2011-05-13 07:40:50 +0000
+++ b/mysql-test/suite/ndb_rpl/r/rpl_truncate_7ndb_2.result	2011-09-20 12:32:59 +0000
@@ -29,8 +29,8 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; TRUNCATE TABLE t1
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
@@ -64,8 +64,8 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; TRUNCATE TABLE t1
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
@@ -73,14 +73,14 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 include/rpl_end.inc

=== modified file 'mysql-test/suite/ndb_rpl/t/ndb_rpl_gap_event.test'
--- a/mysql-test/suite/ndb_rpl/t/ndb_rpl_gap_event.test	2011-05-16 06:50:14 +0000
+++ b/mysql-test/suite/ndb_rpl/t/ndb_rpl_gap_event.test	2011-09-20 12:32:59 +0000
@@ -39,7 +39,6 @@ let $mysqld_name=mysqld.1.1;
 --source include/restart_mysqld.inc
 #show binlog events in 'master-bin.000002';
 let $log_name=master-bin.000002;
-let $start_pos=107;
 let $end_pos=143;
 let $off_set=0;
 -- source include/show_binlog_using_logname.inc

=== modified file 'mysql-test/suite/ndb_rpl/t/ndb_rpl_multi.test'
--- a/mysql-test/suite/ndb_rpl/t/ndb_rpl_multi.test	2011-05-13 07:40:50 +0000
+++ b/mysql-test/suite/ndb_rpl/t/ndb_rpl_multi.test	2011-09-20 12:32:59 +0000
@@ -47,9 +47,11 @@ insert into t2 values (1);
 set SQL_LOG_BIN=1;
 --replace_result $the_epoch <the_epoch>
 --disable_query_log
+--disable_result_log
 eval SELECT @the_pos:=Position,
    @the_file:=SUBSTRING_INDEX(REPLACE(FILE,'\\\\','/'), '/', -1)
    FROM mysql.ndb_binlog_index WHERE epoch = $the_epoch ;
+--enable_result_log
 --enable_query_log
 let $the_pos= `SELECT @the_pos` ;
 let $the_file= `SELECT @the_file` ;

=== modified file 'mysql-test/suite/ndb_rpl/t/ndb_rpl_skip_gap_event.test'
--- a/mysql-test/suite/ndb_rpl/t/ndb_rpl_skip_gap_event.test	2011-05-13 07:40:50 +0000
+++ b/mysql-test/suite/ndb_rpl/t/ndb_rpl_skip_gap_event.test	2011-09-20 12:32:59 +0000
@@ -31,7 +31,6 @@ let $mysqld_name=mysqld.1.1;
 --source include/restart_mysqld.inc
 #show binlog events in 'master-bin.000002';
 let $log_name=master-bin.000002;
-let $start_pos=107;
 let $end_pos=143;
 let $off_set=0;
 -- source include/show_binlog_using_logname.inc

=== modified file 'mysql-test/suite/ndb_rpl/t/ndb_rpl_slave_restart.test'
--- a/mysql-test/suite/ndb_rpl/t/ndb_rpl_slave_restart.test	2011-05-13 07:40:50 +0000
+++ b/mysql-test/suite/ndb_rpl/t/ndb_rpl_slave_restart.test	2011-09-20 12:32:59 +0000
@@ -47,10 +47,10 @@ insert into t2 values (1);
 set SQL_LOG_BIN=1;
 --replace_result $the_epoch <the_epoch>
 --disable_query_log
+--disable_result_log
 eval SELECT @the_pos:=Position,
    @the_file:=SUBSTRING_INDEX(REPLACE(FILE,'\\\\','/'), '/', -1)
    FROM mysql.ndb_binlog_index WHERE epoch = $the_epoch ;
---enable_query_log
 let $the_pos= `SELECT @the_pos` ;
 let $the_file= `SELECT @the_file` ;
 
@@ -61,6 +61,8 @@ eval CHANGE MASTER TO
   master_port=$MASTER_MYPORT1,
   master_log_file = '$the_file',
   master_log_pos = $the_pos ;
+--enable_result_log
+--enable_query_log
 start slave;
 
 # insert some more values on the first master

=== modified file 'mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result'
--- a/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result	2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result	2011-09-20 12:32:59 +0000
@@ -48,26 +48,26 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t5)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	use `test`; update t1 set a = a + 5 where b = 1
 master-bin.000001	#	Query	#	#	use `test`; update t3 set a = a + 5 where b = 1
 master-bin.000001	#	Query	#	#	use `test`; delete from t1 where b = 1
@@ -76,20 +76,20 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t5)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; update t1 set a = a + 5 where b = 2
@@ -164,26 +164,26 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t5)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	use `test`; update t1 set a = a + 5 where b = 1
 master-bin.000001	#	Query	#	#	use `test`; update t3 set a = a + 5 where b = 1
 master-bin.000001	#	Query	#	#	use `test`; delete from t1 where b = 1
@@ -192,20 +192,20 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t5)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; update t1 set a = a + 5 where b = 2
@@ -282,26 +282,26 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	use `test`; insert into t3(a,b) values(1,1),(2,1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Update_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Update_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Update_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Update_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t5)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t6)
-master-bin.000001	#	Update_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Update_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Update_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Update_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	use `test`; delete from t1 where b = 1
 master-bin.000001	#	Query	#	#	use `test`; delete from t3 where b = 1
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
@@ -314,20 +314,20 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Update_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Update_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t5)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t6)
-master-bin.000001	#	Update_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Update_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; delete from t1 where b = 2
@@ -398,26 +398,26 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	use `test`; insert into t3(a,b) values(1,1),(2,1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Update_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Update_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Update_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t5)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Update_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Update_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Update_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	use `test`; delete from t1 where b = 1
 master-bin.000001	#	Query	#	#	use `test`; delete from t3 where b = 1
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
@@ -430,20 +430,20 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Update_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t5)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Update_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; delete from t1 where b = 2
@@ -516,26 +516,26 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	use `test`; update t3 set a = a + 5 where b = 1
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Delete_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Delete_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t5)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t6)
-master-bin.000001	#	Delete_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Delete_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; insert into t1(a,b) values(4,2)
@@ -552,20 +552,20 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Delete_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t5)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t6)
-master-bin.000001	#	Delete_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 commit;
 #Test if the results are consistent on master and slave
@@ -632,26 +632,26 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	use `test`; update t3 set a = a + 5 where b = 1
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Delete_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t5)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Delete_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; insert into t1(a,b) values(4,2)
@@ -668,20 +668,20 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t5)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t4)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 commit;
 #Test if the results are consistent on master and slave
@@ -721,38 +721,38 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 commit;
 #Test if the results are consistent on master and slave
@@ -788,38 +788,38 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 commit;
 #Test if the results are consistent on master and slave

=== modified file 'mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result'
--- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result	2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result	2011-09-20 12:32:59 +0000
@@ -845,7 +845,7 @@ master-bin.000001	#	Query	#	#	use `test_
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test_rpl.t2)
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Delete_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test_rpl`; DELETE FROM t1
@@ -858,7 +858,7 @@ master-bin.000001	#	Query	#	#	use `test_
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test_rpl.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test_rpl`; INSERT INTO t2 SELECT * FROM t1
@@ -880,7 +880,7 @@ master-bin.000001	#	Query	#	#	use `test_
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test_rpl.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test_rpl`; DELETE FROM t1
@@ -902,7 +902,7 @@ master-bin.000001	#	Query	#	#	use `test_
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test_rpl.t1)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Update_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test_rpl`; REPLACE INTO t1 SET a=3, b='t1, text 33'
@@ -996,7 +996,7 @@ master-bin.000001	#	Query	#	#	use `test_
 master-bin.000001	#	Query	#	#	SAVEPOINT `s2`
 master-bin.000001	#	Query	#	#	use `test_rpl`; INSERT INTO t1 VALUES (6, 'after savepoint s2')
 master-bin.000001	#	Table_map	#	#	table_id: # (test_rpl.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test_rpl`; DELETE FROM t1 WHERE a = 7
@@ -1038,7 +1038,7 @@ master-bin.000001	#	Query	#	#	use `test_
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test_rpl.t1)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Update_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test_rpl`; DELETE FROM t1 WHERE a = 202
@@ -1059,8 +1059,8 @@ END
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test_rpl.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test_rpl.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: #
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test_rpl`; DELETE FROM t1

=== modified file 'mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result'
--- a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result	2011-04-08 11:06:53 +0000
+++ b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result	2011-09-20 12:32:59 +0000
@@ -16,7 +16,7 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 **** On Slave ****
 show binlog events from <binlog_start>;
@@ -25,7 +25,7 @@ slave-bin.000001	#	Query	#	#	use `test`;
 slave-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
 slave-bin.000001	#	Query	#	#	BEGIN
 slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 slave-bin.000001	#	Query	#	#	COMMIT
 DROP TABLE IF EXISTS t1;
 SET @@global.binlog_format= @old_binlog_format;

=== modified file 'mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result'
--- a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result	2011-04-07 19:57:33 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result	2011-09-20 12:32:59 +0000
@@ -26,7 +26,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (a INT, b INT)
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 **** On Slave ****
 SHOW DATABASES;
@@ -56,7 +56,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (a INT)
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 DROP TABLE t1;
 ================ Test for BUG#17620 ================

=== modified file 'mysql-test/suite/rpl/r/rpl_row_conflicts.result'
--- a/mysql-test/suite/rpl/r/rpl_row_conflicts.result	2011-04-07 19:57:33 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_conflicts.result	2011-09-20 12:32:59 +0000
@@ -21,7 +21,7 @@ a
 [on slave]
 ---- Wait until slave stops with an error ----
 include/wait_for_slave_sql_error.inc [errno=1062]
-Last_SQL_Error = Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos 347 (expected "duplicate key" error)
+Last_SQL_Error = Could not execute Write_rows_v1 event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos 352 (expected "duplicate key" error)
 SELECT * FROM t1;
 a
 1
@@ -50,7 +50,7 @@ a
 ---- Wait until slave stops with an error ----
 include/wait_for_slave_sql_error.inc [errno=1032]
 Last_SQL_Error (expected "duplicate key" error)
-Could not execute Delete_rows event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master-bin.000001, end_log_pos END_LOG_POS
+Could not execute Delete_rows_v1 event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master-bin.000001, end_log_pos END_LOG_POS
 SELECT * FROM t1;
 a
 ---- Resolve the conflict on the slave and restart SQL thread ----

=== modified file 'mysql-test/suite/rpl/r/rpl_row_log.result'
--- a/mysql-test/suite/rpl/r/rpl_row_log.result	2011-04-08 11:06:53 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_log.result	2011-09-20 12:32:59 +0000
@@ -17,13 +17,13 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; drop table t1
 master-bin.000001	#	Query	#	#	use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 show binlog events from <binlog_start> limit 1;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
@@ -189,13 +189,13 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; drop table t1
 master-bin.000001	#	Query	#	#	use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Rotate	#	#	master-bin.000002;pos=4
 show binlog events in 'master-bin.000002' from <binlog_start>;
@@ -204,7 +204,7 @@ master-bin.000002	#	Query	#	#	use `test`
 master-bin.000002	#	Query	#	#	use `test`; create table t2 (n int)ENGINE=MyISAM
 master-bin.000002	#	Query	#	#	BEGIN
 master-bin.000002	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000002	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000002	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000002	#	Query	#	#	COMMIT
 show binary logs;
 Log_name	File_size
@@ -219,13 +219,13 @@ Log_name	Pos	Event_type	Server_id	End_lo
 slave-bin.000001	#	Query	#	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
 slave-bin.000001	#	Query	#	#	BEGIN
 slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 slave-bin.000001	#	Query	#	#	COMMIT
 slave-bin.000001	#	Query	#	#	use `test`; drop table t1
 slave-bin.000001	#	Query	#	#	use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
 slave-bin.000001	#	Query	#	#	BEGIN
 slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 slave-bin.000001	#	Query	#	#	COMMIT
 slave-bin.000001	#	Query	#	#	use `test`; create table t3 (a int)ENGINE=MyISAM
 slave-bin.000001	#	Rotate	#	#	slave-bin.000002;pos=4
@@ -234,7 +234,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 slave-bin.000002	#	Query	#	#	use `test`; create table t2 (n int)ENGINE=MyISAM
 slave-bin.000002	#	Query	#	#	BEGIN
 slave-bin.000002	#	Table_map	#	#	table_id: # (test.t2)
-slave-bin.000002	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000002	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 slave-bin.000002	#	Query	#	#	COMMIT
 include/check_slave_is_running.inc
 show binlog events in 'slave-bin.000005' from 4;
@@ -252,11 +252,11 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	use `test`; create table t1(a int auto_increment primary key, b int)
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 select * from t1;
 a	b

=== modified file 'mysql-test/suite/rpl/r/rpl_row_log_innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result	2011-04-08 11:06:53 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result	2011-09-20 12:32:59 +0000
@@ -17,13 +17,13 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	use `test`; drop table t1
 master-bin.000001	#	Query	#	#	use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 show binlog events from <binlog_start> limit 1;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
@@ -189,13 +189,13 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	use `test`; drop table t1
 master-bin.000001	#	Query	#	#	use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Rotate	#	#	master-bin.000002;pos=4
 show binlog events in 'master-bin.000002' from <binlog_start>;
@@ -204,7 +204,7 @@ master-bin.000002	#	Query	#	#	use `test`
 master-bin.000002	#	Query	#	#	use `test`; create table t2 (n int)ENGINE=InnoDB
 master-bin.000002	#	Query	#	#	BEGIN
 master-bin.000002	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000002	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000002	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000002	#	Xid	#	#	COMMIT /* XID */
 show binary logs;
 Log_name	File_size
@@ -219,13 +219,13 @@ Log_name	Pos	Event_type	Server_id	End_lo
 slave-bin.000001	#	Query	#	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
 slave-bin.000001	#	Query	#	#	BEGIN
 slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 slave-bin.000001	#	Xid	#	#	COMMIT /* XID */
 slave-bin.000001	#	Query	#	#	use `test`; drop table t1
 slave-bin.000001	#	Query	#	#	use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB
 slave-bin.000001	#	Query	#	#	BEGIN
 slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 slave-bin.000001	#	Xid	#	#	COMMIT /* XID */
 slave-bin.000001	#	Query	#	#	use `test`; create table t3 (a int)ENGINE=InnoDB
 slave-bin.000001	#	Rotate	#	#	slave-bin.000002;pos=4
@@ -234,7 +234,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 slave-bin.000002	#	Query	#	#	use `test`; create table t2 (n int)ENGINE=InnoDB
 slave-bin.000002	#	Query	#	#	BEGIN
 slave-bin.000002	#	Table_map	#	#	table_id: # (test.t2)
-slave-bin.000002	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000002	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 slave-bin.000002	#	Xid	#	#	COMMIT /* XID */
 include/check_slave_is_running.inc
 show binlog events in 'slave-bin.000005' from 4;
@@ -252,11 +252,11 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	use `test`; create table t1(a int auto_increment primary key, b int)
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 select * from t1;
 a	b

=== modified file 'mysql-test/suite/rpl/r/rpl_slave_skip.result'
--- a/mysql-test/suite/rpl/r/rpl_slave_skip.result	2011-04-08 11:06:53 +0000
+++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result	2011-09-20 12:32:59 +0000
@@ -15,17 +15,17 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t2 (c INT, d INT)
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
-master-bin.000001	#	Update_rows	#	#	table_id: #
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Update_rows_v1	#	#	table_id: #
+master-bin.000001	#	Update_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 SELECT * FROM t1;
 a	b

=== modified file 'mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result'
--- a/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result	2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result	2011-09-20 12:32:59 +0000
@@ -57,7 +57,7 @@ slave-bin.000001	#	Query	#	#	use `test`;
 slave-bin.000001	#	Query	#	#	use `test`; DROP TEMPORARY TABLE IF EXISTS `t1_tmp` /* generated by server */
 slave-bin.000001	#	Query	#	#	BEGIN
 slave-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 slave-bin.000001	#	Query	#	#	COMMIT
 slave-bin.000001	#	Query	#	#	use `test`; DROP TEMPORARY TABLE IF EXISTS `t2_tmp` /* generated by server */
 slave-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (2)
@@ -81,7 +81,7 @@ master-bin.000001	#	Query	#	#	use `test`
   `rand()` double NOT NULL DEFAULT '0'
 ) ENGINE=MyISAM
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 
 # Case 2: DROP TEMPORARY TABLE in a transacation(happens only on 5.5+)
@@ -100,7 +100,7 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES(1)
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 # Compare the base table.
 include/diff_tables.inc [master:t1, slave:t1]

=== modified file 'mysql-test/suite/rpl/t/rpl_extra_row_data.test'
--- a/mysql-test/suite/rpl/t/rpl_extra_row_data.test	2011-09-07 22:50:01 +0000
+++ b/mysql-test/suite/rpl/t/rpl_extra_row_data.test	2011-09-20 12:32:59 +0000
@@ -1,6 +1,7 @@
 --source include/master-slave.inc
 --source include/have_debug.inc
 --source include/have_binlog_format_row.inc
+--source include/have_binlog_row_v2.inc
 
 #
 # Test Binlog row extra data added as part of WL5353

=== modified file 'mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt'
--- a/mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt	2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt	2011-09-20 12:32:59 +0000
@@ -1 +1,2 @@
 --loose-debug=d,"old_row_based_repl_4_byte_map_id_master"
+--log-bin-use-v1-row-events=1

=== modified file 'mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test'
--- a/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test	2011-04-07 19:57:33 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test	2011-09-20 12:32:59 +0000
@@ -1,7 +1,7 @@
 # depends on the binlog output
 -- source include/have_binlog_format_row.inc
 
-let $rename_event_pos= 898;
+let $rename_event_pos= 903;
 
 # Bug#18326: Do not lock table for writing during prepare of statement
 # The use of the ps protocol causes extra table maps in the binlog, so

=== modified file 'mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test'
--- a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test	2011-04-07 19:57:33 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test	2011-09-20 12:32:59 +0000
@@ -164,13 +164,13 @@ remove_file $MYSQLTEST_VARDIR/tmp/master
 
 
 # this test for position option
-# By setting this position to 416, we should only get the create of t3
+# By setting this position to 422, we should only get the create of t3
 --disable_query_log
 select "--- Test 2 position test --" as "";
 --enable_query_log
 let $MYSQLD_DATADIR= `select @@datadir;`;
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=417 --stop-position=570 $MYSQLD_DATADIR/master-bin.000001
+--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=422 --stop-position=575 $MYSQLD_DATADIR/master-bin.000001
 
 # These are tests for remote binlog.
 # They should return the same as previous test.
@@ -181,7 +181,7 @@ select "--- Test 3 First Remote test --"
 
 # This is broken now
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=569 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
+--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=575 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
 
 # This part is disabled due to bug #17654
 
@@ -257,7 +257,7 @@ connection master;
 select "--- Test 5 LOAD DATA --" as "";
 --enable_query_log
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=106 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002
+--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=112 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002
 
 # Bug#7853 (mysqlbinlog does not accept input from stdin)
 
@@ -266,13 +266,13 @@ select "--- Test 6 reading stdin --" as
 --enable_query_log
 let $MYSQLD_DATADIR= `select @@datadir;`;
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---exec $MYSQL_BINLOG --short-form --stop-position=569 - < $MYSQLD_DATADIR/master-bin.000001
+--exec $MYSQL_BINLOG --short-form --stop-position=575 - < $MYSQLD_DATADIR/master-bin.000001
 
 --disable_query_log
 select "--- Test 7 reading stdin w/position --" as "";
 --enable_query_log
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---exec $MYSQL_BINLOG --short-form --position=417 --stop-position=570 - < $MYSQLD_DATADIR/master-bin.000001
+--exec $MYSQL_BINLOG --short-form --position=422 --stop-position=575 - < $MYSQLD_DATADIR/master-bin.000001
 
 # Bug#16217 (mysql client did not know how not switch its internal charset)
 --disable_query_log

=== modified file 'mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test'
--- a/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test	2011-04-07 19:57:33 +0000
+++ b/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test	2011-09-20 12:32:59 +0000
@@ -1,5 +1,5 @@
 # depends on the binlog output
 --source include/have_binlog_format_mixed_or_statement.inc
 
-let $rename_event_pos= 657;
+let $rename_event_pos= 662;
 -- source extra/rpl_tests/rpl_flsh_tbls.test

=== modified file 'mysql-test/t/ctype_cp932_binlog_stm.test'
--- a/mysql-test/t/ctype_cp932_binlog_stm.test	2011-06-29 07:47:26 +0000
+++ b/mysql-test/t/ctype_cp932_binlog_stm.test	2011-09-20 12:32:59 +0000
@@ -30,7 +30,7 @@ delimiter ;|
 
 #
 # #28436: Incorrect position in SHOW BINLOG EVENTS causes server coredump 
-# Note: 365 (depends on FD event size changes) is a magic position (found experimentally, depends on  
+# Note: 370 (depends on FD event size changes) is a magic position (found experimentally, depends on
 # the log's contents) that caused the server crash.
 
 -- disable_query_log
@@ -38,7 +38,7 @@ call mtr.add_suppression("Error in Log_e
 -- enable_query_log
 
 --error 1220
-SHOW BINLOG EVENTS FROM 365;
+SHOW BINLOG EVENTS FROM 370;
 
 --echo Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment.
 CREATE TABLE t1 (a varchar(16)) character set cp932;

=== modified file 'mysql-test/t/mysqlbinlog2.test'
--- a/mysql-test/t/mysqlbinlog2.test	2009-02-03 13:35:56 +0000
+++ b/mysql-test/t/mysqlbinlog2.test	2011-09-20 12:32:59 +0000
@@ -50,15 +50,15 @@ select "--- offset --" as "";
 --disable_query_log
 select "--- start-position --" as "";
 --enable_query_log
---exec $MYSQL_BINLOG --short-form --start-position=609 $MYSQLD_DATADIR/master-bin.000001 
+--exec $MYSQL_BINLOG --short-form --start-position=614 $MYSQLD_DATADIR/master-bin.000001
 --disable_query_log
 select "--- stop-position --" as "";
 --enable_query_log
---exec $MYSQL_BINLOG --short-form --stop-position=609 $MYSQLD_DATADIR/master-bin.000001 
+--exec $MYSQL_BINLOG --short-form --stop-position=614 $MYSQLD_DATADIR/master-bin.000001
 --disable_query_log
 select "--- start and stop positions ---" as "";
 --enable_query_log
---exec $MYSQL_BINLOG --short-form --start-position=609 --stop-position 726 $MYSQLD_DATADIR/master-bin.000001 
+--exec $MYSQL_BINLOG --short-form --start-position=614 --stop-position 731 $MYSQLD_DATADIR/master-bin.000001
 --disable_query_log
 select "--- start-datetime --" as "";
 --enable_query_log
@@ -84,7 +84,7 @@ select "--- offset --" as "";
 --disable_query_log
 select "--- start-position --" as "";
 --enable_query_log
---exec $MYSQL_BINLOG --short-form --start-position=609 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002
+--exec $MYSQL_BINLOG --short-form --start-position=614 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002
 --disable_query_log
 select "--- stop-position --" as "";
 --enable_query_log
@@ -111,15 +111,15 @@ select "--- offset --" as "";
 --disable_query_log
 select "--- start-position --" as "";
 --enable_query_log
---exec $MYSQL_BINLOG --short-form --start-position=609 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 
+--exec $MYSQL_BINLOG --short-form --start-position=614 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
 --disable_query_log
 select "--- stop-position --" as "";
 --enable_query_log
---exec $MYSQL_BINLOG --short-form --stop-position=609 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 
+--exec $MYSQL_BINLOG --short-form --stop-position=614 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
 --disable_query_log
 select "--- start and stop positions ---" as "";
 --enable_query_log
---exec $MYSQL_BINLOG --short-form --start-position=609 --stop-position 726 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
+--exec $MYSQL_BINLOG --short-form --start-position=614 --stop-position 731 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
 --disable_query_log
 select "--- start-datetime --" as "";
 --enable_query_log
@@ -142,7 +142,7 @@ select "--- offset --" as "";
 --disable_query_log
 select "--- start-position --" as "";
 --enable_query_log
---exec $MYSQL_BINLOG --short-form --start-position=609 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001  master-bin.000002
+--exec $MYSQL_BINLOG --short-form --start-position=614 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001  master-bin.000002
 --disable_query_log
 select "--- stop-position --" as "";
 --enable_query_log

=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc	2011-09-07 22:50:01 +0000
+++ b/sql/ha_ndbcluster_binlog.cc	2011-09-20 12:32:59 +0000
@@ -48,6 +48,7 @@ extern my_bool opt_ndb_log_apply_status;
 extern ulong opt_ndb_extra_logging;
 extern st_ndb_slave_state g_ndb_slave_state;
 extern my_bool opt_ndb_log_transaction_id;
+extern my_bool log_bin_use_v1_row_events;
 
 bool ndb_log_empty_epochs(void);
 
@@ -3640,6 +3641,17 @@ int ndbcluster_binlog_start()
     DBUG_RETURN(-1);
   }
 
+  /*
+     Check that v2 events are enabled if log-transaction-id is set
+  */
+  if (opt_ndb_log_transaction_id &&
+      log_bin_use_v1_row_events)
+  {
+    sql_print_error("NDB: --ndb-log-transaction-id requires v2 Binlog row events "
+                    "but server is using v1.");
+    DBUG_RETURN(-1);
+  }
+
   pthread_mutex_init(&injector_mutex, MY_MUTEX_INIT_FAST);
   pthread_cond_init(&injector_cond, NULL);
   pthread_mutex_init(&ndb_schema_share_mutex, MY_MUTEX_INIT_FAST);
@@ -6297,11 +6309,12 @@ ndb_binlog_thread_handle_data_event(THD*
      Get NdbApi transaction id for this event to put into Binlog
   */
   Ndb_binlog_extra_row_info extra_row_info;
+  const uchar* extra_row_info_ptr = NULL;
   if (opt_ndb_log_transaction_id)
   {
     extra_row_info.setFlags(Ndb_binlog_extra_row_info::NDB_ERIF_TRANSID);
     extra_row_info.setTransactionId(pOp->getTransId());
-    thd->binlog_row_event_extra_data = extra_row_info.generateBuffer();
+    extra_row_info_ptr = extra_row_info.generateBuffer();
   }
 
   DBUG_ASSERT(trans.good());
@@ -6359,7 +6372,8 @@ ndb_binlog_thread_handle_data_event(THD*
       ndb_unpack_record(table, event_data->ndb_value[0], &b, table->record[0]);
       ret = trans.write_row(logged_server_id,
                             injector::transaction::table(table, true),
-                            &b, n_fields, table->record[0]);
+                            &b, n_fields, table->record[0],
+                            extra_row_info_ptr);
       assert(ret == 0);
     }
     break;
@@ -6403,7 +6417,8 @@ ndb_binlog_thread_handle_data_event(THD*
       DBUG_EXECUTE("info", print_records(table, table->record[n]););
       ret = trans.delete_row(logged_server_id,
                              injector::transaction::table(table, true),
-                             &b, n_fields, table->record[n]);
+                             &b, n_fields, table->record[n],
+                             extra_row_info_ptr);
       assert(ret == 0);
     }
     break;
@@ -6438,7 +6453,8 @@ ndb_binlog_thread_handle_data_event(THD*
         */
         ret = trans.write_row(logged_server_id,
                               injector::transaction::table(table, true),
-                              &b, n_fields, table->record[0]);// after values
+                              &b, n_fields, table->record[0],// after values
+                              extra_row_info_ptr);
         assert(ret == 0);
       }
       else
@@ -6462,7 +6478,8 @@ ndb_binlog_thread_handle_data_event(THD*
                                injector::transaction::table(table, true),
                                &b, n_fields,
                                table->record[1], // before values
-                               table->record[0]);// after values
+                               table->record[0], // after values
+                               extra_row_info_ptr);
         assert(ret == 0);
       }
     }
@@ -6473,11 +6490,6 @@ ndb_binlog_thread_handle_data_event(THD*
     break;
   }
 
-  if (opt_ndb_log_transaction_id)
-  {
-    thd->binlog_row_event_extra_data = NULL;
-  }
-
   if (share->flags & NSF_BLOB_FLAG)
   {
     my_free(blobs_buffer[0], MYF(MY_ALLOW_ZERO_PTR));

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2011-09-07 22:50:01 +0000
+++ b/sql/log_event.cc	2011-09-20 12:32:59 +0000
@@ -44,7 +44,6 @@
 
 #define FLAGSTR(V,F) ((V)&(F)?#F" ":"")
 
-
 /*
   Size of buffer for printing a double in format %.<PREC>g
 
@@ -645,12 +644,23 @@ const char* Log_event::get_type_str(Log_
   case PRE_GA_WRITE_ROWS_EVENT: return "Write_rows_event_old";
   case PRE_GA_UPDATE_ROWS_EVENT: return "Update_rows_event_old";
   case PRE_GA_DELETE_ROWS_EVENT: return "Delete_rows_event_old";
+#ifndef MCP_WL5353
+  case WRITE_ROWS_EVENT_V1: return "Write_rows_v1";
+  case UPDATE_ROWS_EVENT_V1: return "Update_rows_v1";
+  case DELETE_ROWS_EVENT_V1: return "Delete_rows_v1";
+#else
   case WRITE_ROWS_EVENT: return "Write_rows";
   case UPDATE_ROWS_EVENT: return "Update_rows";
   case DELETE_ROWS_EVENT: return "Delete_rows";
+#endif
   case BEGIN_LOAD_QUERY_EVENT: return "Begin_load_query";
   case EXECUTE_LOAD_QUERY_EVENT: return "Execute_load_query";
   case INCIDENT_EVENT: return "Incident";
+#ifndef MCP_WL5353
+  case WRITE_ROWS_EVENT: return "Write_rows";
+  case UPDATE_ROWS_EVENT: return "Update_rows";
+  case DELETE_ROWS_EVENT: return "Delete_rows";
+#endif
   default: return "Unknown";				/* impossible */
   }
 }
@@ -1297,6 +1307,17 @@ Log_event* Log_event::read_log_event(con
     case PRE_GA_DELETE_ROWS_EVENT:
       ev = new Delete_rows_log_event_old(buf, event_len, description_event);
       break;
+#ifndef MCP_WL5353
+    case WRITE_ROWS_EVENT_V1:
+      ev = new Write_rows_log_event(buf, event_len, description_event, (Log_event_type)event_type);
+      break;
+    case UPDATE_ROWS_EVENT_V1:
+      ev = new Update_rows_log_event(buf, event_len, description_event, (Log_event_type)event_type);
+      break;
+    case DELETE_ROWS_EVENT_V1:
+      ev = new Delete_rows_log_event(buf, event_len, description_event, (Log_event_type)event_type);
+      break;
+#else
     case WRITE_ROWS_EVENT:
       ev = new Write_rows_log_event(buf, event_len, description_event);
       break;
@@ -1306,6 +1327,7 @@ Log_event* Log_event::read_log_event(con
     case DELETE_ROWS_EVENT:
       ev = new Delete_rows_log_event(buf, event_len, description_event);
       break;
+#endif
     case TABLE_MAP_EVENT:
       ev = new Table_map_log_event(buf, event_len, description_event);
       break;
@@ -1319,6 +1341,19 @@ Log_event* Log_event::read_log_event(con
     case INCIDENT_EVENT:
       ev = new Incident_log_event(buf, event_len, description_event);
       break;
+#ifndef MCP_WL5353
+#if defined(HAVE_REPLICATION)
+    case WRITE_ROWS_EVENT:
+      ev = new Write_rows_log_event(buf, event_len, description_event, (Log_event_type)event_type);
+      break;
+    case UPDATE_ROWS_EVENT:
+      ev = new Update_rows_log_event(buf, event_len, description_event, (Log_event_type)event_type);
+      break;
+    case DELETE_ROWS_EVENT:
+      ev = new Delete_rows_log_event(buf, event_len, description_event, (Log_event_type)event_type);
+      break;
+#endif
+#endif
     default:
       DBUG_PRINT("error",("Unknown event code: %d",
                           (int) buf[EVENT_TYPE_OFFSET]));
@@ -1950,9 +1985,11 @@ void Rows_log_event::print_verbose(IO_CA
   Table_map_log_event *map;
   table_def *td;
   const char *sql_command, *sql_clause1, *sql_clause2;
+#ifdef MCP_WL5353
   Log_event_type type_code= get_type_code();
-  
-#ifndef MCP_WL5353
+#else
+  Log_event_type type_code= get_general_type_code();
+
   if (m_extra_row_data)
   {
     uint8 extra_data_len= m_extra_row_data[EXTRA_ROW_INFO_LEN_OFFSET];
@@ -2076,28 +2113,59 @@ void Log_event::print_base64(IO_CACHE* f
   if (print_event_info->verbose)
   {
     Rows_log_event *ev= NULL;
+    Log_event_type et= (Log_event_type) ptr[4];
     
-    if (ptr[4] == TABLE_MAP_EVENT)
+    switch(et)
+    {
+    case TABLE_MAP_EVENT:
     {
       Table_map_log_event *map; 
       map= new Table_map_log_event((const char*) ptr, size, 
                                    glob_description_event);
       print_event_info->m_table_map.set_table(map->get_table_id(), map);
+      break;
     }
-    else if (ptr[4] == WRITE_ROWS_EVENT)
+    case WRITE_ROWS_EVENT:
+#ifndef MCP_WL5353
+    case WRITE_ROWS_EVENT_V1:
+#endif
     {
       ev= new Write_rows_log_event((const char*) ptr, size,
-                                   glob_description_event);
+                                   glob_description_event
+#ifndef MCP_WL5353
+                                   , et
+#endif
+                                   );
+      break;
     }
-    else if (ptr[4] == DELETE_ROWS_EVENT)
+    case DELETE_ROWS_EVENT:
+#ifndef MCP_WL5353
+    case DELETE_ROWS_EVENT_V1:
+#endif
     {
       ev= new Delete_rows_log_event((const char*) ptr, size,
-                                    glob_description_event);
+                                    glob_description_event
+#ifndef MCP_WL5353
+                                    , et
+#endif
+                                    );
+      break;
     }
-    else if (ptr[4] == UPDATE_ROWS_EVENT)
+    case UPDATE_ROWS_EVENT:
+#ifndef MCP_WL5353
+    case UPDATE_ROWS_EVENT_V1:
+#endif
     {
       ev= new Update_rows_log_event((const char*) ptr, size,
-                                    glob_description_event);
+                                    glob_description_event
+#ifndef MCP_WL5353
+                                    , et
+#endif
+                                    );
+      break;
+    }
+    default:
+      break;
     }
     
     if (ev)
@@ -3868,9 +3936,15 @@ Format_description_log_event(uint8 binlo
       post_header_len[PRE_GA_DELETE_ROWS_EVENT-1] = 0;
 
       post_header_len[TABLE_MAP_EVENT-1]=    TABLE_MAP_HEADER_LEN;
+#ifndef MCP_WL5353
+      post_header_len[WRITE_ROWS_EVENT_V1-1]=   ROWS_HEADER_LEN_V1;
+      post_header_len[UPDATE_ROWS_EVENT_V1-1]=  ROWS_HEADER_LEN_V1;
+      post_header_len[DELETE_ROWS_EVENT_V1-1]=  ROWS_HEADER_LEN_V1;
+#else
       post_header_len[WRITE_ROWS_EVENT-1]=   ROWS_HEADER_LEN;
       post_header_len[UPDATE_ROWS_EVENT-1]=  ROWS_HEADER_LEN;
       post_header_len[DELETE_ROWS_EVENT-1]=  ROWS_HEADER_LEN;
+#endif
       /*
         We here have the possibility to simulate a master of before we changed
         the table map id to be stored in 6 bytes: when it was stored in 4
@@ -3883,11 +3957,19 @@ Format_description_log_event(uint8 binlo
       */
       DBUG_EXECUTE_IF("old_row_based_repl_4_byte_map_id_master",
                       post_header_len[TABLE_MAP_EVENT-1]=
-                      post_header_len[WRITE_ROWS_EVENT-1]=
-                      post_header_len[UPDATE_ROWS_EVENT-1]=
-                      post_header_len[DELETE_ROWS_EVENT-1]= 6;);
+                      post_header_len[WRITE_ROWS_EVENT_V1-1]=
+                      post_header_len[UPDATE_ROWS_EVENT_V1-1]=
+                      post_header_len[DELETE_ROWS_EVENT_V1-1]= 6;);
       post_header_len[INCIDENT_EVENT-1]= INCIDENT_HEADER_LEN;
       post_header_len[HEARTBEAT_LOG_EVENT-1]= 0;
+#ifndef MCP_WL5353
+      post_header_len[IGNORABLE_LOG_EVENT-1]= 0;
+      post_header_len[ROWS_QUERY_LOG_EVENT-1]= 0;
+
+      post_header_len[WRITE_ROWS_EVENT-1]=   ROWS_HEADER_LEN_V2;
+      post_header_len[UPDATE_ROWS_EVENT-1]=  ROWS_HEADER_LEN_V2;
+      post_header_len[DELETE_ROWS_EVENT-1]=  ROWS_HEADER_LEN_V2;
+#endif
 
       // Sanity-check that all post header lengths are initialized.
       IF_DBUG({
@@ -7215,12 +7297,10 @@ static uchar dbug_extra_row_data_val= 0;
    thread data structures which can be checked
    when reading the binlog.
 
-   @param thd  Current thd
    @param arr  Buffer to use
 */
-void set_extra_data(THD* thd, uchar* arr)
+const uchar* set_extra_data(uchar* arr)
 {
-  assert(thd->binlog_row_event_extra_data == NULL);
   uchar val= (dbug_extra_row_data_val++) %
     (EXTRA_ROW_INFO_MAX_PAYLOAD + 1); /* 0 .. MAX_PAYLOAD + 1 */
   arr[EXTRA_ROW_INFO_LEN_OFFSET]= val + EXTRA_ROW_INFO_HDR_BYTES;
@@ -7228,7 +7308,7 @@ void set_extra_data(THD* thd, uchar* arr
   for (uchar i=0; i<val; i++)
     arr[EXTRA_ROW_INFO_HDR_BYTES+i]= val;
 
-  thd->binlog_row_event_extra_data= arr;
+  return arr;
 }
 
 #endif // #ifndef MYSQL_CLIENT
@@ -7266,15 +7346,20 @@ void check_extra_data(uchar* extra_row_d
 
 #ifndef MYSQL_CLIENT
 Rows_log_event::Rows_log_event(THD *thd_arg, TABLE *tbl_arg, ulong tid,
-                               MY_BITMAP const *cols, bool is_transactional)
+                               MY_BITMAP const *cols, bool is_transactional
+#ifndef MCP_WL5353
+                               ,Log_event_type event_type,
+                               const uchar* extra_row_info
+#endif
+                               )
   : Log_event(thd_arg, 0, is_transactional),
     m_row_count(0),
     m_table(tbl_arg),
     m_table_id(tid),
     m_width(tbl_arg ? tbl_arg->s->fields : 1),
-    m_rows_buf(0), m_rows_cur(0), m_rows_end(0), m_flags(0)
+    m_rows_buf(0), m_rows_cur(0), m_rows_end(0), m_flags(0),
 #ifndef MCP_WL5353
-    ,m_extra_row_data(0)
+    m_type(event_type), m_extra_row_data(0)
 #endif
 #ifdef HAVE_REPLICATION
     , m_curr_row(NULL), m_curr_row_end(NULL), m_key(NULL)
@@ -7298,27 +7383,23 @@ Rows_log_event::Rows_log_event(THD *thd_
   uchar extra_data[255];
   DBUG_EXECUTE_IF("extra_row_data_set",
                   /* Set extra row data to a known value */
-                  set_extra_data(thd_arg, extra_data););
+                  extra_row_info = set_extra_data(extra_data););
 #endif
-  if (thd_arg->binlog_row_event_extra_data)
+  if (extra_row_info)
   {
     /* Copy Extra data from thd into new event */
-    uint16 extra_data_len= thd_arg->get_binlog_row_event_extra_data_len();
+    uint8 extra_data_len= extra_row_info[EXTRA_ROW_INFO_LEN_OFFSET];
     assert(extra_data_len >= EXTRA_ROW_INFO_HDR_BYTES);
 
     m_extra_row_data= (uchar*) my_malloc(extra_data_len, MYF(MY_WME));
 
     if (likely(m_extra_row_data))
     {
-      memcpy(m_extra_row_data, thd_arg->binlog_row_event_extra_data,
+      memcpy(m_extra_row_data, extra_row_info,
              extra_data_len);
-      set_flags(EXTRA_ROW_EV_DATA_F);
     }
   }
-
-  DBUG_EXECUTE_IF("extra_row_data_set",
-                  thd_arg->binlog_row_event_extra_data = NULL;);
-#endif // #ifndef MCP_WL5353
+#endif
 
   /* if bitmap_init fails, caught in is_valid() */
   if (likely(!bitmap_init(&m_cols,
@@ -7350,9 +7431,9 @@ Rows_log_event::Rows_log_event(const cha
 #ifndef MYSQL_CLIENT
     m_table(NULL),
 #endif
-    m_table_id(0), m_rows_buf(0), m_rows_cur(0), m_rows_end(0)
+    m_table_id(0), m_rows_buf(0), m_rows_cur(0), m_rows_end(0),
 #ifndef MCP_WL5353
-    ,m_extra_row_data(0)
+    m_type(event_type), m_extra_row_data(0)
 #endif
 #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
     , m_curr_row(NULL), m_curr_row_end(NULL), m_key(NULL)
@@ -7382,34 +7463,61 @@ Rows_log_event::Rows_log_event(const cha
   }
 
   m_flags= uint2korr(post_start);
-
 #ifndef MCP_WL5353
-  uint16 extra_data_len= 0;
-  if ((m_flags & EXTRA_ROW_EV_DATA_F))
+  post_start+= 2;
+
+  uint16 var_header_len= 0;
+  if (post_header_len == ROWS_HEADER_LEN_V2)
   {
-    const uchar* extra_data_start= (const uchar*) post_start + 2;
-    extra_data_len= extra_data_start[EXTRA_ROW_INFO_LEN_OFFSET];
-    assert(m_extra_row_data == 0);
-    assert(extra_data_len >= EXTRA_ROW_INFO_HDR_BYTES);
-    DBUG_PRINT("debug", ("extra_data_len = %u",
-                         extra_data_len));
+    /*
+       Have variable length header, check length,
+       which includes length bytes
+    */
+    var_header_len= uint2korr(post_start);
+    assert(var_header_len >= 2);
+    var_header_len-= 2;
 
-    m_extra_row_data= (uchar*) my_malloc(extra_data_len,
-                                         MYF(MY_WME));
-    if (likely(m_extra_row_data))
+    /* Iterate over var-len header, extracting 'chunks' */
+    const char* start= post_start + 2;
+    const char* end= start + var_header_len;
+    for (const char* pos= start; pos < end;)
     {
-      memcpy(m_extra_row_data, extra_data_start, extra_data_len);
+      switch(*pos++)
+      {
+      case RW_V_EXTRAINFO_TAG:
+      {
+        /* Have an 'extra info' section, read it in */
+        assert((end - pos) >= EXTRA_ROW_INFO_HDR_BYTES);
+        uint8 infoLen= pos[EXTRA_ROW_INFO_LEN_OFFSET];
+        assert((end - pos) >= infoLen);
+        /* Just store/use the first tag of this type, skip others */
+        if (likely(!m_extra_row_data))
+        {
+          m_extra_row_data= (uchar*) my_malloc(infoLen,
+                                               MYF(MY_WME));
+          if (likely(m_extra_row_data))
+          {
+            memcpy(m_extra_row_data, pos, infoLen);
+          }
+          DBUG_EXECUTE_IF("extra_row_data_check",
+                          /* Check extra data has expected value */
+                          check_extra_data(m_extra_row_data););
+        }
+        pos+= infoLen;
+        break;
+      }
+      default:
+        /* Unknown code, we will not understand anything further here */
+        pos= end; /* Break loop */
+      }
     }
   }
-  DBUG_EXECUTE_IF("extra_row_data_check",
-                  /* Check extra data has expected value */
-                  check_extra_data(m_extra_row_data););
-#endif // #ifndef MCP_WL5353
+#endif
 
   uchar const *const var_start=
     (const uchar *)buf + common_header_len + post_header_len
 #ifndef MCP_WL5353
-    + extra_data_len
+    + var_header_len
 #endif
     ;
   uchar const *const ptr_width= var_start;
@@ -7438,7 +7546,12 @@ Rows_log_event::Rows_log_event(const cha
 
   m_cols_ai.bitmap= m_cols.bitmap; /* See explanation in is_valid() */
 
-  if (event_type == UPDATE_ROWS_EVENT)
+  if ((event_type == UPDATE_ROWS_EVENT)
+#ifndef MCP_WL5353
+      ||
+      (event_type == UPDATE_ROWS_EVENT_V1)
+#endif
+      )
   {
     DBUG_PRINT("debug", ("Reading from %p", ptr_after_width));
 
@@ -7498,7 +7611,11 @@ Rows_log_event::~Rows_log_event()
 
 int Rows_log_event::get_data_size()
 {
+#ifndef MCP_WL5353
+  int const type_code= get_general_type_code();
+#else
   int const type_code= get_type_code();
+#endif
 
   uchar buf[sizeof(m_width) + 1];
   uchar *end= net_store_length(buf, m_width);
@@ -7507,14 +7624,26 @@ int Rows_log_event::get_data_size()
                   return 6 + no_bytes_in_map(&m_cols) + (end - buf) +
                   (type_code == UPDATE_ROWS_EVENT ? no_bytes_in_map(&m_cols_ai) : 0) +
                   (m_rows_cur - m_rows_buf););
+#ifndef MCP_WL5353
+  bool is_v2_event= get_type_code() > DELETE_ROWS_EVENT_V1;
+  int data_size= 0;
+
+  if (is_v2_event)
+  {
+    data_size= ROWS_HEADER_LEN_V2 +
+      (m_extra_row_data ?
+       RW_V_TAG_LEN + m_extra_row_data[EXTRA_ROW_INFO_LEN_OFFSET]:
+       0);
+  }
+  else
+  {
+    data_size= ROWS_HEADER_LEN_V1;
+  }
+#else
   int data_size= ROWS_HEADER_LEN;
+#endif
   data_size+= no_bytes_in_map(&m_cols);
   data_size+= (uint) (end - buf);
-#ifndef MCP_WL5353
-  data_size+= m_extra_row_data ?
-    m_extra_row_data[EXTRA_ROW_INFO_LEN_OFFSET] :
-    0;
-#endif
 
   if (type_code == UPDATE_ROWS_EVENT)
     data_size+= no_bytes_in_map(&m_cols_ai);
@@ -7667,10 +7796,10 @@ int Rows_log_event::do_apply_event(Relay
         thd->options&= ~OPTION_RELAXED_UNIQUE_CHECKS;
 
 #ifndef MCP_WL5353
-    if (get_flags(EXTRA_ROW_EV_DATA_F))
-        thd->binlog_row_event_extra_data = m_extra_row_data;
+    if (m_extra_row_data)
+      thd->binlog_row_event_extra_data = m_extra_row_data;
     else
-        thd->binlog_row_event_extra_data = NULL;
+      thd->binlog_row_event_extra_data = NULL;
 #endif
 
     /* A small test to verify that objects have consistent types */
@@ -7804,7 +7933,7 @@ int Rows_log_event::do_apply_event(Relay
       thd->options&= ~OPTION_ALLOW_BATCH;
 #endif
 #ifndef MCP_WL5353
-    if (get_flags(EXTRA_ROW_EV_DATA_F))
+    if (m_extra_row_data)
         thd->binlog_row_event_extra_data = m_extra_row_data;
     else
         thd->binlog_row_event_extra_data = NULL;
@@ -8118,32 +8247,64 @@ Rows_log_event::do_update_pos(Relay_log_
 #ifndef MYSQL_CLIENT
 bool Rows_log_event::write_data_header(IO_CACHE *file)
 {
-  uchar buf[ROWS_HEADER_LEN];	// No need to init the buffer
+#ifndef MCP_WL5353
+  uchar buf[ROWS_HEADER_LEN_V2];	// No need to init the buffer
+#else
+  uchar buf[ROWS_HEADER_LEN];
+#endif
   DBUG_ASSERT(m_table_id != ~0UL);
   DBUG_EXECUTE_IF("old_row_based_repl_4_byte_map_id_master",
                   {
+                    assert(log_bin_use_v1_row_events);
                     int4store(buf + 0, m_table_id);
                     int2store(buf + 4, m_flags);
                     return (my_b_safe_write(file, buf, 6));
                   });
   int6store(buf + RW_MAPID_OFFSET, (ulonglong)m_table_id);
   int2store(buf + RW_FLAGS_OFFSET, m_flags);
+  int rc = 0;
 #ifndef MCP_WL5353
-  int rc = my_b_safe_write(file, buf, ROWS_HEADER_LEN);
-
-  if ((rc == 0) &&
-      (m_flags & EXTRA_ROW_EV_DATA_F))
+  if (likely(!log_bin_use_v1_row_events))
   {
-    /* Write extra row data */
-    rc = my_b_safe_write(file, m_extra_row_data,
-                         m_extra_row_data[EXTRA_ROW_INFO_LEN_OFFSET]);
-  }
+    /*
+       v2 event, with variable header portion.
+       Determine length of variable header payload
+    */
+    uint16 vhlen= 2;
+    uint16 vhpayloadlen= 0;
+    uint16 extra_data_len= 0;
+    if (m_extra_row_data)
+    {
+      extra_data_len= m_extra_row_data[EXTRA_ROW_INFO_LEN_OFFSET];
+      vhpayloadlen= RW_V_TAG_LEN + extra_data_len;
+    }
 
-  /* Function returns bool, where false(0) is success :( */
-  return (rc != 0);
+    /* Var-size header len includes len itself */
+    int2store(buf + RW_VHLEN_OFFSET, vhlen + vhpayloadlen);
+    rc= my_b_safe_write(file, buf, ROWS_HEADER_LEN_V2);
+
+    /* Write var-sized payload, if any */
+    if ((vhpayloadlen > 0) &&
+        (rc == 0))
+    {
+      /* Add tag and extra row info */
+      uchar type_code= RW_V_EXTRAINFO_TAG;
+      rc= my_b_safe_write(file, &type_code, RW_V_TAG_LEN);
+      if (rc==0)
+        rc= my_b_safe_write(file, m_extra_row_data, extra_data_len);
+    }
+  }
+  else
+#endif
+    rc= my_b_safe_write(file, buf,
+#ifndef MCP_WL5353
+                        ROWS_HEADER_LEN_V1
 #else
-  return (my_b_safe_write(file, buf, ROWS_HEADER_LEN));
+                        ROWS_HEADER_LEN
 #endif
+                        );
+
+  return (rc != 0);
 }
 
 bool Rows_log_event::write_data_body(IO_CACHE*file)
@@ -8167,7 +8328,13 @@ bool Rows_log_event::write_data_body(IO_
   /*
     TODO[refactor write]: Remove the "down cast" here (and elsewhere).
    */
-  if (get_type_code() == UPDATE_ROWS_EVENT)
+  if (
+#ifndef MCP_WL5353
+      get_general_type_code()
+#else
+      get_type_code()
+#endif
+      == UPDATE_ROWS_EVENT)
   {
     DBUG_DUMP("m_cols_ai", (uchar*) m_cols_ai.bitmap,
               no_bytes_in_map(&m_cols_ai));
@@ -8702,8 +8869,19 @@ void Table_map_log_event::print(FILE *,
 Write_rows_log_event::Write_rows_log_event(THD *thd_arg, TABLE *tbl_arg,
                                            ulong tid_arg,
                                            MY_BITMAP const *cols,
-                                           bool is_transactional)
-  : Rows_log_event(thd_arg, tbl_arg, tid_arg, cols, is_transactional)
+                                           bool is_transactional
+#ifndef MCP_WL5353
+                                           ,const uchar* extra_row_info
+#endif
+                                           )
+  : Rows_log_event(thd_arg, tbl_arg, tid_arg, cols, is_transactional
+#ifndef MCP_WL5353
+                   ,log_bin_use_v1_row_events?
+                   WRITE_ROWS_EVENT_V1:
+                   WRITE_ROWS_EVENT,
+                   extra_row_info
+#endif
+                   )
 {
 }
 #endif
@@ -8714,8 +8892,18 @@ Write_rows_log_event::Write_rows_log_eve
 #ifdef HAVE_REPLICATION
 Write_rows_log_event::Write_rows_log_event(const char *buf, uint event_len,
                                            const Format_description_log_event
-                                           *description_event)
-: Rows_log_event(buf, event_len, WRITE_ROWS_EVENT, description_event)
+                                           *description_event
+#ifndef MCP_WL5353
+                                           ,Log_event_type event_type
+#endif
+                                           )
+: Rows_log_event(buf, event_len,
+#ifndef MCP_WL5353
+                 event_type,
+#else
+                 WRITE_ROW_EVENT
+#endif
+                 description_event)
 {
 }
 #endif
@@ -9573,8 +9761,19 @@ err:
 #ifndef MYSQL_CLIENT
 Delete_rows_log_event::Delete_rows_log_event(THD *thd_arg, TABLE *tbl_arg,
                                              ulong tid, MY_BITMAP const *cols,
-                                             bool is_transactional)
-  : Rows_log_event(thd_arg, tbl_arg, tid, cols, is_transactional)
+                                             bool is_transactional
+#ifndef MCP_WL5353
+                                             ,const uchar* extra_row_info
+#endif
+                                             )
+  : Rows_log_event(thd_arg, tbl_arg, tid, cols, is_transactional
+#ifndef MCP_WL5353
+                   ,log_bin_use_v1_row_events?
+                   DELETE_ROWS_EVENT_V1:
+                   DELETE_ROWS_EVENT,
+                   extra_row_info
+#endif
+                   )
 {
 }
 #endif /* #if !defined(MYSQL_CLIENT) */
@@ -9585,8 +9784,18 @@ Delete_rows_log_event::Delete_rows_log_e
 #ifdef HAVE_REPLICATION
 Delete_rows_log_event::Delete_rows_log_event(const char *buf, uint event_len,
                                              const Format_description_log_event
-                                             *description_event)
-  : Rows_log_event(buf, event_len, DELETE_ROWS_EVENT, description_event)
+                                             *description_event
+#ifndef MCP_WL5353
+                                             ,Log_event_type event_type
+#endif
+                                             )
+  : Rows_log_event(buf, event_len,
+#ifndef MCP_WL5353
+                   event_type,
+#else
+                   DELETE_ROWS_EVENT
+#endif
+                   description_event)
 {
 }
 #endif
@@ -9665,8 +9874,19 @@ Update_rows_log_event::Update_rows_log_e
                                              ulong tid,
                                              MY_BITMAP const *cols_bi,
                                              MY_BITMAP const *cols_ai,
-                                             bool is_transactional)
-: Rows_log_event(thd_arg, tbl_arg, tid, cols_bi, is_transactional)
+                                             bool is_transactional
+#ifndef MCP_WL5353
+                                             ,const uchar* extra_row_info
+#endif
+                                             )
+: Rows_log_event(thd_arg, tbl_arg, tid, cols_bi, is_transactional
+#ifndef MCP_WL5353
+                 ,log_bin_use_v1_row_events?
+                 UPDATE_ROWS_EVENT_V1:
+                 UPDATE_ROWS_EVENT,
+                 extra_row_info
+#endif
+                 )
 {
   init(cols_ai);
 }
@@ -9674,8 +9894,19 @@ Update_rows_log_event::Update_rows_log_e
 Update_rows_log_event::Update_rows_log_event(THD *thd_arg, TABLE *tbl_arg,
                                              ulong tid,
                                              MY_BITMAP const *cols,
-                                             bool is_transactional)
-: Rows_log_event(thd_arg, tbl_arg, tid, cols, is_transactional)
+                                             bool is_transactional
+#ifndef MCP_WL5353
+                                             ,const uchar* extra_row_info
+#endif
+                                             )
+: Rows_log_event(thd_arg, tbl_arg, tid, cols, is_transactional
+#ifndef MCP_WL5353
+                 ,log_bin_use_v1_row_events?
+                 UPDATE_ROWS_EVENT_V1:
+                 UPDATE_ROWS_EVENT,
+                 extra_row_info
+#endif
+                 )
 {
   init(cols);
 }
@@ -9714,8 +9945,18 @@ Update_rows_log_event::~Update_rows_log_
 Update_rows_log_event::Update_rows_log_event(const char *buf, uint event_len,
                                              const
                                              Format_description_log_event
-                                             *description_event)
-  : Rows_log_event(buf, event_len, UPDATE_ROWS_EVENT, description_event)
+                                             *description_event
+#ifndef MCP_WL5353
+                                             ,Log_event_type event_type
+#endif
+                                             )
+  : Rows_log_event(buf, event_len,
+#ifndef MCP_WL5353
+                   event_type,
+#else
+                   UPDATE_ROWS_EVENT,
+#endif
+                   description_event)
 {
 }
 #endif

=== modified file 'sql/log_event.h'
--- a/sql/log_event.h	2011-09-07 22:50:01 +0000
+++ b/sql/log_event.h	2011-09-20 12:32:59 +0000
@@ -247,12 +247,19 @@ struct sql_ex_info
 #define FORMAT_DESCRIPTION_HEADER_LEN (START_V3_HEADER_LEN+1+LOG_EVENT_TYPES)
 #define XID_HEADER_LEN         0
 #define BEGIN_LOAD_QUERY_HEADER_LEN APPEND_BLOCK_HEADER_LEN
+#ifndef MCP_WL5353
+#define ROWS_HEADER_LEN_V1     8
+#else
 #define ROWS_HEADER_LEN        8
+#endif
 #define TABLE_MAP_HEADER_LEN   8
 #define EXECUTE_LOAD_QUERY_EXTRA_HEADER_LEN (4 + 4 + 4 + 1)
 #define EXECUTE_LOAD_QUERY_HEADER_LEN  (QUERY_HEADER_LEN + EXECUTE_LOAD_QUERY_EXTRA_HEADER_LEN)
 #define INCIDENT_HEADER_LEN    2
 #define HEARTBEAT_HEADER_LEN   0
+#ifndef MCP_WL5353
+#define ROWS_HEADER_LEN_V2    10
+#endif
 /* 
   Max number of possible extra bytes in a replication event compared to a
   packet (i.e. a query) sent from client to master;
@@ -393,6 +400,11 @@ struct sql_ex_info
 /* RW = "RoWs" */
 #define RW_MAPID_OFFSET    0
 #define RW_FLAGS_OFFSET    6
+#ifndef MCP_WL5353
+#define RW_VHLEN_OFFSET    8
+#define RW_V_TAG_LEN       1
+#define RW_V_EXTRAINFO_TAG 0
+#endif
 
 /* ELQ = "Execute Load Query" */
 #define ELQ_FILE_ID_OFFSET QUERY_HEADER_LEN
@@ -591,9 +603,15 @@ enum Log_event_type
   /*
     These event numbers are used from 5.1.16 and forward
    */
+#ifndef MCP_WL5353
+  WRITE_ROWS_EVENT_V1 = 23,
+  UPDATE_ROWS_EVENT_V1 = 24,
+  DELETE_ROWS_EVENT_V1 = 25,
+#else
   WRITE_ROWS_EVENT = 23,
   UPDATE_ROWS_EVENT = 24,
   DELETE_ROWS_EVENT = 25,
+#endif
 
   /*
     Something out of the ordinary happened on the master
@@ -606,6 +624,21 @@ enum Log_event_type
   */
   HEARTBEAT_LOG_EVENT= 27,
   
+#ifndef MCP_WL5353
+  /*
+    These event numbers are used in later releases (but not here)
+  */
+  IGNORABLE_LOG_EVENT= 28,
+  ROWS_QUERY_LOG_EVENT= 29,
+
+  /*
+     These event numbers are used in MySQL Cluster 5.1-telco-*
+  */
+  WRITE_ROWS_EVENT = 30,
+  UPDATE_ROWS_EVENT = 31,
+  DELETE_ROWS_EVENT = 32,
+#endif
+
   /*
     Add new events here - right above this comment!
     Existing events (except ENUM_END_EVENT) should never change their numbers
@@ -3509,13 +3542,6 @@ public:
       values for all columns of the table.
      */
     COMPLETE_ROWS_F = (1U << 3)
-
-#ifndef MCP_WL5353
-    /**
-       Indicates that additional information was appended to the event.
-    */
-    ,EXTRA_ROW_EV_DATA_F = (1U << 4)
-#endif
   };
 
   typedef uint16 flag_set;
@@ -3532,6 +3558,11 @@ public:
   void clear_flags(flag_set flags_arg) { m_flags &= ~flags_arg; }
   flag_set get_flags(flag_set flags_arg) const { return m_flags & flags_arg; }
 
+#ifndef MCP_WL5353
+  Log_event_type get_type_code() { return m_type; } /* Specific type (_V1 etc) */
+  virtual Log_event_type get_general_type_code() = 0; /* General type */
+#endif
+
 #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
   virtual void pack_info(Protocol *protocol);
 #endif
@@ -3590,7 +3621,12 @@ protected:
   */
 #ifndef MYSQL_CLIENT
   Rows_log_event(THD*, TABLE*, ulong table_id, 
-		 MY_BITMAP const *cols, bool is_transactional);
+		 MY_BITMAP const *cols, bool is_transactional,
+                 Log_event_type event_type
+#ifndef MCP_WL5353
+                 ,const uchar* extra_row_info
+#endif
+                 );
 #endif
   Rows_log_event(const char *row_data, uint event_len, 
 		 Log_event_type event_type,
@@ -3632,6 +3668,8 @@ protected:
   flag_set m_flags;		/* Flags for row-level events */
 
 #ifndef MCP_WL5353
+  Log_event_type m_type;        /* Actual event type */
+
   uchar    *m_extra_row_data;   /* Pointer to extra row data if any */
                                 /* If non null, first byte is length */
 #endif
@@ -3739,15 +3777,26 @@ public:
   {
     /* Support interface to THD::binlog_prepare_pending_rows_event */
     TYPE_CODE = WRITE_ROWS_EVENT
+#ifndef MCP_WL5353
+    ,TYPE_CODE_V1 = WRITE_ROWS_EVENT_V1
+#endif
   };
 
 #if !defined(MYSQL_CLIENT)
   Write_rows_log_event(THD*, TABLE*, ulong table_id, 
-		       MY_BITMAP const *cols, bool is_transactional);
+		       MY_BITMAP const *cols, bool is_transactional
+#ifndef MCP_WL5353
+                       ,const uchar* extra_row_info
+#endif
+                       );
 #endif
 #ifdef HAVE_REPLICATION
   Write_rows_log_event(const char *buf, uint event_len, 
-                       const Format_description_log_event *description_event);
+                       const Format_description_log_event *description_event
+#ifndef MCP_WL5353
+                       ,Log_event_type event_type
+#endif
+                       );
 #endif
 #if !defined(MYSQL_CLIENT) 
   static bool binlog_row_logging_function(THD *thd, TABLE *table,
@@ -3759,12 +3808,20 @@ public:
                                           const uchar *after_record)
   {
     return thd->binlog_write_row(table, is_transactional,
-                                 cols, fields, after_record);
+                                 cols, fields, after_record
+#ifndef MCP_WL5353
+                                 , NULL
+#endif
+                                 );
   }
 #endif
 
 private:
+#ifndef MCP_WL5353
+  virtual Log_event_type get_general_type_code() { return (Log_event_type)TYPE_CODE; }
+#else
   virtual Log_event_type get_type_code() { return (Log_event_type)TYPE_CODE; }
+#endif
 
 #ifdef MYSQL_CLIENT
   void print(FILE *file, PRINT_EVENT_INFO *print_event_info);
@@ -3797,17 +3854,28 @@ public:
   {
     /* Support interface to THD::binlog_prepare_pending_rows_event */
     TYPE_CODE = UPDATE_ROWS_EVENT
+#ifndef MCP_WL5353
+    ,TYPE_CODE_V1 = UPDATE_ROWS_EVENT_V1
+#endif
   };
 
 #ifndef MYSQL_CLIENT
   Update_rows_log_event(THD*, TABLE*, ulong table_id,
 			MY_BITMAP const *cols_bi,
 			MY_BITMAP const *cols_ai,
-                        bool is_transactional);
+                        bool is_transactional
+#ifndef MCP_WL5353
+                        ,const uchar* extra_row_info
+#endif
+                        );
 
   Update_rows_log_event(THD*, TABLE*, ulong table_id,
 			MY_BITMAP const *cols,
-                        bool is_transactional);
+                        bool is_transactional
+#ifndef MCP_WL5353
+                        ,const uchar* extra_row_info
+#endif
+                        );
 
   void init(MY_BITMAP const *cols);
 #endif
@@ -3816,7 +3884,11 @@ public:
 
 #ifdef HAVE_REPLICATION
   Update_rows_log_event(const char *buf, uint event_len, 
-			const Format_description_log_event *description_event);
+			const Format_description_log_event *description_event
+#ifndef MCP_WL5353
+                        ,Log_event_type event_type
+#endif
+                        );
 #endif
 
 #if !defined(MYSQL_CLIENT) 
@@ -3828,7 +3900,11 @@ public:
                                           const uchar *after_record)
   {
     return thd->binlog_update_row(table, is_transactional,
-                                  cols, fields, before_record, after_record);
+                                  cols, fields, before_record, after_record
+#ifndef MCP_WL5353
+                                  , NULL
+#endif
+                                  );
   }
 #endif
 
@@ -3838,7 +3914,11 @@ public:
   }
 
 protected:
+#ifndef MCP_WL5353
+  virtual Log_event_type get_general_type_code() { return (Log_event_type)TYPE_CODE; }
+#else
   virtual Log_event_type get_type_code() { return (Log_event_type)TYPE_CODE; }
+#endif
 
 #ifdef MYSQL_CLIENT
   void print(FILE *file, PRINT_EVENT_INFO *print_event_info);
@@ -3878,15 +3958,26 @@ public:
   {
     /* Support interface to THD::binlog_prepare_pending_rows_event */
     TYPE_CODE = DELETE_ROWS_EVENT
+#ifndef MCP_WL5353
+    ,TYPE_CODE_V1 = DELETE_ROWS_EVENT_V1
+#endif
   };
 
 #ifndef MYSQL_CLIENT
   Delete_rows_log_event(THD*, TABLE*, ulong, 
-			MY_BITMAP const *cols, bool is_transactional);
+			MY_BITMAP const *cols, bool is_transactional
+#ifndef MCP_WL5353
+                        ,const uchar* extra_row_info
+#endif
+                        );
 #endif
 #ifdef HAVE_REPLICATION
   Delete_rows_log_event(const char *buf, uint event_len, 
-			const Format_description_log_event *description_event);
+			const Format_description_log_event *description_event
+#ifndef MCP_WL5353
+                        ,Log_event_type event_type
+#endif
+                        );
 #endif
 #if !defined(MYSQL_CLIENT) 
   static bool binlog_row_logging_function(THD *thd, TABLE *table,
@@ -3898,12 +3989,20 @@ public:
                                           __attribute__((unused)))
   {
     return thd->binlog_delete_row(table, is_transactional,
-                                  cols, fields, before_record);
+                                  cols, fields, before_record
+#ifndef MCP_WL5353
+                                  , NULL
+#endif
+                                  );
   }
 #endif
   
 protected:
+#ifndef MCP_WL5353
+  virtual Log_event_type get_general_type_code() { return (Log_event_type)TYPE_CODE; }
+#else
   virtual Log_event_type get_type_code() { return (Log_event_type)TYPE_CODE; }
+#endif
 
 #ifdef MYSQL_CLIENT
   void print(FILE *file, PRINT_EVENT_INFO *print_event_info);

=== modified file 'sql/log_event_old.h'
--- a/sql/log_event_old.h	2009-05-26 18:53:34 +0000
+++ b/sql/log_event_old.h	2011-09-20 12:32:59 +0000
@@ -44,6 +44,9 @@
   but we keep them this way for now.  /Sven
 */
 
+#ifndef MCP_WL5353
+#define ROWS_HEADER_LEN ROWS_HEADER_LEN_V1
+#endif
 
 /**
   @class Old_rows_log_event
@@ -377,7 +380,11 @@ public:
                                           const uchar *after_record)
   {
     return thd->binlog_write_row(table, is_transactional,
-                                 cols, fields, after_record);
+                                 cols, fields, after_record
+#ifndef MCP_WL5353
+                                 , NULL
+#endif
+                                 );
   }
 #endif
 
@@ -453,7 +460,11 @@ public:
                                           const uchar *after_record)
   {
     return thd->binlog_update_row(table, is_transactional,
-                                  cols, fields, before_record, after_record);
+                                  cols, fields, before_record, after_record
+#ifndef MCP_WL5353
+                                  , NULL
+#endif
+                                  );
   }
 #endif
 
@@ -528,7 +539,11 @@ public:
                                           __attribute__((unused)))
   {
     return thd->binlog_delete_row(table, is_transactional,
-                                  cols, fields, before_record);
+                                  cols, fields, before_record
+#ifndef MCP_WL5353
+                                  , NULL
+#endif
+                                  );
   }
 #endif
   

=== modified file 'sql/mysql_priv.h'
--- a/sql/mysql_priv.h	2011-06-30 15:59:25 +0000
+++ b/sql/mysql_priv.h	2011-09-20 12:32:59 +0000
@@ -1965,6 +1965,9 @@ extern my_bool slave_allow_batching;
 #endif
 extern ulong slave_net_timeout, slave_trans_retries;
 extern uint max_user_connections;
+#ifndef MCP_WL5353
+extern my_bool log_bin_use_v1_row_events;
+#endif
 extern ulong what_to_log,flush_time;
 extern ulong query_buff_size;
 extern ulong max_prepared_stmt_count, prepared_stmt_count;

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2011-06-30 15:59:25 +0000
+++ b/sql/mysqld.cc	2011-09-20 12:32:59 +0000
@@ -561,6 +561,9 @@ ulong specialflag=0;
 ulong binlog_cache_use= 0, binlog_cache_disk_use= 0;
 ulong max_connections, max_connect_errors;
 uint  max_user_connections= 0;
+#ifndef MCP_WL5353
+my_bool log_bin_use_v1_row_events= 0;
+#endif
 /**
   Limit of the total number of prepared statements in the server.
   Is necessary to protect the server against out-of-memory attacks.
@@ -5852,6 +5855,9 @@ enum options_mysqld
   OPT_IGNORE_BUILTIN_INNODB,
   OPT_BINLOG_DIRECT_NON_TRANS_UPDATE,
   OPT_DEFAULT_CHARACTER_SET_OLD
+#ifndef MCP_WL5353
+  ,OPT_LOG_BIN_USE_V1_ROW_EVENTS
+#endif
 };
 
 
@@ -6134,6 +6140,15 @@ each time the SQL thread starts.",
    "break, so you can safely set this to 1."
    ,&trust_function_creators, &trust_function_creators, 0,
    GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+#ifndef MCP_WL5353
+  {"log-bin-use-v1-row-events", OPT_LOG_BIN_USE_V1_ROW_EVENTS,
+   "If equal to 1 then version 1 row events are written to a row based "
+   "binary log.  If equal to 0, then the latest version of events are "
+   "written.  "
+   "This option is useful during some upgrades.",
+   &log_bin_use_v1_row_events, &log_bin_use_v1_row_events, 0,
+   GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
+#endif
   {"log-error", OPT_ERROR_LOG_FILE, "Error log file.",
    &log_error_file_ptr, &log_error_file_ptr, 0, GET_STR,
    OPT_ARG, 0, 0, 0, 0, 0, 0},

=== modified file 'sql/rpl_constants.h'
--- a/sql/rpl_constants.h	2011-09-07 22:50:01 +0000
+++ b/sql/rpl_constants.h	2011-09-20 12:32:59 +0000
@@ -71,6 +71,6 @@ enum ExtraRowInfoFormat {
 #define EXTRA_ROW_INFO_HDR_BYTES 2
 #define EXTRA_ROW_INFO_MAX_PAYLOAD (255 - EXTRA_ROW_INFO_HDR_BYTES)
 
-#endif   // #ifndef MCP_WL5353
+#endif
 
 #endif /* RPL_CONSTANTS_H */

=== modified file 'sql/rpl_injector.cc'
--- a/sql/rpl_injector.cc	2011-06-30 15:59:25 +0000
+++ b/sql/rpl_injector.cc	2011-09-20 12:32:59 +0000
@@ -122,7 +122,11 @@ int injector::transaction::use_table(ser
 
 int injector::transaction::write_row (server_id_type sid, table tbl, 
 				      MY_BITMAP const* cols, size_t colcnt,
-				      record_type record)
+				      record_type record
+#ifndef MCP_WL5353
+                                      ,const uchar* extra_row_info
+#endif
+                                      )
 {
    DBUG_ENTER("injector::transaction::write_row(...)");
  
@@ -133,15 +137,31 @@ int injector::transaction::write_row (se
    server_id_type save_id= m_thd->server_id;
    m_thd->set_server_id(sid);
    error= m_thd->binlog_write_row(tbl.get_table(), tbl.is_transactional(), 
-                                  cols, colcnt, record);
+                                  cols, colcnt, record
+#ifndef MCP_WL5353
+                                  , extra_row_info
+#endif
+                                  );
    m_thd->set_server_id(save_id);
    DBUG_RETURN(error);
 }
 
+#ifndef MCP_WL5353
+int injector::transaction::write_row (server_id_type sid, table tbl,
+				      MY_BITMAP const* cols, size_t colcnt,
+				      record_type record)
+{
+  return write_row(sid, tbl, cols, colcnt, record, NULL);
+}
+#endif
 
 int injector::transaction::delete_row(server_id_type sid, table tbl,
 				      MY_BITMAP const* cols, size_t colcnt,
-				      record_type record)
+				      record_type record
+#ifndef MCP_WL5353
+                                      ,const uchar* extra_row_info
+#endif
+                                      )
 {
    DBUG_ENTER("injector::transaction::delete_row(...)");
 
@@ -152,15 +172,31 @@ int injector::transaction::delete_row(se
    server_id_type save_id= m_thd->server_id;
    m_thd->set_server_id(sid);
    error= m_thd->binlog_delete_row(tbl.get_table(), tbl.is_transactional(), 
-                                   cols, colcnt, record);
+                                   cols, colcnt, record
+#ifndef MCP_WL5353
+                                   , extra_row_info
+#endif
+                                   );
    m_thd->set_server_id(save_id);
    DBUG_RETURN(error);
 }
 
+#ifndef MCP_WL5353
+int injector::transaction::delete_row(server_id_type sid, table tbl,
+				      MY_BITMAP const* cols, size_t colcnt,
+				      record_type record)
+{
+  return delete_row(sid, tbl, cols, colcnt, record, NULL);
+}
+#endif
 
 int injector::transaction::update_row(server_id_type sid, table tbl, 
 				      MY_BITMAP const* cols, size_t colcnt,
-				      record_type before, record_type after)
+				      record_type before, record_type after
+#ifndef MCP_WL5353
+                                      ,const uchar* extra_row_info
+#endif
+                                      )
 {
    DBUG_ENTER("injector::transaction::update_row(...)");
 
@@ -171,11 +207,23 @@ int injector::transaction::update_row(se
    server_id_type save_id= m_thd->server_id;
    m_thd->set_server_id(sid);
    error= m_thd->binlog_update_row(tbl.get_table(), tbl.is_transactional(),
-                                   cols, colcnt, before, after);
+                                   cols, colcnt, before, after
+#ifndef MCP_WL5353
+                                   , extra_row_info
+#endif
+                                   );
    m_thd->set_server_id(save_id);
    DBUG_RETURN(error);
 }
 
+#ifndef MCP_WL5353
+int injector::transaction::update_row(server_id_type sid, table tbl,
+				      MY_BITMAP const* cols, size_t colcnt,
+				      record_type before, record_type after)
+{
+  return update_row(sid, tbl, cols, colcnt, before, after, NULL);
+}
+#endif
 
 injector::transaction::binlog_pos injector::transaction::start_pos() const
 {

=== modified file 'sql/rpl_injector.h'
--- a/sql/rpl_injector.h	2011-06-30 15:59:25 +0000
+++ b/sql/rpl_injector.h	2011-09-20 12:32:59 +0000
@@ -188,6 +188,12 @@ public:
       /*
         Add a 'write row' entry to the transaction.
       */
+#ifndef MCP_WL5353
+      int write_row (server_id_type sid, table tbl,
+                     MY_BITMAP const *cols, size_t colcnt,
+                     record_type record,
+                     const uchar* extra_row_info);
+#endif
       int write_row (server_id_type sid, table tbl, 
                      MY_BITMAP const *cols, size_t colcnt,
                      record_type record);
@@ -195,17 +201,28 @@ public:
       /*
         Add a 'delete row' entry to the transaction.
       */
+#ifndef MCP_WL5353
       int delete_row(server_id_type sid, table tbl, 
                      MY_BITMAP const *cols, size_t colcnt,
+                     record_type record,
+                     const uchar* extra_row_info);
+#endif
+      int delete_row(server_id_type sid, table tbl,
+                     MY_BITMAP const *cols, size_t colcnt,
                      record_type record);
 
       /*
         Add an 'update row' entry to the transaction.
       */
+#ifndef MCP_WL5353
       int update_row(server_id_type sid, table tbl, 
                      MY_BITMAP const *cols, size_t colcnt,
+                     record_type before, record_type after,
+                     const uchar* extra_row_info);
+#endif
+      int update_row(server_id_type sid, table tbl,
+                     MY_BITMAP const *cols, size_t colcnt,
                      record_type before, record_type after);
-
       /*
         Commit a transaction.
 

=== modified file 'sql/set_var.cc'
--- a/sql/set_var.cc	2011-06-30 15:59:25 +0000
+++ b/sql/set_var.cc	2011-09-20 12:32:59 +0000
@@ -354,6 +354,11 @@ sys_trust_routine_creators(&vars, "log_b
 static sys_var_bool_ptr       
 sys_trust_function_creators(&vars, "log_bin_trust_function_creators",
                             &trust_function_creators);
+#ifndef MCP_WL5353
+static sys_var_const    sys_log_bin_use_v1_row_events(&vars, "log_bin_use_v1_row_events",
+                                                      OPT_GLOBAL, SHOW_MY_BOOL,
+                                                      (uchar*) &log_bin_use_v1_row_events);
+#endif
 static sys_var_const    sys_log_error(&vars, "log_error",
                                       OPT_GLOBAL, SHOW_CHAR,
                                       (uchar*) log_error_file);

=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	2011-09-07 22:50:01 +0000
+++ b/sql/sql_class.cc	2011-09-20 12:32:59 +0000
@@ -3515,7 +3515,11 @@ THD::binlog_prepare_pending_rows_event(T
                                        size_t colcnt,
                                        size_t needed,
                                        bool is_transactional,
-				       RowsEventT *hint __attribute__((unused)))
+				       RowsEventT *hint __attribute__((unused))
+#ifndef MCP_WL5353
+                                       ,const uchar* extra_row_info
+#endif
+                                       )
 {
   DBUG_ENTER("binlog_prepare_pending_rows_event");
   /* Pre-conditions */
@@ -3549,21 +3553,24 @@ THD::binlog_prepare_pending_rows_event(T
   if (!pending ||
       pending->server_id != serv_id || 
       pending->get_table_id() != table->s->table_map_id ||
-      pending->get_type_code() != type_code || 
+      pending->get_general_type_code() != type_code ||
       pending->get_data_size() + needed > opt_binlog_rows_event_max_size || 
       pending->get_width() != colcnt ||
       !bitmap_cmp(pending->get_cols(), cols)
 #ifndef MCP_WL5353
       ||
       !binlog_row_event_extra_data_eq(pending->get_extra_row_data(),
-                                      binlog_row_event_extra_data)
+                                      extra_row_info)
 #endif
       )
   {
     /* Create a new RowsEventT... */
     Rows_log_event* const
-	ev= new RowsEventT(this, table, table->s->table_map_id, cols,
-                           is_transactional);
+        ev= new RowsEventT(this, table, table->s->table_map_id, cols, is_transactional
+#ifndef MCP_WL5353
+                           , extra_row_info
+#endif
+                           );
     if (unlikely(!ev))
       DBUG_RETURN(NULL);
     ev->server_id= serv_id; // I don't like this, it's too easy to forget.
@@ -3590,17 +3597,29 @@ THD::binlog_prepare_pending_rows_event(T
 template Rows_log_event*
 THD::binlog_prepare_pending_rows_event(TABLE*, uint32, MY_BITMAP const*,
 				       size_t, size_t, bool,
-				       Write_rows_log_event*);
+				       Write_rows_log_event*
+#ifndef MCP_WL5353
+                                       ,const uchar*
+#endif
+                                       );
 
 template Rows_log_event*
 THD::binlog_prepare_pending_rows_event(TABLE*, uint32, MY_BITMAP const*,
 				       size_t colcnt, size_t, bool,
-				       Delete_rows_log_event *);
+				       Delete_rows_log_event *
+#ifndef MCP_WL5353
+                                       ,const uchar*
+#endif
+                                       );
 
 template Rows_log_event* 
 THD::binlog_prepare_pending_rows_event(TABLE*, uint32, MY_BITMAP const*,
 				       size_t colcnt, size_t, bool,
-				       Update_rows_log_event *);
+				       Update_rows_log_event *
+#ifndef MCP_WL5353
+                                       ,const uchar*
+#endif
+                                       );
 #endif
 
 #ifdef NOT_USED
@@ -3792,7 +3811,11 @@ namespace {
 
 int THD::binlog_write_row(TABLE* table, bool is_trans, 
                           MY_BITMAP const* cols, size_t colcnt, 
-                          uchar const *record) 
+                          uchar const *record
+#ifndef MCP_WL5353
+                          ,const uchar* extra_row_info
+#endif
+                          )
 { 
   DBUG_ASSERT(current_stmt_binlog_row_based && mysql_bin_log.is_open());
 
@@ -3811,7 +3834,11 @@ int THD::binlog_write_row(TABLE* table,
   Rows_log_event* const ev=
     binlog_prepare_pending_rows_event(table, server_id, cols, colcnt,
                                       len, is_trans,
-                                      static_cast<Write_rows_log_event*>(0));
+                                      static_cast<Write_rows_log_event*>(0)
+#ifndef MCP_WL5353
+                                      ,extra_row_info
+#endif
+                                      );
 
   if (unlikely(ev == 0))
     return HA_ERR_OUT_OF_MEM;
@@ -3822,7 +3849,11 @@ int THD::binlog_write_row(TABLE* table,
 int THD::binlog_update_row(TABLE* table, bool is_trans,
                            MY_BITMAP const* cols, size_t colcnt,
                            const uchar *before_record,
-                           const uchar *after_record)
+                           const uchar *after_record
+#ifndef MCP_WL5353
+                           ,const uchar *extra_row_info
+#endif
+                           )
 { 
   DBUG_ASSERT(current_stmt_binlog_row_based && mysql_bin_log.is_open());
 
@@ -3855,7 +3886,11 @@ int THD::binlog_update_row(TABLE* table,
   Rows_log_event* const ev=
     binlog_prepare_pending_rows_event(table, server_id, cols, colcnt,
 				      before_size + after_size, is_trans,
-				      static_cast<Update_rows_log_event*>(0));
+				      static_cast<Update_rows_log_event*>(0)
+#ifndef MCP_WL5353
+                                      ,extra_row_info
+#endif
+                                      );
 
   if (unlikely(ev == 0))
     return HA_ERR_OUT_OF_MEM;
@@ -3867,7 +3902,11 @@ int THD::binlog_update_row(TABLE* table,
 
 int THD::binlog_delete_row(TABLE* table, bool is_trans, 
                            MY_BITMAP const* cols, size_t colcnt,
-                           uchar const *record)
+                           uchar const *record
+#ifndef MCP_WL5353
+                           ,const uchar* extra_row_info
+#endif
+                           )
 { 
   DBUG_ASSERT(current_stmt_binlog_row_based && mysql_bin_log.is_open());
 
@@ -3886,7 +3925,11 @@ int THD::binlog_delete_row(TABLE* table,
   Rows_log_event* const ev=
     binlog_prepare_pending_rows_event(table, server_id, cols, colcnt,
 				      len, is_trans,
-				      static_cast<Delete_rows_log_event*>(0));
+				      static_cast<Delete_rows_log_event*>(0)
+#ifndef MCP_WL5353
+                                      ,extra_row_info
+#endif
+                                      );
 
   if (unlikely(ev == 0))
     return HA_ERR_OUT_OF_MEM;
@@ -4079,29 +4122,6 @@ int THD::binlog_query(THD::enum_binlog_q
 
 #ifndef MCP_WL5353
 /**
-   get_binlog_row_event_extra_data_len
-
-   Returns the length in bytes of the current thread's
-   binlog row event extra data, if present.
-   The length is stored at some offset from the extra
-   data ptr.
-   Note that this length is the length of the whole extra
-   data structure, including the fixed length header
-   of size EXTRA_ROW_INFO_HDR_BYTES
-
-   @return
-     Length in bytes of the extra data.
-     Zero is valid.  Maximum is 255
-*/
-uint8
-THD::get_binlog_row_event_extra_data_len() const
-{
-  return (binlog_row_event_extra_data?
-          binlog_row_event_extra_data[EXTRA_ROW_INFO_LEN_OFFSET]:
-          0);
-};
-
-/**
    binlog_row_event_extra_data_eq
 
    Comparator for two binlog row event extra data
@@ -4132,8 +4152,7 @@ THD::binlog_row_event_extra_data_eq(cons
            (memcmp(a, b,
                    a[EXTRA_ROW_INFO_LEN_OFFSET]) == 0)));
 }
-
-#endif  // #ifndef MCP_WL5353
+#endif
 
 bool Discrete_intervals_list::append(ulonglong start, ulonglong val,
                                  ulonglong incr)

=== modified file 'sql/sql_class.h'
--- a/sql/sql_class.h	2011-09-07 22:50:01 +0000
+++ b/sql/sql_class.h	2011-09-20 12:32:59 +0000
@@ -1442,7 +1442,6 @@ public:
 
    */
   uchar* binlog_row_event_extra_data;
-  uint8  get_binlog_row_event_extra_data_len() const;
   static bool binlog_row_event_extra_data_eq(const uchar* a,
                                              const uchar* b);
 #endif
@@ -1458,13 +1457,25 @@ public:
   int binlog_write_table_map(TABLE *table, bool is_transactional);
   int binlog_write_row(TABLE* table, bool is_transactional,
                        MY_BITMAP const* cols, size_t colcnt,
-                       const uchar *buf);
+                       const uchar *buf
+#ifndef MCP_WL5353
+                       ,const uchar* extra_row_info
+#endif
+                       );
   int binlog_delete_row(TABLE* table, bool is_transactional,
                         MY_BITMAP const* cols, size_t colcnt,
-                        const uchar *buf);
+                        const uchar *buf
+#ifndef MCP_WL5353
+                        ,const uchar* extra_row_info
+#endif
+                        );
   int binlog_update_row(TABLE* table, bool is_transactional,
                         MY_BITMAP const* cols, size_t colcnt,
-                        const uchar *old_data, const uchar *new_data);
+                        const uchar *old_data, const uchar *new_data
+#ifndef MCP_WL5353
+                        ,const uchar* extra_row_info
+#endif
+                        );
 
   void set_server_id(uint32 sid) { server_id = sid; }
 
@@ -1477,7 +1488,11 @@ public:
                                       size_t colcnt,
                                       size_t needed,
                                       bool is_transactional,
-				      RowsEventT* hint);
+				      RowsEventT* hint
+#ifndef MCP_WL5353
+                                      ,const uchar* extra_row_info
+#endif
+                                      );
   Rows_log_event* binlog_get_pending_rows_event() const;
   void            binlog_set_pending_rows_event(Rows_log_event* ev);
   int binlog_flush_pending_rows_event(bool stmt_end);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (frazer.clement:4535 to 4536) Frazer Clement20 Sep