Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
5.3.12, 10.1, 10.2, 10.3, 10.4, 10.5
-
None
-
None
Description
mysql> select to_days('0000-01-01'), date(time('32 00:00:00')),to_days(date(time('32 00:00:00')));
|
+-----------------------+---------------------------+------------------------------------+
|
| to_days('0000-01-01') | date(time('32 00:00:00')) | to_days(date(time('32 00:00:00'))) |
|
+-----------------------+---------------------------+------------------------------------+
|
| 1 | 0000-01-01 | NULL |
|
+-----------------------+---------------------------+------------------------------------+
|
1 row in set, 1 warning (0.00 sec)
|
 |
mysql> show warnings;
|
+---------+------+---------------------------------------+
|
| Level | Code | Message |
|
+---------+------+---------------------------------------+
|
| Warning | 1292 | Incorrect datetime value: '768:00:00' |
|
+---------+------+---------------------------------------+
|
1 row in set (0.00 sec)
|
The expected result for the third column is 1, without warnings.
Or the other way around, date(time('32 00:00:00')) should return NULL.