Description:
mysql> select extract(minute_microsecond from '2018-02-01');
+-----------------------------------------------+
| extract(minute_microsecond from '2018-02-01') |
+-----------------------------------------------+
| 2018000000 |
+-----------------------------------------------+
1 row in set, 1 warning (0.03 sec)
How to repeat:
select extract(minute_microsecond from '2018-02-01');
Suggested fix:
I don't think this result is reasonable, but I'm not sure what the correct result is. Mabey it should return the same result with the following sqls.
mysql> select extract(minute_microsecond from cast('2018-02-01' as datetime));
+-----------------------------------------------------------------+
| extract(minute_microsecond from cast('2018-02-01' as datetime)) |
+-----------------------------------------------------------------+
| 0 |
+-----------------------------------------------------------------+
1 row in set (0.04 sec)
mysql> select extract(minute_microsecond from cast('2018-02-01' as date));
+-------------------------------------------------------------+
| extract(minute_microsecond from cast('2018-02-01' as date)) |
+-------------------------------------------------------------+
| 0 |
+-------------------------------------------------------------+
1 row in set (0.06 sec)