summaryrefslogtreecommitdiff
path: root/mysql-test/main/sp.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/sp.test')
-rw-r--r--mysql-test/main/sp.test23
1 files changed, 22 insertions, 1 deletions
diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test
index c6c00ca8d91..bf3a70b6283 100644
--- a/mysql-test/main/sp.test
+++ b/mysql-test/main/sp.test
@@ -9991,9 +9991,30 @@ DROP TABLE t1;
SET sql_mode=DEFAULT;
--echo #
---echo # Start of 10.3 tests
+--echo # MDEV-24220: error when opening a table for the second call of SP
--echo #
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 VALUES (1,1),(2,2);
+CREATE VIEW v1 AS SELECT MAX(a) as f FROM t1;
+--delimiter $
+CREATE PROCEDURE p1()
+BEGIN
+ SELECT * FROM v1;
+END $
+--delimiter ;
+
+CALL p1;
+ALTER TABLE t1 DROP a;
+-- error ER_VIEW_INVALID
+CALL p1;
+
+DROP PROCEDURE p1;
+DROP VIEW v1;
+DROP TABLE t1;
+
+--echo #End of 10.2 tests
+
--echo #
--echo # MDEV-12007 Allow ROW variables as a cursor FETCH target
--echo #