summaryrefslogtreecommitdiff
path: root/mysql-test/main/ps.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-04-06 12:08:30 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-04-06 12:08:30 +0300
commit9d94c60f2b67b6008c69d51b0b85ac539a1ce647 (patch)
treef4a3198e4326358343abf9bfe3c667a726e23495 /mysql-test/main/ps.test
parentd6758efbe126cdc6a0718a4b560d9e8f494c0399 (diff)
parentcacb61b6be78b01a9c62890cc81d059ee46921ac (diff)
downloadmariadb-git-9d94c60f2b67b6008c69d51b0b85ac539a1ce647.tar.gz
Merge 10.5 into 10.6
Diffstat (limited to 'mysql-test/main/ps.test')
-rw-r--r--mysql-test/main/ps.test32
1 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/main/ps.test b/mysql-test/main/ps.test
index c4ec92540a2..678c24db1eb 100644
--- a/mysql-test/main/ps.test
+++ b/mysql-test/main/ps.test
@@ -5006,6 +5006,19 @@ DEALLOCATE PREPARE stmt;
DROP VIEW v1;
DROP TABLE t1;
+--echo #
+--echo # MDEV-19631: Assertion `0' failed in st_select_lex_unit::optimize or
+--echo # different plan upon 2nd execution of PS with EXPLAIN
+--echo #
+CREATE TABLE t1 (a INT);
+PREPARE stmt FROM 'EXPLAIN SELECT * FROM t1 HAVING 6 IN ( SELECT 6 UNION SELECT 5 )';
+EXECUTE stmt;
+--echo # Without the patch the second execution of the 'stmt' prepared statement
+--echo # would result in server crash.
+EXECUTE stmt;
+# Cleanup
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1;
--echo # End of 10.2 tests
--echo #
@@ -5084,5 +5097,24 @@ SET GLOBAL disconnect_on_expired_password=@disconnect_on_expired_password_save;
DROP USER user1@localhost;
--echo #
+--echo # MDEV-21173: Assertion `m_thd == __null' failed in sp_head::~sp_head
+--echo #
+CREATE TABLE t1 (a INT);
+
+--error ER_SUBQUERIES_NOT_SUPPORTED
+EXECUTE IMMEDIATE "CREATE PROCEDURE p1() SELECT 1 FROM t1 PROCEDURE ANALYSE( 10, (SELECT a FROM t1));";
+DROP TABLE t1;
+
+delimiter $;
+--error ER_SUBQUERIES_NOT_SUPPORTED
+BEGIN NOT ATOMIC
+ PREPARE stmt FROM 'SELECT ?';
+ EXECUTE stmt USING ((SELECT 1));
+END;
+$
+
+delimiter ;$
+
+--echo #
--echo # End of 10.4 tests
--echo #