Skip to content
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) #16753

Merged
merged 3 commits into from
Apr 30, 2020

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Apr 23, 2020

cherry-pick #14776 to release-3.0

Conflict file:
planner/core/point_get_plan.go


What problem does this PR solve?

tidb> create table t6 (a bigint);
Query OK, 0 rows affected (0.00 sec)
tidb> insert into t6 values(9223372036854775807);
Query OK, 1 row affected (0.00 sec)
tidb> alter table t6 add unique key idx(a);
Query OK, 0 rows affected (0.04 sec)

Before this PR:

tidb> select * from t6 where a = 9223372036854775808;
+---------------------+
| a                   |
+---------------------+
| 9223372036854775807 |
+---------------------+
1 row in set, 1 warning (0.01 sec)

After this PR:

tidb>  select * from t6 where a = 9223372036854775808;
Empty set (0.00 sec)

What is changed and how it works?

Do ConvertTo to the point-get value. Handling the overflow and truncated errors.

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

Release note

  • Write release note for bug-fix or new feature.

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 23, 2020

/run-all-tests

Copy link
Contributor

@AilinKid AilinKid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bb7133 bb7133 added the status/can-merge Indicates a PR has been approved by a committer. label Apr 30, 2020
@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 30, 2020

/run-all-tests

@sre-bot sre-bot merged commit 0be031a into pingcap:release-3.0 Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution status/can-merge Indicates a PR has been approved by a committer. type/bugfix This PR fixes a bug. type/3.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants