Commit 14cfb0ac authored by Alexander Barkov's avatar Alexander Barkov

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".
parent 60277b8b
include/master-slave.inc
[connection master]
#
# MDEV-6409 CREATE VIEW replication problem if error occurs in mysql_register_view
#
# Check the bug where if an error occurs in mysql_register_view the view
# is still replicated to the slave
#
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;
a
1
2
show tables;
Tables_in_test
t1
v1
set @@debug_dbug="d,simulate_register_view_failure";
CREATE VIEW v2 as SELECT * FROM t1;
ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
show tables;
Tables_in_test
t1
v1
show tables;
Tables_in_test
t1
v1
DROP VIEW IF EXISTS v1;
DROP TABLE t1;
include/rpl_end.inc
--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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment