summaryrefslogtreecommitdiff
path: root/mysql-test/t/ps.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/ps.test')
-rw-r--r--mysql-test/t/ps.test54
1 files changed, 52 insertions, 2 deletions
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test
index 1c8595936cd..c826bff4ea8 100644
--- a/mysql-test/t/ps.test
+++ b/mysql-test/t/ps.test
@@ -3875,7 +3875,58 @@ drop table t1;
--echo # End of 5.5 tests
--echo #
---echo # Start of 10.2 tests
+--echo # End of 10.0 tests
+--echo #
+
+--echo #
+--echo # MDEV-12060 Crash in EXECUTE IMMEDIATE with an expression returning a GRANT command
+--echo # (the 10.1 part)
+--echo #
+
+DELIMITER /;
+CREATE PROCEDURE p2 ()
+BEGIN
+ SET STATEMENT join_cache_level=CAST(CONCAT(_utf8'6',_latin1'') AS INT) FOR PREPARE stmt FROM 'SELECT 1';
+ EXECUTE stmt;
+ DEALLOCATE PREPARE stmt;
+END;
+/
+DELIMITER ;/
+CALL p2();
+DROP PROCEDURE p2;
+
+
+DELIMITER /;
+BEGIN NOT ATOMIC
+ SET STATEMENT join_cache_level=CAST(CONCAT(_utf8'6',_latin1'') AS INT) FOR PREPARE stmt FROM 'SELECT 1';
+ EXECUTE stmt;
+ DEALLOCATE PREPARE stmt;
+END;
+/
+DELIMITER ;/
+
+
+DELIMITER /;
+BEGIN NOT ATOMIC
+ SET STATEMENT join_cache_level=CAST(CONCAT(_utf8'6',_latin1'') AS INT) FOR PREPARE stmt FROM 'SELECT 1';
+ DEALLOCATE PREPARE stmt;
+END;
+/
+DELIMITER ;/
+
+
+DELIMITER /;
+BEGIN NOT ATOMIC
+ PREPARE stmt FROM 'SELECT 1';
+ SET STATEMENT join_cache_level=CAST(CONCAT(_utf8'6',_latin1'') AS INT) FOR EXECUTE stmt;
+ DEALLOCATE PREPARE stmt;
+END;
+/
+DELIMITER ;/
+
+
+--echo #
+--echo # End of 10.1 tests
--echo #
--echo #
@@ -4696,7 +4747,6 @@ DROP PROCEDURE p2;
DROP PROCEDURE p1;
DROP ROLE testrole;
-
--echo #
--echo # End of 10.2 tests
--echo #