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

executor: throw error when prepared statement is execute, deallocate or prepare #21962

Merged

Conversation

xuyifangreeneyes
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #17412

Problem Summary:
TiDB regards sql like prepare stmt1 from "execute stmt" as valid.

What is changed and how it works?

What's Changed:
When prepared statement is execute, deallocate or prepare, throw error ERROR 1295 (HY000): This command is not supported in the prepared statement protocol yet.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test

Release note

  • throw error when prepared statement is execute, deallocate or prepare

@xuyifangreeneyes xuyifangreeneyes requested a review from a team as a code owner December 23, 2020 07:35
@xuyifangreeneyes xuyifangreeneyes requested review from lzmhhh123 and removed request for a team December 23, 2020 07:35
@github-actions github-actions bot added the sig/execution SIG execution label Dec 23, 2020
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 Dec 23, 2020
@ichn-hu ichn-hu mentioned this pull request Dec 23, 2020
@xuyifangreeneyes
Copy link
Contributor Author

@XuHuaiyu PTAL

Copy link
Contributor

@XuHuaiyu XuHuaiyu 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 Dec 23, 2020
@XuHuaiyu
Copy link
Contributor

/merge

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

/run-all-tests

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit 61e068a into pingcap:master Dec 23, 2020
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Dec 23, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #21972

Tjianke pushed a commit to Tjianke/tidb that referenced this pull request Dec 25, 2020
qw4990 pushed a commit that referenced this pull request Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution 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.

Prepare execute successfully in TiDB but doesn't take effect.
4 participants