1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Fixing minor problems in the patch for MDEV-11478 (shortint vs smallint)

- Fixing Type_handler_short::name() to return "smallint" instead of "shortint".
- Fixing test markers "End of 10.2 tests" and "End of 10.3 test"
This commit is contained in:
Alexander Barkov
2016-12-30 21:13:34 +04:00
parent 9b2bcf19f4
commit 060d4861b9
3 changed files with 15 additions and 8 deletions

View File

@ -2199,8 +2199,11 @@ c
1 1
DROP TABLE t1; DROP TABLE t1;
# #
# Start of 10.3 tests
# #
# #
# MDEV-11478 Result data type aggregation for pluggable data types
#
CREATE PROCEDURE p2(query TEXT) CREATE PROCEDURE p2(query TEXT)
BEGIN BEGIN
DECLARE errcount INT DEFAULT 0; DECLARE errcount INT DEFAULT 0;
@ -2451,23 +2454,23 @@ CREATE TABLE t1 (a SMALLINT, b Point)
CREATE TABLE t2 AS SELECT CASE WHEN TRUE THEN a ELSE b END FROM t1 CREATE TABLE t2 AS SELECT CASE WHEN TRUE THEN a ELSE b END FROM t1
ERROR: ERROR:
Illegal parameter data types shortint and geometry for operation 'case' Illegal parameter data types smallint and geometry for operation 'case'
CREATE TABLE t2 AS SELECT COALESCE(a,b) FROM t1 CREATE TABLE t2 AS SELECT COALESCE(a,b) FROM t1
ERROR: ERROR:
Illegal parameter data types shortint and geometry for operation 'coalesce' Illegal parameter data types smallint and geometry for operation 'coalesce'
CREATE TABLE t2 AS SELECT IF(TRUE,a,b) FROM t1 CREATE TABLE t2 AS SELECT IF(TRUE,a,b) FROM t1
ERROR: ERROR:
Illegal parameter data types shortint and geometry for operation 'if' Illegal parameter data types smallint and geometry for operation 'if'
CREATE TABLE t2 AS SELECT IFNULL(a,b) FROM t1 CREATE TABLE t2 AS SELECT IFNULL(a,b) FROM t1
ERROR: ERROR:
Illegal parameter data types shortint and geometry for operation 'ifnull' Illegal parameter data types smallint and geometry for operation 'ifnull'
CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1 CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1
ERROR: ERROR:
Illegal parameter data types shortint and geometry for operation 'UNION' Illegal parameter data types smallint and geometry for operation 'UNION'
------------------------------------- -------------------------------------
CREATE TABLE t1 (a MEDIUMINT, b Point) CREATE TABLE t1 (a MEDIUMINT, b Point)
@ -2811,5 +2814,5 @@ DROP TABLE t1;
DROP PROCEDURE p1; DROP PROCEDURE p1;
DROP PROCEDURE p2; DROP PROCEDURE p2;
# #
# End of 10.2 tests # End of 10.3 tests
# #

View File

@ -1717,7 +1717,11 @@ SELECT c FROM t1;
DROP TABLE t1; DROP TABLE t1;
--echo # --echo #
--echo # Start of 10.3 tests
--echo # --echo #
--echo #
--echo # MDEV-11478 Result data type aggregation for pluggable data types
--echo # --echo #
DELIMITER $$; DELIMITER $$;
@ -1796,5 +1800,5 @@ DROP PROCEDURE p2;
--echo # --echo #
--echo # End of 10.2 tests --echo # End of 10.3 tests
--echo # --echo #

View File

@ -200,7 +200,7 @@ const Name
const Name const Name
Type_handler_tiny::m_name_tiny(C_STRING_WITH_LEN("tinyint")), Type_handler_tiny::m_name_tiny(C_STRING_WITH_LEN("tinyint")),
Type_handler_short::m_name_short(C_STRING_WITH_LEN("shortint")), Type_handler_short::m_name_short(C_STRING_WITH_LEN("smallint")),
Type_handler_long::m_name_int(C_STRING_WITH_LEN("int")), Type_handler_long::m_name_int(C_STRING_WITH_LEN("int")),
Type_handler_longlong::m_name_longlong(C_STRING_WITH_LEN("bigint")), Type_handler_longlong::m_name_longlong(C_STRING_WITH_LEN("bigint")),
Type_handler_int24::m_name_mediumint(C_STRING_WITH_LEN("mediumint")), Type_handler_int24::m_name_mediumint(C_STRING_WITH_LEN("mediumint")),