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

Inconsistent result after disabling partition_processor #58025

Open
Tracked by #56490
Nickelth opened this issue Dec 5, 2024 · 1 comment
Open
Tracked by #56490

Inconsistent result after disabling partition_processor #58025

Nickelth opened this issue Dec 5, 2024 · 1 comment
Labels
component/tablepartition This issue is related to Table Partition of TiDB. severity/minor sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@Nickelth
Copy link

Nickelth commented Dec 5, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

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)

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)

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 
@Nickelth Nickelth added the type/bug The issue is confirmed as a bug. label Dec 5, 2024
@jebter jebter added the sig/sql-infra SIG: SQL Infra label Dec 6, 2024
@Defined2014
Copy link
Contributor

Defined2014 commented Dec 9, 2024

static prune will remove later, ref #56490

@Defined2014 Defined2014 added severity/minor component/tablepartition This issue is related to Table Partition of TiDB. labels Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/tablepartition This issue is related to Table Partition of TiDB. severity/minor sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

3 participants