-
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
types: fix STR_TO_DATE handling for %h, %r (#18171) (#18428) #18725
types: fix STR_TO_DATE handling for %h, %r (#18171) (#18428) #18725
Conversation
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
/run-all-tests |
@dyzsr please accept the invitation then you can push to the cherry-pick pull requests. |
types/format_test.go
Outdated
======= | ||
{`12:43:24`, `%h:%i:%s`, types.FromDate(0, 0, 0, 0, 43, 24, 0)}, | ||
{`abc`, `abc`, types.ZeroCoreTime}, | ||
>>>>>>> cc0b6f1... types: fix STR_TO_DATE handling for %h, %r (#18171) (#18428) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please resolve conflicts. @dyzsr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
/run-all-tests |
@ti-srebot merge failed. |
/run-unit-test |
/merge |
Sorry @XuHuaiyu, you don't have permission to trigger auto merge event on this branch. |
@qw4990 can merge now |
I have no permission, PTAL @zz-jason @SunRunAway |
/merge |
/run-all-tests |
cherry-pick #18428 to release-3.0
What problem does this PR solve?
Issue Number: close #18171
Problem Summary: Behavior of function
STR_TO_DATE
is not compatible with MySQL.What is changed and how it works?
What's Changed:
How it Works:
mysqlTimeFix
inspects the occurrence of '%h', '%p' and whether the hour part is 12.time12Hour
now fixes the time when the hour part is 12.Tests
Side effects
No.
Release note