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) #16755

Merged
merged 4 commits into from
Apr 23, 2020

Conversation

sre-bot
Copy link
Contributor

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

cherry-pick #14776 to release-4.0


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 sre-bot requested review from a team as code owners April 23, 2020 07:22
@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 23, 2020

/run-all-tests

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 23, 2020
Copy link
Contributor

@SunRunAway SunRunAway left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Apr 23, 2020
@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 23, 2020

Your auto merge job has been accepted, waiting for:

  • 16675

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 23, 2020

/run-all-tests

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 23, 2020

@sre-bot merge failed.

@zz-jason
Copy link
Member

/run-check_dev

@zz-jason zz-jason merged commit 632f9a8 into pingcap:release-4.0 Apr 23, 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. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug. type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants