Skip to content

planner: the issue that incorrect result is returned for nondeterministic function when executing a prepared point-get update.#22067

Merged
ti-srebot merged 2 commits into
pingcap:release-5.0-rcfrom
bb7133:bb7133/cp-21883
Dec 29, 2020
Merged

planner: the issue that incorrect result is returned for nondeterministic function when executing a prepared point-get update.#22067
ti-srebot merged 2 commits into
pingcap:release-5.0-rcfrom
bb7133:bb7133/cp-21883

Conversation

@bb7133
Copy link
Copy Markdown
Member

@bb7133 bb7133 commented Dec 29, 2020

This PR cherry-picks #21883 to release-5.0-rc:


What problem does this PR solve?

Issue Number: #21884

Problem Summary:
In #12243, the evaluated value of the parameters of the prepared statement is improperly cached in tryCachePointPlan, which caused the bug reported in #21884 :

func (e *Execute) tryCachePointPlan(ctx context.Context, sctx sessionctx.Context,

What is changed and how it works?

How it Works:
Commented the related caching codes in tryCachePointPlan as a short-term solution, the fix will be refined in the future.

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Side effects

  • Performance regression
    • Consumes more CPU

Release note

  • Fix the issue that incorrect result is returned for indeterministic function when executing a prepared point-get update with "prepared plan cache" is disabled.

…tic function when executing a prepared point-get update. (pingcap#21883)
@bb7133 bb7133 requested review from a team as code owners December 29, 2020 06:46
@bb7133 bb7133 requested review from hanfei1991 and qw4990 and removed request for a team December 29, 2020 06:46
@bb7133
Copy link
Copy Markdown
Member Author

bb7133 commented Dec 29, 2020

PTAL @cfzjywxk @jackysp @qw4990

@cfzjywxk
Copy link
Copy Markdown
Contributor

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 29, 2020
@lysu
Copy link
Copy Markdown
Contributor

lysu commented Dec 29, 2020

LGTM

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Dec 29, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Dec 29, 2020
@jackysp jackysp added the type/bugfix This PR fixes a bug. label Dec 29, 2020
@jebter
Copy link
Copy Markdown

jebter commented Dec 29, 2020

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 29, 2020
@ti-srebot
Copy link
Copy Markdown
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit 0726fac into pingcap:release-5.0-rc Dec 29, 2020
@zz-jason zz-jason deleted the bb7133/cp-21883 branch December 31, 2020 01:40
winoros pushed a commit to winoros/tidb that referenced this pull request Mar 22, 2021
…stic function when executing a prepared point-get update. (pingcap#22067)
ti-chi-bot pushed a commit that referenced this pull request Mar 22, 2021
ti-chi-bot pushed a commit that referenced this pull request Mar 23, 2021
SabaPing pushed a commit to SabaPing/tidb that referenced this pull request Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

6 participants