mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / suite / rpl / r / rpl_skip_error.result
blobf5675b5e25f035b6f168b69bdbe3b66f426fa59c
1 include/master-slave.inc
2 [connection master]
3 ==== Test Without sql_mode=strict_trans_tables ====
4 [on master]
5 create table t1 (n int not null primary key);
6 [on slave]
7 insert into t1 values (1);
8 [on master]
9 insert into t1 values (1);
10 insert into t1 values (2),(3);
11 [on slave]
12 select * from t1 order by n;
17 ==== Test With sql_mode=strict_trans_tables ====
18 insert into t1 values (7),(8);
19 [on master]
20 set sql_mode=strict_trans_tables;
21 insert into t1 values (7), (8), (9);
22 [on slave]
23 select * from t1 order by n;
30 include/check_slave_is_running.inc
31 ==== Clean Up ====
32 drop table t1;
33 create table t1(a int primary key);
34 insert into t1 values (1),(2);
35 SET SQL_LOG_BIN=0;
36 delete from t1;
37 SET SQL_LOG_BIN=1;
38 set sql_mode=strict_trans_tables;
39 insert into t1 values (1), (2), (3);
40 [on slave]
41 select * from t1;
45 include/check_slave_is_running.inc
46 ==== Clean Up ====
47 drop table t1;
48 ==== Using Innodb ====
49 SET SQL_LOG_BIN=0;
50 CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data INT) Engine=InnoDB;
51 SHOW CREATE TABLE t1;
52 Table   Create Table
53 t1      CREATE TABLE `t1` (
54   `id` int(11) NOT NULL,
55   `data` int(11) DEFAULT NULL,
56   PRIMARY KEY (`id`)
57 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
58 SET SQL_LOG_BIN=1;
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;
61 SHOW CREATE TABLE t1;
62 Table   Create Table
63 t1      CREATE TABLE `t1` (
64   `id` int(11) NOT NULL,
65   `data` int(11) DEFAULT NULL,
66   PRIMARY KEY (`id`)
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);
72 SET SQL_LOG_BIN=0;
73 DELETE FROM t1 WHERE id = 4;
74 SET SQL_LOG_BIN=1;
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 ====
80 SET SQL_LOG_BIN=0;
81 CREATE TABLE t2(id INT NOT NULL PRIMARY KEY, data INT) Engine=MyIsam;
82 SHOW CREATE TABLE t2;
83 Table   Create Table
84 t2      CREATE TABLE `t2` (
85   `id` int(11) NOT NULL,
86   `data` int(11) DEFAULT NULL,
87   PRIMARY KEY (`id`)
88 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
89 SET SQL_LOG_BIN=1;
90 CREATE TABLE t2(id INT NOT NULL PRIMARY KEY, data INT) Engine=MyIsam;
91 SHOW CREATE TABLE t2;
92 Table   Create Table
93 t2      CREATE TABLE `t2` (
94   `id` int(11) NOT NULL,
95   `data` int(11) DEFAULT NULL,
96   PRIMARY KEY (`id`)
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);
102 SET SQL_LOG_BIN=0;
103 DELETE FROM t2 WHERE id = 5;
104 SET SQL_LOG_BIN=1;
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.
109 ==== Clean Up ====
110 DROP TABLE t1;
111 DROP TABLE t2;
112 include/rpl_end.inc