-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Date function is not compatible with Mysql #22530
Comments
Looks like it's a bug of MySQL. result of PostgreSQl-8.4 is same with TiDB. 6 means Saturday. doc:
We can also write a Go program to verify. The result is Saturday.
MySQL and PostgreSQL both use proleptic Gregorian calendar, which is required by standard SQL. Not sure for now why MySQL's result is Sunday. |
According to wikipedia, 1 BC starts on Saturday. Year zero exists in ISO8601 where it coincides with the Gregorian year 1 BC(here) So i believe it's MySQL's bug. bug report. PS: str_to_date doesn't support %./%#/%@, need to fix. |
Please edit this comment or add a new comment to complete the following informationNot a bug
Duplicate bug
BugNote: Make Sure that 'component', and 'severity' labels are added 1. Root Cause Analysis (RCA) (optional)2. Symptom (optional)3. All Trigger Conditions (optional)4. Workaround (optional)5. Affected versions[v2.0.0:v2.0.11], [v2.1.0:v2.1.19],[v3.0.0:v3.0.20],[v4.0.0:v4.0.10],[v5.0.0-rc] 6. Fixed versionsmaster |
( AffectedVersions ) fields are empty. |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
mysql: 8.0.23
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: