-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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: fix SelectForUpdate in decorrelated subquery under pessimistic mode #22372
Conversation
…n pessimistic mode Signed-off-by: lysu <[email protected]>
LGTM |
if err != nil { | ||
return nil, err | ||
} | ||
if chk.NumRows() == 0 { | ||
return nil, nil | ||
for { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it execute the whole query inside EvalSubqueryFirstRow
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, it only execute subplan subquery for example:
select v from t where id = 1 for update
of select (select v from t where id = 1 for update) v1, (select v from t where id = 2) from dual
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@youjiali1995, Thanks for your review. The bot only counts LGTMs from Reviewers and higher roles, but you're still welcome to leave your comments. See the corresponding SIG page for more information. Related SIGs: execution(slack),sql-infra(slack). |
@lysu: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: lysu [email protected]
What problem does this PR solve?
Issue Number: close #22345
Problem Summary:
just as issue described, we need handle pessimistic error when SFU in decorrelated subquery
What is changed and how it works?
What's Changed, How it Works::
(a *ExecStmt) handlePessimisticLockError
tohandlePessimisticLockError
without change logicRelated changes
Check List
Tests
Side effects
Release note
This change is