-
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
*: fix the problem that PointGet returns wrong results in the case of overflow #14776
Conversation
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.
Please resolve conflicts and fix ci.
PTAL @lzmhhh123 |
PTAL @lzmhhh123 @XuHuaiyu |
Codecov Report
@@ Coverage Diff @@
## master #14776 +/- ##
================================================
+ Coverage 80.3457% 80.4066% +0.0609%
================================================
Files 506 506
Lines 136968 137164 +196
================================================
+ Hits 110048 110289 +241
+ Misses 18304 18274 -30
+ Partials 8616 8601 -15 |
@@ -652,6 +653,9 @@ func tryPointGetPlan(ctx sessionctx.Context, selStmt *ast.SelectStmt) *PointGetP | |||
return nil | |||
} | |||
pi := tbl.GetPartitionInfo() | |||
if pi != nil && pi.Type != model.PartitionTypeHash { |
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.
Please add a comment why partitions rather than HashPartition
are not supported.
PS: It is actually not related to this PR, right?
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.
Yes, it's the original code, I only move it.
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.
Now, we only support for HashPartition
.
} | ||
col := model.FindColumnInfo(tbl.Cols(), colName.Name.Name.L) | ||
if col == nil || // Handling the case when the column is _tidb_rowid. | ||
(col.Tp == mysql.TypeString && col.Collate == charset.CollationBin) { // This type we needn't to pad `\0` in here. |
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.
Any test case for that? I don't know this is used for what.
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.
Yes. These tests already exist. The test case for the table of create table t(a binary(2) primary key, b binary(2));
table, like select * from t where a = "a ";
@crazycs520
@zimulala merge failed. |
/run-common-test |
/merge |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
Signed-off-by: sre-bot <[email protected]>
cherry pick to release-3.0 in PR #16753 |
Signed-off-by: sre-bot <[email protected]>
cherry pick to release-3.1 in PR #16754 |
cherry pick to release-4.0 in PR #16755 |
mysql> select * from t6 where a != 9223372036854775808; PTAL @zimulala |
@wjhuang2016 |
What problem does this PR solve?
Before this PR:
After this PR:
What is changed and how it works?
Do
ConvertTo
to the point-get value. Handling the overflow and truncated errors.Check List
Tests
Related changes
Release note