-
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
TableRangeScan is not selected when autocommit=OFF #45036
Comments
The bug happens when the table is a partition table, the primary key is nonclustered, dynamic prune mode is enabled, and autocommit=OFF. When autocommit=OFF, since the needs of dynamic partition prune,_tidb_tid is appended at the end of columns array of schema: It breaks the assumption that the last column in this array is _tidb_rowid. So pkCol cannot be found correctly and ranges cannot be correctly built. Only TableFullScan can be selected. |
set tidb_partition_prune_mode=static cannot workaround because: |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
Both plans are TableRangeScan:
3. What did you see instead (Required)
TableFullScan when autocommit=OFF:
4. What is your TiDB version? (Required)
v6.5.2
The text was updated successfully, but these errors were encountered: