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

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

Merged
merged 1 commit into from
Dec 19, 2020

Conversation

bb7133
Copy link
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
Member Author

bb7133 commented Dec 18, 2020

/run-all-tests

@bb7133
Copy link
Member Author

bb7133 commented Dec 18, 2020

/run-all-tests

@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
Copy link
Member Author

bb7133 commented Dec 18, 2020

/run-all-tests

@bb7133
Copy link
Member Author

bb7133 commented Dec 18, 2020

/bench

@cfzjywxk
Copy link
Contributor

LGTM

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

@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

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
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