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

executor: fix unique index point get read with delete first (#16965) #16991

Merged
merged 2 commits into from
May 7, 2020

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented May 6, 2020

cherry-pick #16965 to release-4.0


What problem does this PR solve?

Problem Summary:

PointGet executor should process deleted index record with zero value length

mysql> create table uk(c1 int primary key, c2 int unique key);
Query OK, 0 rows affected (0.01 sec)

mysql> insert into uk values(1, 77);
Query OK, 1 row affected (0.00 sec)

mysql> begin;
Query OK, 0 rows affected (0.00 sec)

mysql> delete from uk where c1 = 1;
Query OK, 1 row affected (0.00 sec)

mysql> select * from uk where c2 = 77;
ERROR 1105 (HY000): runtime error: index out of range [7] with length 0

What is changed and how it works?

What's Changed:
Check index value got with zero-length

How it Works:

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Side effects

Release note

  • Fix the panic issue that occurs when executing the PointGet query after the delete operation

@sre-bot sre-bot requested a review from a team as a code owner May 6, 2020 11:27
@sre-bot
Copy link
Contributor Author

sre-bot commented May 6, 2020

/run-all-tests

@cfzjywxk
Copy link
Contributor

cfzjywxk commented May 6, 2020

/run-check_release_note

@jackysp
Copy link
Member

jackysp commented May 6, 2020

/rebuild

Copy link
Member

@jackysp jackysp 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
Contributor

@lzmhhh123 lzmhhh123 left a comment

Choose a reason for hiding this comment

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

LGTM

@jackysp
Copy link
Member

jackysp commented May 7, 2020

/merge

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

sre-bot commented May 7, 2020

/run-all-tests

@sre-bot
Copy link
Contributor Author

sre-bot commented May 7, 2020

@sre-bot merge failed.

@jackysp
Copy link
Member

jackysp commented May 7, 2020

/rebuild

1 similar comment
@lysu
Copy link
Contributor

lysu commented May 7, 2020

/rebuild

@jackysp jackysp merged commit a01f6ad into pingcap:release-4.0 May 7, 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/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants