tidb icon indicating copy to clipboard operation
tidb copied to clipboard

executor: do not append extra cols to the old row when `updateDupRow` (#33656)

Open ti-srebot opened this issue 3 years ago • 5 comments

cherry-pick #33656 to release-6.1 You can switch your code base to this Pull Request by using git-extras:

# In tidb repo:
git pr https://github.com/pingcap/tidb/pull/35168

After apply modifications, you can push your change to this PR via:

git push [email protected]:ti-srebot/tidb.git pr/35168:release-6.1-b860500988e0

Signed-off-by: zyguan [email protected]

What problem does this PR solve?

Issue Number: close #33608

Problem Summary:

What is changed and how it works?

We append extra datums to the old row to resolve https://github.com/pingcap/tidb/issues/14164 , however it breaks binlog. We need to prevent binlogRow from including those extra datums. This PR keep the old row unchanged and pass the extra cols info to doDupRowUpdate.

Check List

Tests

  • [x] Unit test
  • [ ] Integration test
  • [ ] Manual test (add detailed scripts or steps below)
  • [ ] No code

Side effects

  • [ ] Performance regression: Consumes more CPU
  • [ ] Performance regression: Consumes more Memory
  • [ ] Breaking backward compatibility

Documentation

  • [ ] Affects user behaviors
  • [ ] Contains syntax changes
  • [ ] Contains variable changes
  • [ ] Contains experimental features
  • [ ] Changes MySQL compatibility

Release note

Fixed an issue where extra datums may break binlog.

ti-srebot avatar Jun 06 '22 07:06 ti-srebot

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • cfzjywxk
  • zyguan

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 submitting an approval review. Reviewer can cancel approval by submitting a request changes review.

ti-chi-bot avatar Jun 06 '22 07:06 ti-chi-bot

/run-all-tests

ti-srebot avatar Jun 06 '22 07:06 ti-srebot

@zyguan you're already a collaborator in bot's repo.

ti-srebot avatar Jun 06 '22 07:06 ti-srebot

Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/9693ce584fc588524a36f9eb9767e06f1f1d0c5b

sre-bot avatar Jun 06 '22 07:06 sre-bot

@zyguan May need to resolve the new conflicts.

cfzjywxk avatar Aug 21 '22 04:08 cfzjywxk

/merge

cfzjywxk avatar Aug 21 '22 05:08 cfzjywxk

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

Commit hash: 9693ce584fc588524a36f9eb9767e06f1f1d0c5b

ti-chi-bot avatar Aug 21 '22 05:08 ti-chi-bot