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

*: do not report error for prepared stmt execution if tidb_snapshot is set (#22568) #22641

Merged
merged 3 commits into from
Mar 1, 2021

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Feb 1, 2021

cherry-pick #22568 to release-4.0
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/22641

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

git push [email protected]:ti-srebot/tidb.git pr/22641:release-4.0-843e03996b10

What problem does this PR solve?

Issue Number: close #22497
Fix #22567

Problem Summary:

The first issue is for code cleanup, while the second issue is a bug.

What is changed and how it works?

What's Changed:

  • remove snapshot from pstmtPlanCacheKey;
  • in executor builder, do not call txn() if snapshot is set manually;

Related changes

4.0 has this problem as well, 167edacdbfb1db59b6d10c4f6a0ed2b08d0abca8.

Check List

Tests

  • Unit test

Side effects

N/A

Release note

  • Do not report error for prepared stmt execution if tidb_snapshot is set

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot
Copy link
Contributor Author

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

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

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Feb 1, 2021
Copy link
Contributor

@Reminiscent Reminiscent left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Feb 1, 2021
@ti-chi-bot ti-chi-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 1, 2021
@eurekaka
Copy link
Contributor

eurekaka commented Mar 1, 2021

/run-all-tests

@eurekaka eurekaka merged commit 66d97de into pingcap:release-4.0 Mar 1, 2021
@eurekaka eurekaka deleted the release-4.0-843e03996b10 branch March 1, 2021 07:27
@zhouqiang-cl zhouqiang-cl modified the milestones: v4.0.11, v4.0.12 Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/executor sig/execution SIG execution sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug. type/enhancement The issue or PR belongs to an enhancement. type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants