Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
-
None
Description
I run this command
mysql --column-type-info test
|
and execute the following script:
CREATE OR REPLACE TABLE t1 (a INT UNSIGNED, b TIMESTAMP); |
SELECT COALESCE(a,b) FROM t1; |
Field 1: `COALESCE(a,b)`
|
Catalog: `def`
|
Database: ``
|
Table: ``
|
Org_table: ``
|
Type: VAR_STRING
|
Collation: utf8_general_ci (33)
|
Length: 57
|
Max_length: 0
|
Decimals: 39
|
Flags: UNSIGNED
|
Note, in prints the UNSIGNED flag, although this flag is not applicable to VAR_STRING.
Note, this script correctly creates a column of the VARCHAR data type without any UNSIGNED flags:
CREATE OR REPLACE TABLE t1 (a INT UNSIGNED, b TIMESTAMP); |
CREATE OR REPLACE TABLE t2 AS SELECT COALESCE(a,b) AS c FROM t1;
|
SHOW CREATE TABLE t2;
|
+-------+--------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+--------------------------------------------------------------------------------------------------------------+
|
| t2 | CREATE TABLE `t2` (
|
`c` varchar(19) CHARACTER SET utf8 DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+--------------------------------------------------------------------------------------------------------------+
|
Result field metadata should be fixed to match the column type created in CREATE..SELECT.
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
- Closed