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: fix IsPointGet judgment condition (#10278) #10304

Merged
merged 3 commits into from
Apr 30, 2019

Conversation

tiancaiamao
Copy link
Contributor

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)

@jackysp
Copy link
Member

jackysp commented Apr 29, 2019

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:
Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

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

yes

Copy link
Member

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

Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

Choose a reason for hiding this comment

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

got it, thanks

@jackysp jackysp merged commit 81cf6ca into pingcap:release-2.0 Apr 30, 2019
@jackysp
Copy link
Member

jackysp commented Apr 30, 2019

merged, but no test...

@tiancaiamao
Copy link
Contributor Author

Yes, no test @jackysp

(only the fix part, because the master branch evolves and differ from the release-2.0 branch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants