2
# Bug #797: If a query is ignored on slave (replicate-ignore-table) the slave
3
# still checks that it has the same error as on the master.
4
##########################################################################
5
# 2006-02-07 JBM Added error code 1022 for NDB Engine + ORDER BY
6
##########################################################################
8
-- source include/master-slave.inc
10
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
13
create table t1 (a int primary key);
14
create table t4 (a int primary key);
15
# generate an error that goes to the binlog
16
--error 1022, ER_DUP_ENTRY
17
insert into t1 values (1),(1);
18
insert into t4 values (1),(2);
19
# as the t1 table is ignored on the slave, the slave should be able to sync
20
sync_slave_with_master;
21
# check that the table has been ignored, because otherwise the test is nonsense
22
show tables like 't1';
23
show tables like 't4';
24
SELECT * FROM test.t4 ORDER BY a;
27
sync_slave_with_master;
29
# Now test that even critical errors (connection killed)
30
# are ignored if rules allow it.
31
# The "kill" idea was copied from rpl000001.test.
34
select get_lock('crash_lock%20C', 10);
37
create table t2 (a int primary key);
38
insert into t2 values(1);
39
create table t3 (id int);
40
insert into t3 values(connection_id());
41
send update t2 set a = a + 1 + get_lock('crash_lock%20C', 10);
44
let $wait_condition= SELECT a > 1 FROM t2;
45
source include/wait_condition.inc;
46
select (@id := id) - id from t3;
49
insert into t4 values (3),(4);
51
# The get_lock function causes warning for unsafe statement.
57
sync_slave_with_master;
58
SELECT * FROM test.t4 ORDER BY a;
62
sync_slave_with_master;
64
# Adding comment for force manual merge 5.0 -> wl1012. delete me if needed