Commit 54e29712 authored by Alexander Barkov's avatar Alexander Barkov

Adding tests for MDEV-12917 Wrong data type for CREATE..SELECT year_sp_variable

The fix for MDEV-12876 fixed this problem as well.
So adding tests only.
parent a4789f52
......@@ -1187,6 +1187,9 @@ DROP PROCEDURE vctest;
#
# Start of 10.3 tests
#
#
# MDEV-12876 Wrong data type for CREATE..SELECT sp_var
#
CREATE PROCEDURE p1()
BEGIN
DECLARE i8 TINYINT;
......@@ -1221,3 +1224,20 @@ t3 mediumtext YES NULL
t4 longtext YES NULL
DROP TABLE t1;
DROP PROCEDURE p1;
#
# MDEV-12917 Wrong data type for CREATE..SELECT year_sp_variable
#
CREATE PROCEDURE p1()
BEGIN
DECLARE a YEAR;
CREATE OR REPLACE TABLE t1 AS SELECT a;
SHOW CREATE TABLE t1;
DROP TABLE t1;
END;
$$
CALL p1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" year(4) DEFAULT NULL
)
DROP PROCEDURE p1;
......@@ -1492,6 +1492,10 @@ DROP PROCEDURE vctest;
--echo # Start of 10.3 tests
--echo #
--echo #
--echo # MDEV-12876 Wrong data type for CREATE..SELECT sp_var
--echo #
DELIMITER $$;
CREATE PROCEDURE p1()
BEGIN
......@@ -1515,3 +1519,20 @@ CALL p1;
DESCRIBE t1;
DROP TABLE t1;
DROP PROCEDURE p1;
--echo #
--echo # MDEV-12917 Wrong data type for CREATE..SELECT year_sp_variable
--echo #
DELIMITER $$;
CREATE PROCEDURE p1()
BEGIN
DECLARE a YEAR;
CREATE OR REPLACE TABLE t1 AS SELECT a;
SHOW CREATE TABLE t1;
DROP TABLE t1;
END;
$$
DELIMITER ;$$
CALL p1;
DROP PROCEDURE p1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment