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,planner: fix update join update unmatched outer row #23491

Merged
merged 16 commits into from
Mar 26, 2021
Merged

executor,planner: fix update join update unmatched outer row #23491

merged 16 commits into from
Mar 26, 2021

Conversation

lysu
Copy link
Contributor

@lysu lysu commented Mar 23, 2021

What problem does this PR solve?

Issue Number: close #23482

Problem Summary:

  • 658132f make non-clustered table's outer row be update
  • clustered index implement has some TODO indicate that not be right handle

What is changed and how it works?

What's Changed, How it Works:

  • in UpdateExec.prepare(called for each row) set UpdateExec.updatable with right value
  • choose any one column in CommonHandle to check is it NULL row generated by unmatched outer row

Related changes

  • Need to cherry-pick to the release branch 5.0

Check List

Tests

  • Unit test

Side effects

  • n/a

Release note

  • No release note

This change is Reviewable

@lysu lysu added the type/bugfix This PR fixes a bug. label Mar 23, 2021
@lysu lysu requested review from a team as code owners March 23, 2021 12:59
@lysu lysu requested review from wshwsh12 and lzmhhh123 and removed request for a team March 23, 2021 12:59
@ti-chi-bot ti-chi-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 23, 2021
@ti-chi-bot ti-chi-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 23, 2021
@github-actions github-actions bot added the sig/execution SIG execution label Mar 23, 2021
@lysu
Copy link
Contributor Author

lysu commented Mar 23, 2021

/run-all-tests

@lysu lysu requested review from dyzsr and coocood March 23, 2021 13:30
@ichn-hu ichn-hu mentioned this pull request Mar 23, 2021
executor/update.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 24, 2021
@lysu lysu added this to the v5.0.0 ga milestone Mar 24, 2021
updt.PartitionedTable = b.partitionedTable
updt.tblID2Table = tblID2table
Copy link
Contributor

Choose a reason for hiding this comment

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

tblID2Table is built twice, once in PlanBuilder.buildUpdate building from tblID2Handle, another is in executorBuilder.buildUpdate building from TblColPosInfos. And they are quite similar.

Can we remove the one in Update plan, if the only usage of Update.tblID2Table is for CheckUpdateList?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dyzsr great idea, but it seems executorBuilder.buildUpdate take care more about partitions?

how about add another issue to improve it? this's PR is release-block bugfix, introduce addition modification is high risk

@lysu lysu added the priority/release-blocker This issue blocks a release. Please solve it ASAP. label Mar 25, 2021
@jackysp
Copy link
Member

jackysp commented Mar 25, 2021

/lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 25, 2021
@lysu
Copy link
Contributor Author

lysu commented Mar 26, 2021

@coocood @dyzsr PTAL

@dyzsr
Copy link
Contributor

dyzsr commented Mar 26, 2021

/lgtm

@ti-chi-bot
Copy link
Member

@dyzsr: /lgtm is only allowed for the reviewers in list.

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

executor/builder.go Outdated Show resolved Hide resolved
Co-authored-by: tangenta <tangenta@126.com>
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • jackysp
  • tangenta

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 26, 2021
@lysu
Copy link
Contributor Author

lysu commented Mar 26, 2021

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: c3d8567

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 26, 2021
@lysu
Copy link
Contributor Author

lysu commented Mar 26, 2021

/merge

@lysu
Copy link
Contributor Author

lysu commented Mar 26, 2021

/rebuild

@ti-chi-bot ti-chi-bot merged commit 961cd66 into pingcap:master Mar 26, 2021
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Mar 26, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-5.0 in PR #23596

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-5.0 priority/release-blocker This issue blocks a release. Please solve it ASAP. sig/execution SIG execution sig/sql-infra SIG: SQL Infra size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. 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.

update right columns in left join report wrong null check error when no match record in right side
7 participants