1 include/master-slave.inc
3 ==== Test Without sql_mode=strict_trans_tables ====
5 create table t1 (n int not null primary key);
7 insert into t1 values (1);
9 insert into t1 values (1);
10 insert into t1 values (2),(3);
12 select * from t1 order by n;
17 ==== Test With sql_mode=strict_trans_tables ====
18 insert into t1 values (7),(8);
20 set sql_mode=strict_trans_tables;
21 insert into t1 values (7), (8), (9);
23 select * from t1 order by n;
30 include/check_slave_is_running.inc
33 create table t1(a int primary key);
34 insert into t1 values (1),(2);
38 set sql_mode=strict_trans_tables;
39 insert into t1 values (1), (2), (3);
45 include/check_slave_is_running.inc
48 ==== Using Innodb ====
50 CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data INT) Engine=InnoDB;
53 t1 CREATE TABLE `t1` (
54 `id` int(11) NOT NULL,
55 `data` int(11) DEFAULT NULL,
57 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
59 call mtr.add_suppression("Slave SQL.*Could not execute .*te_rows event on table test.t.; Duplicate entry.* Error_code: 1062");
60 CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data INT) Engine=InnoDB;
63 t1 CREATE TABLE `t1` (
64 `id` int(11) NOT NULL,
65 `data` int(11) DEFAULT NULL,
67 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
68 INSERT INTO t1 VALUES(1, 1);
69 INSERT INTO t1 VALUES(2, 1);
70 INSERT INTO t1 VALUES(3, 1);
71 INSERT INTO t1 VALUES(4, 1);
73 DELETE FROM t1 WHERE id = 4;
75 UPDATE t1 SET id= id + 3, data = 2;
77 **** We cannot execute a select as there are differences in the
78 **** behavior between STMT and RBR.
79 ==== Using MyIsam ====
81 CREATE TABLE t2(id INT NOT NULL PRIMARY KEY, data INT) Engine=MyIsam;
84 t2 CREATE TABLE `t2` (
85 `id` int(11) NOT NULL,
86 `data` int(11) DEFAULT NULL,
88 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
90 CREATE TABLE t2(id INT NOT NULL PRIMARY KEY, data INT) Engine=MyIsam;
93 t2 CREATE TABLE `t2` (
94 `id` int(11) NOT NULL,
95 `data` int(11) DEFAULT NULL,
97 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
98 INSERT INTO t2 VALUES(1, 1);
99 INSERT INTO t2 VALUES(2, 1);
100 INSERT INTO t2 VALUES(3, 1);
101 INSERT INTO t2 VALUES(5, 1);
103 DELETE FROM t2 WHERE id = 5;
105 UPDATE t2 SET id= id + 3, data = 2;
107 **** We cannot execute a select as there are differences in the
108 **** behavior between STMT and RBR.