summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/view_debug.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/view_debug.test
parentInitial commit. (diff)
downloadmariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz
mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/view_debug.test')
-rw-r--r--mysql-test/main/view_debug.test38
1 files changed, 38 insertions, 0 deletions
diff --git a/mysql-test/main/view_debug.test b/mysql-test/main/view_debug.test
new file mode 100644
index 00000000..35fc0c6e
--- /dev/null
+++ b/mysql-test/main/view_debug.test
@@ -0,0 +1,38 @@
+
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+
+--echo #
+--echo #MDEV-8087:Server crashed in Time_and_counter_tracker::incr_loops
+--echo #
+
+CREATE PROCEDURE proc() SELECT * FROM v2;
+
+CREATE ALGORITHM = UNDEFINED VIEW v1 AS SELECT 1;
+CREATE ALGORITHM = TEMPTABLE VIEW v2 AS SELECT 3 FROM v1;
+DROP VIEW v1;
+
+--connect (con1,localhost,root,,test)
+
+--connect (con2,localhost,root,,test)
+
+--connection con1
+--error ER_VIEW_INVALID
+CALL proc();
+SET DEBUG_SYNC= 'after_cached_view_opened SIGNAL oppp WAIT_FOR created';
+send CALL proc();
+
+--connection con2
+SET DEBUG_SYNC= 'now WAIT_FOR oppp';
+SET DEBUG_SYNC= 'RESET';
+CREATE ALGORITHM = TEMPTABLE VIEW v1 AS SELECT 2;
+SET DEBUG_SYNC= 'now SIGNAL created';
+
+--connection con1
+--reap
+SET DEBUG_SYNC= 'RESET';
+--disconnect con1
+--disconnect con2
+--connection default
+drop procedure proc;
+drop view v1,v2;