Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL), 10.3(EOL)
Description
This problem is similar to MDEV-12852.
It's repeatable in 10.2, as well as in 10.1 with sql_mode=STRICT_ALL_TABLES set.
CREATE TABLE t1 AS SELECT CAST('-1' AS UNSIGNED); |
ERROR 1264 (22003): Out of range value for column 'CAST('-1' AS UNSIGNED)' at row 1
|
CREATE TABLE t1 AS SELECT CAST('-1' AS UNSIGNED) LIMIT 0; |
SHOW CREATE TABLE t1; |
+-------+----------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+----------------------------------------------------------------------------------------------------------------+
|
| t1 | CREATE TABLE `t1` (
|
`CAST('-1' AS UNSIGNED)` int(2) unsigned NOT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+----------------------------------------------------------------------------------------------------------------+
|
Notice, int(2) is wrong. The expected type is BIGINT(20).
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
- Closed
- relates to
-
MDEV-12849 Out-of-range errors when casting hex-hybrid to SIGNED and UNSIGNED
- Closed
-
MDEV-12852 Out-of-range errors when CAST(1-2 AS UNSIGNED)
- Closed