diff --git a/mysql-test/main/func_hybrid_type.result b/mysql-test/main/func_hybrid_type.result index 16bd0359da2..7c1b5fef61c 100644 --- a/mysql-test/main/func_hybrid_type.result +++ b/mysql-test/main/func_hybrid_type.result @@ -1609,14 +1609,14 @@ def ifnull___a_a 253 10 1 Y 0 39 8 def least____a_a 253 10 1 Y 0 39 8 def greatest_a_a 253 10 1 Y 0 39 8 def test t1 t1 b ___________b 254 1 1 Y 256 0 8 -def case_______b 254 1 1 Y 0 39 8 -def case_____b_b 254 1 1 Y 0 39 8 -def coalesce___b 254 1 1 Y 0 39 8 -def coalesce_b_b 254 1 1 Y 0 39 8 -def if_______b_b 254 1 1 Y 0 39 8 -def ifnull___b_b 254 1 1 Y 0 39 8 -def least____b_b 254 1 1 Y 0 39 8 -def greatest_b_b 254 1 1 Y 0 39 8 +def case_______b 253 1 1 Y 0 39 8 +def case_____b_b 253 1 1 Y 0 39 8 +def coalesce___b 253 1 1 Y 0 39 8 +def coalesce_b_b 253 1 1 Y 0 39 8 +def if_______b_b 253 1 1 Y 0 39 8 +def ifnull___b_b 253 1 1 Y 0 39 8 +def least____b_b 253 1 1 Y 0 39 8 +def greatest_b_b 253 1 1 Y 0 39 8 ___________a a case_______a a case_____a_a a diff --git a/mysql-test/main/sp-anchor-row-type-table.result b/mysql-test/main/sp-anchor-row-type-table.result index b51ee5bf55d..69991bf81ad 100644 --- a/mysql-test/main/sp-anchor-row-type-table.result +++ b/mysql-test/main/sp-anchor-row-type-table.result @@ -707,7 +707,7 @@ Table Create Table t2 CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL, `b` text DEFAULT NULL, - `c` char(1) DEFAULT NULL + `c` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP PROCEDURE p2; DROP PROCEDURE p1; diff --git a/mysql-test/main/sp-anchor-type.result b/mysql-test/main/sp-anchor-type.result index ac867bd5ca3..a878e73d8c8 100644 --- a/mysql-test/main/sp-anchor-type.result +++ b/mysql-test/main/sp-anchor-type.result @@ -469,8 +469,8 @@ t2 CREATE TABLE `t2` ( `t2` text DEFAULT NULL, `t3` mediumtext DEFAULT NULL, `t4` longtext DEFAULT NULL, - `enum1` char(1) DEFAULT NULL, - `set1` char(5) DEFAULT NULL, + `enum1` varchar(1) DEFAULT NULL, + `set1` varchar(5) DEFAULT NULL, `blob1` tinyblob DEFAULT NULL, `blob2` blob DEFAULT NULL, `blob3` mediumblob DEFAULT NULL, @@ -631,8 +631,8 @@ t2 CREATE TABLE `t2` ( `t2` text DEFAULT NULL, `t3` mediumtext DEFAULT NULL, `t4` longtext DEFAULT NULL, - `enum1` char(1) DEFAULT NULL, - `set1` char(5) DEFAULT NULL, + `enum1` varchar(1) DEFAULT NULL, + `set1` varchar(5) DEFAULT NULL, `blob1` tinyblob DEFAULT NULL, `blob2` blob DEFAULT NULL, `blob3` mediumblob DEFAULT NULL, @@ -1044,7 +1044,7 @@ t1 CREATE TABLE `t1` ( `a_flt0` float DEFAULT NULL, `a_dbl0` double DEFAULT NULL, `a_bit3` bit(3) DEFAULT NULL, - `a_enum0` char(1) DEFAULT NULL, + `a_enum0` varchar(1) DEFAULT NULL, `a_varchar10` varchar(10) DEFAULT NULL, `a_text1` text DEFAULT NULL, `a_tinytext1` tinytext DEFAULT NULL, @@ -1062,7 +1062,7 @@ t1 CREATE TABLE `t1` ( `aa_flt0` float DEFAULT NULL, `aa_dbl0` double DEFAULT NULL, `aa_bit3` bit(3) DEFAULT NULL, - `aa_enum0` char(1) DEFAULT NULL, + `aa_enum0` varchar(1) DEFAULT NULL, `aa_varchar10` varchar(10) DEFAULT NULL, `aa_text1` text DEFAULT NULL, `aa_tinytext1` tinytext DEFAULT NULL, diff --git a/mysql-test/main/sp-vars.result b/mysql-test/main/sp-vars.result index 4ffc05fa257..127a0993e2b 100644 --- a/mysql-test/main/sp-vars.result +++ b/mysql-test/main/sp-vars.result @@ -1307,7 +1307,7 @@ $$ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "var" char(1) DEFAULT NULL + "var" varchar(1) DEFAULT NULL ) DROP TABLE t1; # diff --git a/mysql-test/main/type_enum.result b/mysql-test/main/type_enum.result index 8d0dfefc64c..9a0df07724c 100644 --- a/mysql-test/main/type_enum.result +++ b/mysql-test/main/type_enum.result @@ -2353,3 +2353,34 @@ a FLOOR(a) CEILING(a) TRUNCATE(a,0) ROUND(a) 999999999999999999999999999999999999999999999999999999999999 1 1 1 1 DROP TABLE t2; DROP TABLE t1; +# +# MDEV-29062 Wrong result set metadata for a mix of INT+ENUM +# +CREATE TABLE t1 +( +c_int INT, +c_enum ENUM('1') +); +CREATE TABLE t2 AS SELECT c_int FROM t1 UNION SELECT c_enum FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `c_int` varchar(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; +CREATE OR REPLACE TABLE t2 AS SELECT COALESCE(c_int, c_enum) FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `COALESCE(c_int, c_enum)` varchar(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; +SELECT c_int FROM t1 UNION SELECT c_enum FROM t1; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def c_int c_int 253 11 0 Y 0 0 8 +c_int +SELECT COALESCE(c_int, c_enum) FROM t1; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def COALESCE(c_int, c_enum) 253 11 0 Y 0 39 8 +COALESCE(c_int, c_enum) +DROP TABLE t1; diff --git a/mysql-test/main/type_enum.test b/mysql-test/main/type_enum.test index 6ff3e257feb..2d6938c27ae 100644 --- a/mysql-test/main/type_enum.test +++ b/mysql-test/main/type_enum.test @@ -551,3 +551,31 @@ SHOW CREATE TABLE t2; SELECT * FROM t2; DROP TABLE t2; DROP TABLE t1; + + +--echo # +--echo # MDEV-29062 Wrong result set metadata for a mix of INT+ENUM +--echo # + +CREATE TABLE t1 +( + c_int INT, + c_enum ENUM('1') +); + +CREATE TABLE t2 AS SELECT c_int FROM t1 UNION SELECT c_enum FROM t1; +SHOW CREATE TABLE t2; +DROP TABLE t2; + +CREATE OR REPLACE TABLE t2 AS SELECT COALESCE(c_int, c_enum) FROM t1; +SHOW CREATE TABLE t2; +DROP TABLE t2; + +--disable_ps_protocol +--enable_metadata +SELECT c_int FROM t1 UNION SELECT c_enum FROM t1; +SELECT COALESCE(c_int, c_enum) FROM t1; +--disable_metadata +--enable_ps_protocol + +DROP TABLE t1; diff --git a/mysql-test/main/type_set.result b/mysql-test/main/type_set.result index 5f54521c9dc..f5a518fa60c 100644 --- a/mysql-test/main/type_set.result +++ b/mysql-test/main/type_set.result @@ -379,3 +379,34 @@ a FLOOR(a) CEILING(a) TRUNCATE(a,0) ROUND(a) 999999999999999999999999999999999999999999999999999999999999 1 1 1 1 DROP TABLE t2; DROP TABLE t1; +# +# MDEV-29062 Wrong result set metadata for a mix of INT+ENUM +# +CREATE TABLE t1 +( +c_int INT, +c_set SET('1') +); +CREATE TABLE t2 AS SELECT c_int FROM t1 UNION SELECT c_set FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `c_int` varchar(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; +CREATE OR REPLACE TABLE t2 AS SELECT COALESCE(c_int, c_set) FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `COALESCE(c_int, c_set)` varchar(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; +SELECT c_int FROM t1 UNION SELECT c_set FROM t1; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def c_int c_int 253 33 0 Y 0 0 33 +c_int +SELECT COALESCE(c_int, c_set) FROM t1; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def COALESCE(c_int, c_set) 253 33 0 Y 0 39 33 +COALESCE(c_int, c_set) +DROP TABLE t1; diff --git a/mysql-test/main/type_set.test b/mysql-test/main/type_set.test index 2d0c81340ae..b79a3fff452 100644 --- a/mysql-test/main/type_set.test +++ b/mysql-test/main/type_set.test @@ -261,3 +261,31 @@ SHOW CREATE TABLE t2; SELECT * FROM t2; DROP TABLE t2; DROP TABLE t1; + + +--echo # +--echo # MDEV-29062 Wrong result set metadata for a mix of INT+ENUM +--echo # + +CREATE TABLE t1 +( + c_int INT, + c_set SET('1') +); + +CREATE TABLE t2 AS SELECT c_int FROM t1 UNION SELECT c_set FROM t1; +SHOW CREATE TABLE t2; +DROP TABLE t2; + +CREATE OR REPLACE TABLE t2 AS SELECT COALESCE(c_int, c_set) FROM t1; +SHOW CREATE TABLE t2; +DROP TABLE t2; + +--disable_ps_protocol +--enable_metadata +SELECT c_int FROM t1 UNION SELECT c_set FROM t1; +SELECT COALESCE(c_int, c_set) FROM t1; +--disable_metadata +--enable_ps_protocol + +DROP TABLE t1; diff --git a/mysql-test/suite/compat/oracle/r/sp-anchor-row-type-table.result b/mysql-test/suite/compat/oracle/r/sp-anchor-row-type-table.result index 9edec669908..b878042174b 100644 --- a/mysql-test/suite/compat/oracle/r/sp-anchor-row-type-table.result +++ b/mysql-test/suite/compat/oracle/r/sp-anchor-row-type-table.result @@ -21,7 +21,7 @@ Table Create Table t2 CREATE TABLE "t2" ( "a" int(11) DEFAULT NULL, "b" text DEFAULT NULL, - "c" char(1) DEFAULT NULL + "c" varchar(1) DEFAULT NULL ) DROP PROCEDURE p2; DROP PROCEDURE p1; diff --git a/mysql-test/suite/compat/oracle/r/sp.result b/mysql-test/suite/compat/oracle/r/sp.result index 44092c0be30..047fada5acb 100644 --- a/mysql-test/suite/compat/oracle/r/sp.result +++ b/mysql-test/suite/compat/oracle/r/sp.result @@ -1703,8 +1703,8 @@ t2 CREATE TABLE "t2" ( "t2" text DEFAULT NULL, "t3" mediumtext DEFAULT NULL, "t4" longtext DEFAULT NULL, - "enum1" char(1) DEFAULT NULL, - "set1" char(5) DEFAULT NULL, + "enum1" varchar(1) DEFAULT NULL, + "set1" varchar(5) DEFAULT NULL, "blob1" tinyblob DEFAULT NULL, "blob2" longblob DEFAULT NULL, "blob3" mediumblob DEFAULT NULL, @@ -1865,8 +1865,8 @@ t2 CREATE TABLE "t2" ( "t2" text DEFAULT NULL, "t3" mediumtext DEFAULT NULL, "t4" longtext DEFAULT NULL, - "enum1" char(1) DEFAULT NULL, - "set1" char(5) DEFAULT NULL, + "enum1" varchar(1) DEFAULT NULL, + "set1" varchar(5) DEFAULT NULL, "blob1" tinyblob DEFAULT NULL, "blob2" longblob DEFAULT NULL, "blob3" mediumblob DEFAULT NULL, @@ -2370,7 +2370,7 @@ t1 CREATE TABLE "t1" ( "a_flt0" float DEFAULT NULL, "a_dbl0" double DEFAULT NULL, "a_bit3" bit(3) DEFAULT NULL, - "a_enum0" char(1) DEFAULT NULL, + "a_enum0" varchar(1) DEFAULT NULL, "a_varchar10" varchar(10) DEFAULT NULL, "a_text1" text DEFAULT NULL, "a_tinytext1" tinytext DEFAULT NULL, @@ -2388,7 +2388,7 @@ t1 CREATE TABLE "t1" ( "aa_flt0" float DEFAULT NULL, "aa_dbl0" double DEFAULT NULL, "aa_bit3" bit(3) DEFAULT NULL, - "aa_enum0" char(1) DEFAULT NULL, + "aa_enum0" varchar(1) DEFAULT NULL, "aa_varchar10" varchar(10) DEFAULT NULL, "aa_text1" text DEFAULT NULL, "aa_tinytext1" tinytext DEFAULT NULL, diff --git a/mysql-test/suite/json/r/type_json.result b/mysql-test/suite/json/r/type_json.result index b9b70f24190..333e933eda9 100644 --- a/mysql-test/suite/json/r/type_json.result +++ b/mysql-test/suite/json/r/type_json.result @@ -113,7 +113,7 @@ def COALESCE(c0, c6) 254 30 1 Y 0 39 8 COALESCE(c0, c6) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(c0, c7) 254 30 1 Y 0 39 8 +def COALESCE(c0, c7) 253 30 1 Y 0 39 8 COALESCE(c0, c7) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr @@ -305,11 +305,11 @@ def COALESCE(c6, c6) 3 11 1 Y 32896 0 63 COALESCE(c6, c6) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(c6, c7) 254 11 1 Y 0 39 8 +def COALESCE(c6, c7) 253 11 1 Y 0 39 8 COALESCE(c6, c7) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(c7, c0) 254 30 1 Y 0 39 8 +def COALESCE(c7, c0) 253 30 1 Y 0 39 8 COALESCE(c7, c0) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr @@ -333,11 +333,11 @@ def COALESCE(c7, c5) 251 4294967295 1 Y 0 39 8 COALESCE(c7, c5) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(c7, c6) 254 11 1 Y 0 39 8 +def COALESCE(c7, c6) 253 11 1 Y 0 39 8 COALESCE(c7, c6) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(c7, c7) 254 1 1 Y 0 39 8 +def COALESCE(c7, c7) 253 1 1 Y 0 39 8 COALESCE(c7, c7) 1 CALL p1('t1', 'LEAST(colt1, colt2)'); @@ -370,7 +370,7 @@ def LEAST(c0, c6) 5 23 1 Y 32896 31 63 LEAST(c0, c6) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def LEAST(c0, c7) 254 30 1 Y 0 39 8 +def LEAST(c0, c7) 253 30 1 Y 0 39 8 LEAST(c0, c7) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr @@ -566,7 +566,7 @@ def LEAST(c6, c7) 5 17 1 Y 32896 0 63 LEAST(c6, c7) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def LEAST(c7, c0) 254 30 1 Y 0 39 8 +def LEAST(c7, c0) 253 30 1 Y 0 39 8 LEAST(c7, c0) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr @@ -594,7 +594,7 @@ def LEAST(c7, c6) 5 17 1 Y 32896 0 63 LEAST(c7, c6) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def LEAST(c7, c7) 254 1 1 Y 0 39 8 +def LEAST(c7, c7) 253 1 1 Y 0 39 8 LEAST(c7, c7) 1 CALL p1('t1', 'colt1+colt2'); @@ -884,7 +884,7 @@ def COALESCE(c0, c6) 254 30 1 Y 0 39 8 COALESCE(c0, c6) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(c0, c7) 254 30 1 Y 0 39 8 +def COALESCE(c0, c7) 253 30 1 Y 0 39 8 COALESCE(c0, c7) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr @@ -1076,11 +1076,11 @@ def COALESCE(c6, c6) 3 11 1 Y 32896 0 63 COALESCE(c6, c6) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(c6, c7) 254 11 1 Y 0 39 8 +def COALESCE(c6, c7) 253 11 1 Y 0 39 8 COALESCE(c6, c7) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(c7, c0) 254 30 1 Y 0 39 8 +def COALESCE(c7, c0) 253 30 1 Y 0 39 8 COALESCE(c7, c0) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr @@ -1104,11 +1104,11 @@ def COALESCE(c7, c5) 251 4294967295 1 Y 0 39 8 COALESCE(c7, c5) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(c7, c6) 254 11 1 Y 0 39 8 +def COALESCE(c7, c6) 253 11 1 Y 0 39 8 COALESCE(c7, c6) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(c7, c7) 254 1 1 Y 0 39 8 +def COALESCE(c7, c7) 253 1 1 Y 0 39 8 COALESCE(c7, c7) 1 CALL p1('t1c', 'LEAST(colt1, colt2)'); @@ -1141,7 +1141,7 @@ def LEAST(c0, c6) 5 23 1 Y 32896 31 63 LEAST(c0, c6) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def LEAST(c0, c7) 254 30 1 Y 0 39 8 +def LEAST(c0, c7) 253 30 1 Y 0 39 8 LEAST(c0, c7) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr @@ -1337,7 +1337,7 @@ def LEAST(c6, c7) 5 17 1 Y 32896 0 63 LEAST(c6, c7) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def LEAST(c7, c0) 254 30 1 Y 0 39 8 +def LEAST(c7, c0) 253 30 1 Y 0 39 8 LEAST(c7, c0) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr @@ -1365,7 +1365,7 @@ def LEAST(c7, c6) 5 17 1 Y 32896 0 63 LEAST(c7, c6) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def LEAST(c7, c7) 254 1 1 Y 0 39 8 +def LEAST(c7, c7) 253 1 1 Y 0 39 8 LEAST(c7, c7) 1 CALL p1('t1c', 'colt1+colt2'); @@ -1675,7 +1675,7 @@ def COALESCE(t1.c0, t2.c11) 254 30 1 Y 0 39 8 COALESCE(t1.c0, t2.c11) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(t1.c0, t2.c12) 254 30 1 Y 0 39 8 +def COALESCE(t1.c0, t2.c12) 253 30 1 Y 0 39 8 COALESCE(t1.c0, t2.c12) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr @@ -1987,11 +1987,11 @@ def COALESCE(t1.c6, t2.c11) 253 19 1 Y 0 39 8 COALESCE(t1.c6, t2.c11) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(t1.c6, t2.c12) 254 11 1 Y 0 39 8 +def COALESCE(t1.c6, t2.c12) 253 11 1 Y 0 39 8 COALESCE(t1.c6, t2.c12) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(t1.c7, t2.c0) 254 30 1 Y 0 39 8 +def COALESCE(t1.c7, t2.c0) 253 30 1 Y 0 39 8 COALESCE(t1.c7, t2.c0) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr @@ -2015,31 +2015,31 @@ def COALESCE(t1.c7, t2.c5) 251 4294967295 1 Y 0 39 8 COALESCE(t1.c7, t2.c5) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(t1.c7, t2.c6) 254 11 1 Y 0 39 8 +def COALESCE(t1.c7, t2.c6) 253 11 1 Y 0 39 8 COALESCE(t1.c7, t2.c6) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(t1.c7, t2.c7) 254 22 1 Y 0 39 8 +def COALESCE(t1.c7, t2.c7) 253 22 1 Y 0 39 8 COALESCE(t1.c7, t2.c7) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(t1.c7, t2.c8) 254 12 1 Y 0 39 8 +def COALESCE(t1.c7, t2.c8) 253 12 1 Y 0 39 8 COALESCE(t1.c7, t2.c8) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(t1.c7, t2.c9) 254 10 1 Y 0 39 8 +def COALESCE(t1.c7, t2.c9) 253 10 1 Y 0 39 8 COALESCE(t1.c7, t2.c9) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(t1.c7, t2.c10) 254 10 1 Y 0 39 8 +def COALESCE(t1.c7, t2.c10) 253 10 1 Y 0 39 8 COALESCE(t1.c7, t2.c10) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(t1.c7, t2.c11) 254 19 1 Y 0 39 8 +def COALESCE(t1.c7, t2.c11) 253 19 1 Y 0 39 8 COALESCE(t1.c7, t2.c11) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def COALESCE(t1.c7, t2.c12) 254 1 1 Y 0 39 8 +def COALESCE(t1.c7, t2.c12) 253 1 1 Y 0 39 8 COALESCE(t1.c7, t2.c12) 1 CALL p2('LEAST(t1.colt1, t2.colt2)'); @@ -2092,7 +2092,7 @@ def LEAST(t1.c0, t2.c11) 12 26 26 Y 128 6 63 LEAST(t1.c0, t2.c11) 0000-00-00 00:00:00.000000 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def LEAST(t1.c0, t2.c12) 254 30 1 Y 0 39 8 +def LEAST(t1.c0, t2.c12) 253 30 1 Y 0 39 8 LEAST(t1.c0, t2.c12) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr @@ -2408,7 +2408,7 @@ def LEAST(t1.c6, t2.c12) 5 17 1 Y 32896 0 63 LEAST(t1.c6, t2.c12) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def LEAST(t1.c7, t2.c0) 254 30 1 Y 0 39 8 +def LEAST(t1.c7, t2.c0) 253 30 1 Y 0 39 8 LEAST(t1.c7, t2.c0) 1 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr @@ -2456,7 +2456,7 @@ def LEAST(t1.c7, t2.c11) 12 19 19 Y 128 0 63 LEAST(t1.c7, t2.c11) 0000-00-00 00:00:00 Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def LEAST(t1.c7, t2.c12) 254 1 1 Y 0 39 8 +def LEAST(t1.c7, t2.c12) 253 1 1 Y 0 39 8 LEAST(t1.c7, t2.c12) 1 CALL p2('t1.colt1+t2.colt2'); diff --git a/sql/sql_type.cc b/sql/sql_type.cc index 8e150de7556..a76843e4296 100644 --- a/sql/sql_type.cc +++ b/sql/sql_type.cc @@ -1746,7 +1746,7 @@ Type_handler_time_common::type_handler_for_native_format() const const Type_handler *Type_handler_typelib::type_handler_for_item_field() const { - return &type_handler_string; + return &type_handler_varchar; }