|
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.
|