summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/rpl/t/rpl_view_debug.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
commita175314c3e5827eb193872241446f2f8f5c9d33c (patch)
treecd3d60ca99ae00829c52a6ca79150a5b6e62528b /mysql-test/suite/rpl/t/rpl_view_debug.test
parentInitial commit. (diff)
downloadmariadb-10.5-upstream.tar.xz
mariadb-10.5-upstream.zip
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/rpl/t/rpl_view_debug.test')
-rw-r--r--mysql-test/suite/rpl/t/rpl_view_debug.test35
1 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_view_debug.test b/mysql-test/suite/rpl/t/rpl_view_debug.test
new file mode 100644
index 00000000..08036924
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_view_debug.test
@@ -0,0 +1,35 @@
+--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 @saved_dbug = @@SESSION.debug_dbug;
+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;
+SET debug_dbug= @saved_dbug;
+--source include/rpl_end.inc