-
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: convert EOF error to ErrTruncate when parse duration #11865
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11865 +/- ##
===========================================
Coverage 82.0162% 82.0162%
===========================================
Files 438 438
Lines 100585 100585
===========================================
Hits 82496 82496
Misses 12491 12491
Partials 5598 5598 |
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
|
||
// fix issue 10308 | ||
result = tk.MustQuery("select time(\"- -\");") | ||
result.Check(testkit.Rows("00:00:00")) |
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.
would mysql through a warning?
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.
would mysql through a warning?
Both MySQL and TiDB through a warning:
mysql> show warnings;
+---------+------+---------------------------------------+
| Level | Code | Message |
+---------+------+---------------------------------------+
| Warning | 1292 | Truncated incorrect time value: '- -' |
+---------+------+---------------------------------------+
1 row in set (0.00 sec)
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.
Got it. Could you also test the warning message?
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.
Got it. Could you also test the warning message?
Done
cherry pick to release-2.1 failed |
cherry pick to release-3.0 in PR #11893 |
What problem does this PR solve?
fix #10308
What is changed and how it works?
convert EOF error to ErrTruncate
Check List
Tests
Code changes
Side effects
Related changes