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.test36
1 files changed, 35 insertions, 1 deletions
diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test
index 4f520f321c5..230e9c8bb18 100644
--- a/mysql-test/main/sp.test
+++ b/mysql-test/main/sp.test
@@ -2918,7 +2918,7 @@ create procedure bug4904()
begin
declare continue handler for sqlstate 'HY000' begin end;
- create table t2 as select * from t3;
+ create table not_existing_table as select * from t3;
end|
-- error 1146
@@ -10239,3 +10239,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