-
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 IsPointGet judgment condition (#10278) #10304
Conversation
fix IsPointGet judgment condition
Please fix CI. |
@@ -424,9 +424,6 @@ func IsPointGetWithPKOrUniqueKeyByAutoCommit(ctx sessionctx.Context, p plan.Plan | |||
case *plan.PhysicalIndexReader: | |||
indexScan := v.IndexPlans[0].(*plan.PhysicalIndexScan) | |||
return indexScan.IsPointGetByUniqueKey(ctx.GetSessionVars().StmtCtx), nil | |||
case *plan.PhysicalIndexLookUpReader: |
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.
index lookup is not allowed to use point get?
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.
yes
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.
It's more like a workaround other than a bugfix ..
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.
This point get is not point get executor, it's using MaxTS.
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.
It's a bugfix... maybe the function name is a bit confusing...
index lookup is not allowed to use max ts and this function checks whether to use max ts
https://github.com/tiancaiamao/tidb/blob/ab1abb1938782f4bd69d15650489f9074e26ade6/executor/adapter.go#L312
@zz-jason
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.
got it, thanks
merged, but no test... |
Yes, no test @jackysp
|
What problem does this PR solve?
fix IsPointGet judgment condition
What is changed and how it works?
Cherry pick from #10278
(only the fix part, because the master branch evolves and differ from the release-2.0 branch)