-
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
partition prune has index out of range problem #35181
Comments
Seems here has a bug: tidb/planner/core/rule_partition_processor.go Line 875 in 36a9810
When a condition |
Yes, better use |
@lcwangchao Do you interest to fix this issue? |
I think the optimization for removing a prune condition should be removed. It was added in #22079, and has reported issues: #33966. The only time it would be beneficial is when there is only a single value mapping to a partition (like a single value RANGE or LIST partition) and it is not a part of an index. And the benefit is only one less evaluation, so I think the optimization and the added switch |
The root cause here is for this sql-"insert into t select * from t where a=3000; " the 'a= 3000' is out of the range of defined partition value? So what will the behavior for the Minimal reproduce be like? |
Since the |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
insert into t select * from t where a=3000;
2. What did you expect to see? (Required)
Success
3. What did you see instead (Required)
tidb> insert into t select * from t where a=3000;
ERROR 1105 (HY000): runtime error: index out of range [2] with length 2
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: