summaryrefslogtreecommitdiff
path: root/mysql-test/main/sp.test
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2018-12-20 11:22:13 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2018-12-20 14:53:31 +0100
commit2999492c3278528ceb9f37bd6cfca5ca5295ef9a (patch)
treea8589a65af6ff170a01fd9b907b297b4ce923840 /mysql-test/main/sp.test
parentb26736cdb1105f5c500c0a6b51954ac4a83665b0 (diff)
downloadmariadb-git-2999492c3278528ceb9f37bd6cfca5ca5295ef9a.tar.gz
MDEV-16036: Debug assertion failed in resignal on create temporary table
Reising condition on NOTW controlled by OPTION_SQL_NOTES.
Diffstat (limited to 'mysql-test/main/sp.test')
-rw-r--r--mysql-test/main/sp.test34
1 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test
index 72e6ad6bcba..98b85983687 100644
--- a/mysql-test/main/sp.test
+++ b/mysql-test/main/sp.test
@@ -10252,3 +10252,37 @@ CREATE TABLE t1 AS SELECT f1() AS c1, COALESCE(f1()) AS c2, CONCAT(f1()) AS c3;
SHOW CREATE TABLE t1;
DROP TABLE t1;
DROP FUNCTION f1;
+
+--echo #
+--echo # MDEV-16036: Debug assertion failed in resignal on create
+--echo # temporary table
+--echo #
+
+set @save_sql_mode= @@sql_mode;
+set sql_mode='ORACLE';
+delimiter /;
+CREATE or replace procedure p4()
+AS
+ CONTINUE HANDLER FOR SQLWARNING
+ BEGIN
+ NULL;
+ END;
+ EXIT HANDLER FOR OTHERS -- SQLEXCEPTION
+ BEGIN
+ GET DIAGNOSTICS CONDITION 1 @sqlstate = RETURNED_SQLSTATE, @errno = MYSQL_ERRNO, @text = MESSAGE_TEXT;
+ SELECT @sqlstate, @errno, @text;
+ SHOW WARNINGS;
+ RESIGNAL; -- cause DBG_ASSERT failed
+ END;
+BEGIN
+ CREATE TEMPORARY TABLE IF NOT EXISTS t1(origine VARCHAR2(10) NOT NULL);
+END
+/
+delimiter ;/
+call p4();
+call p4();
+drop procedure p4;
+drop table t1;
+set @@sql_mode=@save_sql_mode;
+
+--echo # End of 10.3 tests