-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
challenge-programcomponent/expressionhelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.severity/majorsig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
-
What did you do?
If possible, provide a recipe for reproducing the error. -
What did you expect to see?
mysql> SELECT DAY(120.000), DAYOFMONTH(0.000), DAYOFMONTH(0);
+--------------+-------------------+---------------+
| DAY(120.000) | DAYOFMONTH(0.000) | DAYOFMONTH(0) |
+--------------+-------------------+---------------+
| 20 | 0 | 0 |
+--------------+-------------------+---------------+
1 row in set (0.00 sec)- What did you see instead?
mysql> SELECT DAY(120.000), DAYOFMONTH(0.000), DAYOFMONTH(0);
+--------------+-------------------+---------------+
| DAY(120.000) | DAYOFMONTH(0.000) | DAYOFMONTH(0) |
+--------------+-------------------+---------------+
| NULL | NULL | NULL |
+--------------+-------------------+---------------+
1 row in set, 3 warnings (0.00 sec)
mysql> show warnings;
+---------+------+--------------------------------------------------------+
| Level | Code | Message |
+---------+------+--------------------------------------------------------+
| Warning | 1292 | invalid time format: '120.000' |
| Warning | 1292 | invalid time format: '0.000' |
| Warning | 1292 | Incorrect datetime value: '0000-00-00 00:00:00.000000' |
+---------+------+--------------------------------------------------------+
3 rows in set (0.00 sec)- What version of TiDB are you using (
tidb-server -Vor runselect tidb_version();on TiDB)?
fdbc149
SIG slack channel
Score
- 300
Mentor
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
challenge-programcomponent/expressionhelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.severity/majorsig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.