summaryrefslogtreecommitdiff
path: root/mysql-test/main/sp.test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-05-30 17:03:26 +0400
committerAlexander Barkov <bar@mariadb.com>2019-05-30 17:03:26 +0400
commitcd1d161c261dcb6f9158bf0a537cb9deee051010 (patch)
treebb4afa8e4b8f143c8aa11ec325eabf91e041ccc7 /mysql-test/main/sp.test
parentf98bb23168ee9bc0da8aa7111f35cf2539986387 (diff)
downloadmariadb-git-cd1d161c261dcb6f9158bf0a537cb9deee051010.tar.gz
MDEV-19637 Crash on an SP variable assignment to a wrong subselect
Diffstat (limited to 'mysql-test/main/sp.test')
-rw-r--r--mysql-test/main/sp.test23
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test
index 7f841ccd0b4..920b09077d3 100644
--- a/mysql-test/main/sp.test
+++ b/mysql-test/main/sp.test
@@ -10323,3 +10323,26 @@ drop table t1;
set @@sql_mode=@save_sql_mode;
--echo # End of 10.3 tests
+
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-19637 Crash on an SP variable assignment to a wrong subselect
+--echo #
+
+DELIMITER $$;
+--error ER_CANT_USE_OPTION_HERE
+BEGIN NOT ATOMIC
+ DECLARE a INT;
+ SET a=(SELECT 1 FROM DUAL UNION SELECT HIGH_PRIORITY 2 FROM DUAL);
+END;
+$$
+DELIMITER ;$$
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #