Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1(EOL), 10.2(EOL), 10.3(EOL)
Description
SET sql_mode=STRICT_ALL_TABLES; |
CREATE OR REPLACE TABLE t1 AS SELECT @a:=EXTRACT(MINUTE_MICROSECOND FROM '2001-01-01 11:22:33.999999') AS c1; |
ERROR 1264 (22003): Out of range value for column 'c1' at row 1
|
Note, the special thing about EXTRACT(MINUTE_MICROSECOND) is that its max_length is set to 10, which makes its data type ambiguous between INT and BIGINT. All other EXTRACT types determine the data type from length unambiguously.
The correct data type is BIGINT, but Item_func::create_tmp_field() does not handle it properly and creates an INT column instead.
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
- Closed
- relates to
-
MDEV-12858 Out-of-range error for CREATE..SELECT unsigned_int_column+1
- Closed
-
MDEV-12860 Out-of-range error on CREATE..SELECT with a view using MAX and EXTRACT(MINUTE_MICROSECOND..)
- Closed