-
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
Conversation
+ str_to_date('12:30:17', '%h:%i:%s') -> '00:30:17' + str_to_date('12:30:17PM', '%r') -> '12:30:17' str_to_date('12:30:17AM', '%r') -> '00:30:17'
Codecov Report
@@ Coverage Diff @@
## master #18428 +/- ##
================================================
+ Coverage 79.2508% 79.4463% +0.1955%
================================================
Files 542 535 -7
Lines 146131 144237 -1894
================================================
- Hits 115810 114591 -1219
+ Misses 20994 20369 -625
+ Partials 9327 9277 -50 |
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 |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
@dyzsr merge failed. |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-3.0 in PR #18725 |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-3.1 in PR #18726 |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-4.0 in PR #18727 |
Signed-off-by: ti-srebot <[email protected]>
Signed-off-by: ti-srebot <[email protected]>
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