1include/master-slave.inc 2[connection master] 3# 4# MDEV-6409 CREATE VIEW replication problem if error occurs in mysql_register_view 5# 6# Check the bug where if an error occurs in mysql_register_view the view 7# is still replicated to the slave 8# 9connection master; 10create table t1 (a int); 11insert into t1 values (1); 12create view v1 as select a from t1; 13insert into v1 values (2); 14select * from v1 order by a; 15a 161 172 18connection slave; 19show tables; 20Tables_in_test 21t1 22v1 23connection master; 24SET @saved_dbug = @@SESSION.debug_dbug; 25set @@debug_dbug="d,simulate_register_view_failure"; 26CREATE VIEW v2 as SELECT * FROM t1; 27ERROR HY000: Out of memory. 28show tables; 29Tables_in_test 30t1 31v1 32connection slave; 33show tables; 34Tables_in_test 35t1 36v1 37connection master; 38DROP VIEW IF EXISTS v1; 39DROP TABLE t1; 40SET debug_dbug= @saved_dbug; 41include/rpl_end.inc 42