1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-6409 CREATE VIEW replication problem if error occurs in mysql_register_view

An additional debug test, made by Sriram Patil while working on
"CREATE VIEW IF NOT EXISTS".
This commit is contained in:
Alexander Barkov
2014-12-10 12:00:25 +04:00
parent 60277b8b3c
commit 14cfb0acb8
2 changed files with 68 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
--source include/have_debug.inc
--source include/master-slave.inc
--echo #
--echo # MDEV-6409 CREATE VIEW replication problem if error occurs in mysql_register_view
--echo #
--echo # Check the bug where if an error occurs in mysql_register_view the view
--echo # is still replicated to the slave
--echo #
connection master;
create table t1 (a int);
insert into t1 values (1);
create view v1 as select a from t1;
insert into v1 values (2);
select * from v1 order by a;
sync_slave_with_master;
# view already has to be on slave
show tables;
connection master;
set @@debug_dbug="d,simulate_register_view_failure";
--error ER_OUT_OF_RESOURCES
CREATE VIEW v2 as SELECT * FROM t1;
show tables;
sync_slave_with_master;
show tables;
connection master;
DROP VIEW IF EXISTS v1;
DROP TABLE t1;
--source include/rpl_end.inc