Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL)
Description
CREATE OR REPLACE TABLE t1 AS SELECT |
LEAST(_latin1'aaa',_utf8 0xC39F) AS c1, |
COALESCE(_latin1'aaa',_utf8 0xC39F) AS c2; |
SHOW WARNINGS;
|
SHOW CREATE TABLE t1; |
SELECT * FROM t1; |
returns a warning:
+---------+------+-----------------------------------------+
|
| Level | Code | Message |
|
+---------+------+-----------------------------------------+
|
| Warning | 1265 | Data truncated for column 'c1' at row 1 |
|
+---------+------+-----------------------------------------+
|
and this result:
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| t1 | CREATE TABLE `t1` (
|
`c1` varchar(1) CHARACTER SET utf8 NOT NULL DEFAULT '',
|
`c2` varchar(3) CHARACTER SET utf8 NOT NULL DEFAULT ''
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
+----+-----+
|
| c1 | c2 |
|
+----+-----+
|
| a | aaa |
|
+----+-----+
|
Notice:
- The data type for column c1 is wrong. It should be varchar(3)), similar to c2
- The result for column c1 is wrong. It should be aaa.
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
- Closed
- relates to
-
MDEV-12506 Split Item_func_min_max::fix_length_and_dec() into methods in Type_handler
- Closed