-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
str_to_date
is not compatible with MySQL under some input
#24928
Comments
refer #21887 |
I've filed a PR #25386 to fix the second part, some incompatible parsing result. To be specific
For the cases that: Parsing the day that does not exist in the real world / Parsing the "Feb 29th" for leap year and non-leap year, I find that there is an variable "ALLOW_INVALID_DATES" in |
I think we can lower the severity after #25386 merged. Since "%D","%j","%U","%u","%V","%v","%W","%w","%X","%x","%%" are not strongly required form our known users. |
This issue is not under active development after #25386 merged. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I tried it in mysql 8.2.0, and get the following result.
Then, I tried the above sqls in tidb(nightly) with commit hash 3419bde and get the same result. So I think that tidb has no compatible problem with MySQL now. |
/close |
@xzhangxian1008: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Bug Report
Please answer these questions before submitting your issue. Thanks!
A related question from asktug
@tiancaiamao Have filed a PR for supporting "%X","%V","%W" in types: support %X %V %W formats for STR_TO_DATE() #21887, but it didn't get reviewed and merged
str_to_date
#25386)Some incompatible parsing result, I will list some examples in the following sections- '%b'/'%M' should be case insensitive
- Parsing an empty string
- Parsing the day that does not exist in the real world
- Parsing the "Feb 29th" for leap year and non-leap year
- Parsing some input for "%r" and "%T"
1. Minimal reproduce step (Required)
str_to_date
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: