-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
partition table does not return the right rows by quering by _tidb_rowid
#54583
Comments
The plan is wrong:
|
partition table + |
TTL is using |
The problem is caused by https://github.com/pingcap/tidb/pull/49161/files#diff-7ab669fbd07f777ce6a8b33025e95960e50d6c6be00a0781d33aafca2150bf6bL2585. So do you have any comment about this issue? @mjonss |
@Defined2014 Did it work before? How? I think it could work if also the partition is specified, like |
Yes. Before this PR, we do prune in planner phase and if remained more than one partition, we will forbid PointGet plan.
I agree with it.
TTL will use it to delete rows. But I think tableRangeScan maybe acceptable. |
There may be duplicates of _tidb_rowid, so I don't think it is acceptable, since it cannot distinguish which row (i.e. from which partition) to delete. If it still using the explicit partition selection |
Yeah, it will explicit selection |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
select * from tt where _tidb_rowid=1
should return one row.3. What did you see instead (Required)
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: