Debian Codegraph @

mysql-test/suite/rpl/t/binlog_check_constraint_checks_flag.test

raw
1 --source include/master-slave.inc
2
3 # References:
4 #
5 # MDEV-32447 Using check_constraint_checks=OFF can break replication
6 #
7 # check_constraint_checks was added in MDEV-7563 but its addition
8 # to OPTIONS_WRITTEN_TO_BINLOG was missed and therefore it was breaking
9 # replication in binlog formats other than ROW.
10
11
12 --connection master
13
14 create table t10(
15 pk int primary key,
16 a int,
17 constraint a_big check (a>10)
18 );
19
20 insert into t10 values (1, 20);
21 set check_constraint_checks=off;
22 update t10 set a=a-15 where pk=1;
23 update t10 set a=a+100 where pk=1;
24 set check_constraint_checks=on ;
25 select * from t10;
26
27 --sync_slave_with_master
28
29 # Here we are on the slave
30 select * from t10;
31 --connection master
32
33 drop table t10;
34 --sync_slave_with_master
35
36 --source include/rpl_end.inc