Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.0.4
-
None
-
None
-
None
Description
CREATE TABLE t1 AS SELECT DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE) AS a; |
SHOW COLUMNS FROM t1; |
correctly reports a VARCHAR column:
+-------+-------------+------+-----+---------+-------+ |
| Field | Type | Null | Key | Default | Extra | |
+-------+-------------+------+-----+---------+-------+ |
| a | varchar(26) | YES | | NULL | | |
+-------+-------------+------+-----+---------+-------+ |
But "mysql --column-type-info" reports a wrong result:
$ mysql --column-type-info |
 |
MariaDB [(none)]> SELECT DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE); |
Field 1: `DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE)` |
Type: STRING
|
Collation: binary (63) |
Length: 26
|
Max_length: 19
|
Decimals: 31
|
Flags: BINARY |
+----------------------------------------------------+ |
| DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE) | |
+----------------------------------------------------+ |
| 2011-01-02 12:14:14 |
|
+----------------------------------------------------+ |
Notice, collation binary(63), which implies a VARBINARY column type,
and which is wrong.
MySQL-5.6 in the same scenario returns "Collation: utf8_general_ci (33)",
which looks correct and corresponds to the connection character set ut8.