mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / suite / binlog / r / binlog_innodb_row.result
blob4e64660abf8aa9c8c86bed0bf2199be40a2923ab
1 CREATE TABLE t1 (i int unique) ENGINE=innodb;
2 reset master;
3 begin;
4 insert into t1 values (1),(2);
5 *** the following UPDATE query wont generate any updates for the binlog ***
6 update t1 set i = 3 where i < 3;
7 ERROR 23000: Duplicate entry '3' for key 'i'
8 commit;
9 *** Results of the test: the binlog must have only Write_rows events not any Update_rows ***
10 show binlog events from <binlog_start>;
11 Log_name        Pos     Event_type      Server_id       End_log_pos     Info
12 master-bin.000001       #       Query   #       #       BEGIN
13 master-bin.000001       #       Table_map       #       #       table_id: # (test.t1)
14 master-bin.000001       #       Write_rows      #       #       table_id: # flags: STMT_END_F
15 master-bin.000001       #       Xid     #       #       COMMIT /* XID */
16 delete from t1;
17 reset master;
18 begin;
19 insert into t1 values (1),(2);
20 *** the following UPDATE query wont generate any updates for the binlog ***
21 insert into t1 values (3),(4),(1),(2);
22 ERROR 23000: Duplicate entry '1' for key 'i'
23 commit;
24 *** Results of the test: the binlog must have only one Write_rows event not two ***
25 show binlog events from <binlog_start>;
26 Log_name        Pos     Event_type      Server_id       End_log_pos     Info
27 master-bin.000001       #       Query   #       #       BEGIN
28 master-bin.000001       #       Table_map       #       #       table_id: # (test.t1)
29 master-bin.000001       #       Write_rows      #       #       table_id: # flags: STMT_END_F
30 master-bin.000001       #       Xid     #       #       COMMIT /* XID */
31 drop table t1;
32 RESET MASTER;
33 CREATE TABLE t1 ( c1 int , primary key (c1)) ENGINE=InnoDB;
34 INSERT INTO t1 VALUES (1), (2), (3);
35 CREATE TEMPORARY TABLE IF NOT EXISTS  t2 LIKE t1;
36 TRUNCATE TABLE t2;
37 DROP TABLE t1;
38 ###############################################
39 ### assertion: No event for 'TRUNCATE TABLE t2'
40 ###############################################
41 show binlog events from <binlog_start>;
42 Log_name        Pos     Event_type      Server_id       End_log_pos     Info
43 master-bin.000001       #       Query   #       #       use `test`; CREATE TABLE t1 ( c1 int , primary key (c1)) ENGINE=InnoDB
44 master-bin.000001       #       Query   #       #       BEGIN
45 master-bin.000001       #       Table_map       #       #       table_id: # (test.t1)
46 master-bin.000001       #       Write_rows      #       #       table_id: # flags: STMT_END_F
47 master-bin.000001       #       Xid     #       #       COMMIT /* XID */
48 master-bin.000001       #       Query   #       #       use `test`; DROP TABLE t1
49 ###############################################
50 RESET MASTER;
51 CREATE TEMPORARY TABLE t1 (c1 int) Engine=InnoDB;
52 INSERT INTO t1 VALUES (1), (2), (3);
53 TRUNCATE t1;
54 DROP TEMPORARY TABLE t1;
55 ###############################################
56 ### assertion: No event for 'TRUNCATE TABLE t1'
57 ###############################################
58 show binlog events from <binlog_start>;
59 Log_name        Pos     Event_type      Server_id       End_log_pos     Info
60 ###############################################