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

select date '2020-02--1' fails #17277

Closed
SunRunAway opened this issue May 19, 2020 · 0 comments · Fixed by #17376
Closed

select date '2020-02--1' fails #17277

SunRunAway opened this issue May 19, 2020 · 0 comments · Fixed by #17376
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. severity/moderate type/bug The issue is confirmed as a bug.
Milestone

Comments

@SunRunAway
Copy link
Contributor

SunRunAway commented May 19, 2020

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> select date '2020-02--1';
ERROR 1292 (22007): Incorrect datetime value: '2020-02--1'
mysql> select convert('2020-02--1' , date);
+------------------------------+
| convert('2020-02--1' , date) |
+------------------------------+
| NULL                         |
+------------------------------+
1 row in set, 1 warning (0.00 sec)

2. What did you expect to see? (Required)

mysql> select date '2020-02--1';
+-------------------+
| date '2020-02--1' |
+-------------------+
| 2020-02-01        |
+-------------------+
1 row in set (0.00 sec)

mysql> select convert('2020-02--1' , date);
+------------------------------+
| convert('2020-02--1' , date) |
+------------------------------+
| 2020-02-01                   |
+------------------------------+
1 row in set (0.00 sec)

3. Affected version (Required)

master(e0ec3e3)

4. Root Cause Analysis

@SunRunAway SunRunAway added type/bug The issue is confirmed as a bug. component/expression labels May 19, 2020
@SunRunAway SunRunAway added 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. labels May 19, 2020
@zz-jason zz-jason modified the milestones: v4.0.1, v4.0.2 Jun 2, 2020
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. severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants