Debian Codegraph @

mysql-test/suite/rpl/include/rpl_stm_EE_err2.test

raw
1 ###################################
2 # Author: JBM
3 # Date: 2006-01-11
4 # Purpose: Second test case from
5 # rpl_EE_err.test split out
6 # from orginal to make the
7 # first work with both RBR and SBR
8 ###################################
9 #REQUIREMENT: An INSERT with a faked duplicate entry error on
10 #master should be replicated to slave and force the slave to stop
11 #(since the slave can't cause a faked error to re-occur).
12 ###################################
13
14 -- source include/master-slave.inc
15
16 connection master;
17 eval create table t1 (a int, unique(a)) engine=$engine_type;
18 set sql_log_bin=0;
19 insert into t1 values(2);
20 set sql_log_bin=1;
21
22 --error ER_DUP_ENTRY
23 insert into t1 values(1),(2);
24 drop table t1;
25
26 connection slave;
27 --source include/wait_for_slave_sql_to_stop.inc
28 call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.* error code=1062.*Error on slave:.* error.* 0");
29 let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
30 let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
31 --echo Error: "$error" (expected different error codes on master and slave)
32 --echo Errno: "$errno" (expected 0)
33 drop table t1;
34 --source include/stop_slave.inc
35 # Clear error messages.
36 RESET SLAVE;
37
38 # End of 4.1 tests
39
40 --let $rpl_only_running_threads= 1
41 --source include/rpl_end.inc