Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.5, 11.6(EOL)
-
None
Description
CREATE OR REPLACE TABLE t1 (a CHAR(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci); |
INSERT INTO t1 VALUES ('1x'), ('x'); |
SELECT a,CAST(a AS DOUBLE) FROM t1 ORDER BY a; |
+------+-------------------+
|
| a | CAST(a AS DOUBLE) |
|
+------+-------------------+
|
| 1x | 1 |
|
| x | 0 |
|
+------+-------------------+
|
SHOW WARNINGS;
|
+---------+------+----------------------------------------------------------+
|
| Level | Code | Message |
|
+---------+------+----------------------------------------------------------+
|
| Warning | 1292 | Truncated incorrect DOUBLE value: '1x ' |
|
| Warning | 1292 | Truncated incorrect DOUBLE value: 'x ' |
|
+---------+------+----------------------------------------------------------+
|
Notice extra trailing spaces in the warning text. There should not be trailing spaces:
- The column values are just '1x' and 'x' because sql_mode=PAD_CHAR_TO_FULL_LENGTH is not set.
- Moreover, the number of trailing spaces is more than the column character length (which is 5).
Attachments
Issue Links
- blocks
-
MDEV-19123 Change default charset from latin1 to utf8mb4
- Closed