*: add_date can return mysql.Time#9830
Conversation
|
The overflow checking is not finished. And i think the previous add_date will cause overflow too... |
| "github.com/pingcap/tidb/util/testleak" | ||
| ) | ||
|
|
||
| func TestT(t *testing.T) { |
Codecov Report
@@ Coverage Diff @@
## master #9830 +/- ##
================================================
- Coverage 77.1152% 77.0556% -0.0597%
================================================
Files 412 412
Lines 86337 86457 +120
================================================
+ Hits 66579 66620 +41
- Misses 14672 14730 +58
- Partials 5086 5107 +21 |
| return ZeroDuration, err | ||
| } | ||
| // MONTH must exceed the limit of mysql's duration. So just return overflow error. | ||
| return ZeroDuration, ErrDatetimeFunctionOverflow.GenWithStackByArgs("time") |
There was a problem hiding this comment.
So why not ignore line 1902~1905 ?
There was a problem hiding this comment.
Oh, my concern is that though it must exceed the limit, should we raise the overflow error when the content cannot be formatted in fact?
There was a problem hiding this comment.
is it controlled by a certain sql mode?
|
@winoros Please update this pr branch with the latest master |
|
Wait for #10329 merged first. |
|
/run-all-tests |
|
LGTM |
What problem does this PR solve?
to #9813
What is changed and how it works?
Implement things according to MySQL source code.
Check List
Tests
Side effects
Related changes