-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
expression: fix incorrect proto fields and add missing overflow handling for arithmatic functions #12858
Conversation
Signed-off-by: H-ZeX <[email protected]>
/build |
/rebuild |
/run-all-tests |
Signed-off-by: H-ZeX <[email protected]>
Signed-off-by: H-ZeX <[email protected]>
Signed-off-by: H-ZeX <[email protected]>
/tests |
/run-all-tests |
Signed-off-by: H-ZeX <[email protected]>
/run-all-tests |
Codecov Report
@@ Coverage Diff @@
## master #12858 +/- ##
================================================
- Coverage 80.1454% 80.1247% -0.0207%
================================================
Files 469 469
Lines 111239 111239
================================================
- Hits 89153 89130 -23
- Misses 15200 15224 +24
+ Partials 6886 6885 -1 |
@qw4990 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
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 13198, 13200 |
/run-all-tests |
@H-ZeX merge failed. |
/run-unit-test |
cherry pick to release-3.0 failed |
cherry pick to release-2.1 failed |
cherry pick to release-3.1 failed |
@H-ZeX Please cherry-pick this PR to 2.1/3.0/3.1. |
…ing for arithmatic functions (pingcap#12858) Signed-off-by: H-ZeX <[email protected]>
It seems that, not for sure, we failed to cherry-pick this commit to release-2.1 release-3.0. Please comment '/run-cherry-picker' to try to trigger the cherry-picker if we did fail to cherry-pick this commit before. @lonng PTAL. |
/run-cherry-picker |
Signed-off-by: sre-bot <[email protected]>
cherry pick to release-2.1 in PR #16245 |
Signed-off-by: sre-bot <[email protected]>
cherry pick to release-3.0 in PR #16246 |
Signed-off-by: H-ZeX [email protected]
What problem does this PR solve?
expression: Fix some bug of cast that detected by tikv/copr-test#4
What is changed and how it works?
ctx
, fix them by handle the err withctx
.select 1 / '2007' div 1;
will fail with this err msgFor float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '').
because in
arithmeticDivideFunctionClass.setType4DivReal
, it set the decimal to 31 while flen is 23. Then afterbuiltinCastRealAsDecimalSig.evalDecimal
is called , it will fail inProduceDecWithSpecifiedTp
expression/builtin_arithmetic.go
: Without this change, the errMsg is likeBIGINT UNSIGNED value is out of range in '(Column#1 - Column#2)
, has no concrete number.server/conn.go
: Many error (such aserrors.withStack
)'serr
field is ofterror.Error
type, but themeself are not ofterror.Error
type. So origin code will hide the origin err code. Same instore/mockstore/mocktikv/cop_handler_dag.go
'stoPBError
.Check List
Related changes
Release note
TODO