-
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
table/tables: fix load partition when upgrade from an old TiDB #17971
Conversation
PTAL @crazycs520 @jackysp |
Codecov Report
@@ Coverage Diff @@
## master #17971 +/- ##
================================================
+ Coverage 79.4729% 79.6788% +0.2059%
================================================
Files 524 524
Lines 142110 142802 +692
================================================
+ Hits 112939 113783 +844
+ Misses 20043 19919 -124
+ Partials 9128 9100 -28 |
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
if err != nil { | ||
return 0, false | ||
} | ||
ret, isNull, err := tmp.EvalInt(sctx, chunk.Row{}) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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
/run-all-tests |
/run-all-tests |
/run-integration-common-test |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-4.0 in PR #17983 |
#17983 Signed-off-by: sre-bot <sre-bot@pingcap.com> Co-authored-by: tiancaiamao <tiancaiamao@gmail.com>
What problem does this PR solve?
Issue Number: close #17952
Problem Summary:
In the old version TiDB, partition definition store the less than XXX as raw expression.
It should be integer, the new version TiDB assert XXX is an integer.
What is changed and how it works?
What's Changed:
Add some code to handle compatibility.
How it Works:
If the less than expression is not an integer, try to parser it as expression and calculate the integer.
Related changes
Check List
Tests
I have manually test the binary with issue #17952 and it works.
Side effects
Ugly code
Release note