-
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: match MySQL behavior with datetime delimiters #17376
Conversation
The unit-test is failed. Please fix them. Thanks!
|
@Reminiscent Oops. I missed that one. I have fixed the integration test, it used Just for the record, I tested on MySQL 8 with the following: create database if not exists test;
use test;
drop table if exists t;
create table t(a datetime, b timestamp, c time);
insert into t values("2017 01-01 12:30:31", "2017 01-01 12:30:31", "01:01:01"); This produces:
I still have 4 unit tests failing locally, but they fail on master too. They are probably related to #17013 |
Codecov Report
@@ Coverage Diff @@
## master #17376 +/- ##
===========================================
Coverage 79.9031% 79.9031%
===========================================
Files 520 520
Lines 140385 140385
===========================================
Hits 112172 112172
Misses 19248 19248
Partials 8965 8965 |
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 @Reminiscent PTAL
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. Great work!
/run-all-tests |
@smola merge failed. |
/merge |
/run-all-tests |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-3.0 in PR #17499 |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-3.1 in PR #17500 |
cherry pick to release-4.0 in PR #17501 |
* cherry pick #17376 to release-3.0 Signed-off-by: sre-bot <sre-bot@pingcap.com> * solve conflicts * address comments Co-authored-by: Santiago M. Mola <santi@mola.io> Co-authored-by: Reminiscent <y870414423@gmail.com> Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
What problem does this PR solve?
Issue Number: close #17277
Problem Summary:
select date '2020-02--1'
failsWhat is changed and how it works?
types.ParseDateFormat
changed datetime splitting to match MySQL 5.7.T
are valid delimiters if they appear between time and date.-./
orT/TT
).types.ParseDuration
, since it has additional validation.Check List
Backwards compatibility
T
andT
orRelease note