Inconsistent result after disabling partition_processor
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
```sql
SET @@sql_mode='';
SET @@global.tidb_enable_clustered_index='off';
delete from mysql.opt_rule_blacklist;
admin reload opt_rule_blacklist;
create table `t0` (`a` int(11),`b` int) partition by range (`a`) (partition `p0` values less than (3),partition `p1` values less than (maxvalue));
insert into `t0` values (1,1),(2,1),(3,1),(4,2),(4,2);
set @@session.`tidb_partition_prune_mode`='static';
delete from mysql.opt_rule_blacklist;
admin reload opt_rule_blacklist;
select * from `t0`;
INSERT INTO mysql.opt_rule_blacklist VALUES("partition_processor");
ADMIN reload opt_rule_blacklist;
select * from `t0`;
```
### 2. What did you expect to see? (Required)
Queries return same result
### 3. What did you see instead (Required)
```sql
mysql> delete from mysql.opt_rule_blacklist;
Query OK, 0 rows affected (0.00 sec)
mysql> admin reload opt_rule_blacklist;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from `t0`;
+------+------+
| a | b |
+------+------+
| 1 | 1 |
| 2 | 1 |
| 1 | 1 |
| 2 | 1 |
| 3 | 1 |
| 4 | 2 |
| 4 | 2 |
| 3 | 1 |
| 4 | 2 |
| 4 | 2 |
+------+------+
10 rows in set (0.01 sec)
mysql> INSERT INTO mysql.opt_rule_blacklist VALUES("partition_processor");
Query OK, 1 row affected (0.00 sec)
mysql> ADMIN reload opt_rule_blacklist;
Query OK, 0 rows affected (0.01 sec)
mysql> select * from `t0`;
Empty set (0.00 sec)
```
### 4. What is your TiDB version? (Required)
```sql
Release Version: v8.5.0-alpha-281-g282430e657
Edition: Community
Git Commit Hash: 282430e657d49bb4bae578f0e0b732ac0df3ba57
Git Branch: master
UTC Build Time: 2024-12-04 09:16:29
GoVersion: go1.23.4
Race Enabled: false
Check Table Before Drop: false
Store: tikv
```
Contributor guide
Assessment
This issue has not been assessed yet.