Debian Codegraph @

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

raw
1 --source include/have_debug.inc
2 --source include/master-slave.inc
3
4 --echo #
5 --echo # MDEV-6409 CREATE VIEW replication problem if error occurs in mysql_register_view
6 --echo #
7 --echo # Check the bug where if an error occurs in mysql_register_view the view
8 --echo # is still replicated to the slave
9 --echo #
10 connection master;
11 create table t1 (a int);
12 insert into t1 values (1);
13 create view v1 as select a from t1;
14 insert into v1 values (2);
15 select * from v1 order by a;
16 sync_slave_with_master;
17
18 # view already has to be on slave
19 show tables;
20 connection master;
21 SET @saved_dbug = @@SESSION.debug_dbug;
22 set @@debug_dbug="d,simulate_register_view_failure";
23
24 --error ER_OUT_OF_RESOURCES
25 CREATE VIEW v2 as SELECT * FROM t1;
26
27 show tables;
28 sync_slave_with_master;
29 show tables;
30
31 connection master;
32 DROP VIEW IF EXISTS v1;
33 DROP TABLE t1;
34 SET debug_dbug= @saved_dbug;
35 --source include/rpl_end.inc