Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The warning message of incorrect datetime is corrupt. #11304

Closed
SunRunAway opened this issue Jul 18, 2019 · 1 comment · Fixed by #11445
Closed

The warning message of incorrect datetime is corrupt. #11304

SunRunAway opened this issue Jul 18, 2019 · 1 comment · Fixed by #11445
Labels
component/expression good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/bug The issue is confirmed as a bug.

Comments

@SunRunAway
Copy link
Contributor

SunRunAway commented Jul 18, 2019

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.

SELECT ADDDATE('2008-01-34', -1);

  1. What did you expect to see?
mysql> SELECT ADDDATE('2008-01-34', -1);
+---------------------------+
| ADDDATE('2008-01-34', -1) |
+---------------------------+
| NULL                      |
+---------------------------+
1 row in set, 1 warning (0.00 sec)

mysql> show warnings;
+---------+------+----------------------------------------+
| Level   | Code | Message                                |
+---------+------+----------------------------------------+
| Warning | 1292 | Incorrect datetime value: '2008-01-34' |
+---------+------+----------------------------------------+
1 row in set (0.00 sec)
  1. What did you see instead?
mysql> SELECT ADDDATE('2008-01-34', -1);
+---------------------------+
| ADDDATE('2008-01-34', -1) |
+---------------------------+
| NULL                      |
+---------------------------+
1 row in set, 1 warning (0.00 sec)

mysql> show warnings;
+---------+------+-----------------------------------------+
| Level   | Code | Message                                 |
+---------+------+-----------------------------------------+
| Warning | 1292 | Incorrect datetime value: '%!s(int=34)' |
+---------+------+-----------------------------------------+
1 row in set (0.00 sec)
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
    651632e in master branch
@SunRunAway SunRunAway added type/bug The issue is confirmed as a bug. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. component/expression labels Jul 18, 2019
@ono-yoko
Copy link
Contributor

@SunRunAway I am interesting in this issue. I am filling a PR to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants