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

planner: fix panic of merge join for tables with redundant indexes #15840

Merged
merged 2 commits into from
Mar 31, 2020

Conversation

eurekaka
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #15813

Problem Summary:
MergeJoin for tables with redundant index would panic.

What is changed and how it works?

Proposal: xxx

What's Changed:
Use length of de-duplicated conditions instead of original length for declaring slice in moveEqualToOtherConditions.

How it Works:

Avoid the capacity of slice to be out of bound.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Side effects

N/A

Release note

@eurekaka eurekaka added type/bugfix This PR fixes a bug. sig/planner SIG: Planner needs-cherry-pick-4.0 labels Mar 30, 2020
@eurekaka eurekaka requested a review from a team as a code owner March 30, 2020 07:14
@ghost ghost requested review from lzmhhh123 and removed request for a team March 30, 2020 07:14
@codecov
Copy link

codecov bot commented Mar 30, 2020

Codecov Report

Merging #15840 into master will decrease coverage by 0.0495%.
The diff coverage is 100%.

@@               Coverage Diff                @@
##             master     #15840        +/-   ##
================================================
- Coverage   80.4676%   80.4181%   -0.0496%     
================================================
  Files           505        505                
  Lines        135043     135028        -15     
================================================
- Hits         108666     108587        -79     
- Misses        17889      17936        +47     
- Partials       8488       8505        +17

@eurekaka
Copy link
Contributor Author

/rebuild

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

@eurekaka
Copy link
Contributor Author

/rebuild

2 similar comments
@eurekaka
Copy link
Contributor Author

/rebuild

@eurekaka
Copy link
Contributor Author

/rebuild

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
Copy link
Member

do we need to cherry pick to other releases?

@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. labels Mar 31, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Mar 31, 2020

Your auto merge job has been accepted, waiting for 15853, 15757

@sre-bot
Copy link
Contributor

sre-bot commented Mar 31, 2020

/run-all-tests

@sre-bot sre-bot merged commit 10de222 into pingcap:master Mar 31, 2020
sre-bot pushed a commit to sre-bot/tidb that referenced this pull request Mar 31, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Mar 31, 2020

cherry pick to release-2.1 in PR #15918

sre-bot pushed a commit to sre-bot/tidb that referenced this pull request Mar 31, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Mar 31, 2020

cherry pick to release-3.0 in PR #15919

sre-bot pushed a commit to sre-bot/tidb that referenced this pull request Mar 31, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Mar 31, 2020

cherry pick to release-3.1 in PR #15920

@sre-bot
Copy link
Contributor

sre-bot commented Mar 31, 2020

cherry pick to release-4.0 in PR #15921

@eurekaka eurekaka deleted the panic branch April 1, 2020 03:01
eurekaka added a commit that referenced this pull request Apr 1, 2020
eurekaka added a commit that referenced this pull request Apr 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/planner SIG: Planner 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Join on tables with redundant indexes causes a server panic
4 participants