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

session, com_stmt: fetch all rows during EXECUTE command (#42473, hotfix) #42601

Conversation

YangKeao
Copy link
Member

This is a carefully cherry-pick of #42473 on hotfix branch.

Previously, TiDB loads data in `FETCH` command with the `cursorFetch` enabled. Now, TiDB will load all data into the memory in `EXECUTE` command. It'll use more memory according to the size of result. And also, TiDB will never report write conflict in `FETCH` command with read-committed isolation level.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Mar 27, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • qw4990
  • tiancaiamao

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 27, 2023
@YangKeao YangKeao force-pushed the cherry-pick-42473-as-hotfix branch from 21e358b to 4c5d865 Compare March 27, 2023 06:11

getLastStatus := func() uint16 {
raw := out.Bytes()
return binary.LittleEndian.Uint16(raw[len(raw)-2 : len(raw)])
Copy link
Member Author

Choose a reason for hiding this comment

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

This test is a little different from the original one, because 6.1 doesn't support DEPRECATE EOF: see #34753

Signed-off-by: YangKeao <[email protected]>
@YangKeao YangKeao requested review from qw4990 and tiancaiamao March 27, 2023 06:24
@qw4990
Copy link
Contributor

qw4990 commented Mar 27, 2023

/test check-dev

Signed-off-by: YangKeao <[email protected]>
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 27, 2023
@YangKeao
Copy link
Member Author

/retest

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 27, 2023
@YangKeao
Copy link
Member Author

/retest

@tiancaiamao
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 1d87292

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 27, 2023
@ti-chi-bot ti-chi-bot merged commit 224a5d6 into pingcap:release-6.1-20230301-v6.1.2 Mar 27, 2023
YangKeao added a commit to YangKeao/tidb that referenced this pull request Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. 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.

4 participants