1CREATE TABLE t1 (i int unique) ENGINE=innodb; 2reset master; 3begin; 4insert into t1 values (1),(2); 5*** the following UPDATE query wont generate any updates for the binlog *** 6update t1 set i = 3 where i < 3; 7ERROR 23000: Duplicate entry '3' for key 'i' 8commit; 9*** Results of the test: the binlog must have only Write_rows events not any Update_rows *** 10include/show_binlog_events.inc 11Log_name Pos Event_type Server_id End_log_pos Info 12master-bin.000001 # Gtid # # BEGIN GTID #-#-# 13master-bin.000001 # Annotate_rows # # insert into t1 values (1),(2) 14master-bin.000001 # Table_map # # table_id: # (test.t1) 15master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F 16master-bin.000001 # Xid # # COMMIT /* XID */ 17delete from t1; 18reset master; 19begin; 20insert into t1 values (1),(2); 21*** the following UPDATE query wont generate any updates for the binlog *** 22insert into t1 values (3),(4),(1),(2); 23ERROR 23000: Duplicate entry '1' for key 'i' 24commit; 25*** Results of the test: the binlog must have only one Write_rows event not two *** 26include/show_binlog_events.inc 27Log_name Pos Event_type Server_id End_log_pos Info 28master-bin.000001 # Gtid # # BEGIN GTID #-#-# 29master-bin.000001 # Annotate_rows # # insert into t1 values (1),(2) 30master-bin.000001 # Table_map # # table_id: # (test.t1) 31master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F 32master-bin.000001 # Xid # # COMMIT /* XID */ 33drop table t1; 34RESET MASTER; 35CREATE TABLE t1 ( c1 int , primary key (c1)) ENGINE=InnoDB; 36INSERT INTO t1 VALUES (1), (2), (3); 37CREATE TEMPORARY TABLE IF NOT EXISTS t2 LIKE t1; 38TRUNCATE TABLE t2; 39DROP TABLE t1; 40############################################### 41### assertion: No event for 'TRUNCATE TABLE t2' 42############################################### 43include/show_binlog_events.inc 44Log_name Pos Event_type Server_id End_log_pos Info 45master-bin.000001 # Gtid # # GTID #-#-# 46master-bin.000001 # Query # # use `test`; CREATE TABLE t1 ( c1 int , primary key (c1)) ENGINE=InnoDB 47master-bin.000001 # Gtid # # BEGIN GTID #-#-# 48master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1), (2), (3) 49master-bin.000001 # Table_map # # table_id: # (test.t1) 50master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F 51master-bin.000001 # Xid # # COMMIT /* XID */ 52master-bin.000001 # Gtid # # GTID #-#-# 53master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ 54############################################### 55RESET MASTER; 56CREATE TEMPORARY TABLE t1 (c1 int) Engine=InnoDB; 57INSERT INTO t1 VALUES (1), (2), (3); 58TRUNCATE t1; 59DROP TEMPORARY TABLE t1; 60############################################### 61### assertion: No event for 'TRUNCATE TABLE t1' 62############################################### 63include/show_binlog_events.inc 64############################################### 65# 66# Bug#12346411 SQL/LOG.CC:6509: ASSERTION `PREPARED_XIDS > 0' FAILED 67# 68DROP TABLE IF EXISTS t1, t2; 69CREATE TABLE t1(a INT PRIMARY KEY) engine=innodb; 70CREATE TABLE t2(a INT) engine=myisam; 71INSERT INTO t1 VALUES (1); 72START TRANSACTION; 73INSERT INTO t2 VALUES (1); 74INSERT IGNORE INTO t1 VALUES (1); 75Warnings: 76Warning 1062 Duplicate entry '1' for key 'PRIMARY' 77COMMIT; 78INSERT INTO t1 VALUES (2); 79START TRANSACTION; 80INSERT INTO t2 VALUES (2); 81UPDATE IGNORE t1 SET a=1 WHERE a=2; 82COMMIT; 83DROP TABLE t1, t2; 84