Skip to content

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

Merged
ti-srebot merged 1 commit into
pingcap:release-4.0from
bb7133:bb7133/try_validate
Dec 19, 2020
Merged

planner: the issue that incorrect result is returned for indeterministic function when executing a prepared point-get update.#21883
ti-srebot merged 1 commit into
pingcap:release-4.0from
bb7133:bb7133/try_validate

Conversation

@bb7133
Copy link
Copy Markdown
Member

@bb7133 bb7133 commented Dec 18, 2020

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.

@bb7133
Copy link
Copy Markdown
Member Author

bb7133 commented Dec 18, 2020

/run-all-tests

@bb7133 bb7133 force-pushed the bb7133/try_validate branch from f934fd1 to c6e5686 Compare December 18, 2020 14:42
@bb7133
Copy link
Copy Markdown
Member Author

bb7133 commented Dec 18, 2020

/run-all-tests

@bb7133 bb7133 force-pushed the bb7133/try_validate branch from c6e5686 to 91bbcb8 Compare December 18, 2020 15:34
@bb7133 bb7133 requested a review from cfzjywxk December 18, 2020 15:36
@bb7133 bb7133 removed the status/DNM label Dec 18, 2020
@bb7133 bb7133 changed the title *: validate a fix. planner: the issue that incorrect result is returned for indeterministic function when executing a prepared point-get update. Dec 18, 2020
@bb7133 bb7133 requested review from jackysp and zz-jason December 18, 2020 15:47
@bb7133
Copy link
Copy Markdown
Member Author

bb7133 commented Dec 18, 2020

/run-all-tests

@bb7133
Copy link
Copy Markdown
Member Author

bb7133 commented Dec 18, 2020

/bench

@cfzjywxk
Copy link
Copy Markdown
Contributor

LGTM

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

@jackysp jackysp 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 removed the status/LGT1 Indicates that a PR has LGTM 1. label Dec 19, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Dec 19, 2020
@jebter
Copy link
Copy Markdown

jebter commented Dec 19, 2020

/merge

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

/run-all-tests

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants