-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-8.4affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/tablepartitionThis issue is related to Table Partition of TiDB.This issue is related to Table Partition of TiDB.fuzz/randomtestseverity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
CREATE TABLE t1 (
col1 int, col2 int
) PARTITION BY LIST (col2)
(PARTITION p0 VALUES IN (1),
PARTITION p1 VALUES IN (-1));
insert into t1 values (1, -1);
select col1 from t1 where col1 > 0;
2. What did you expect to see? (Required)
+------+
| col1 |
+------+
| 1 |
+------+
3. What did you see instead (Required)
Empty set (0.00 sec)
From the plan, we can see that we got a wrong partition.
+-------------------------+---------+-----------+---------------+--------------------------------+
| id | estRows | task | access object | operator info |
+-------------------------+---------+-----------+---------------+--------------------------------+
| TableReader_7 | 0.33 | root | partition:p0 | data:Selection_6 |
| └─Selection_6 | 0.33 | cop[tikv] | | gt(test.t1.col1, 0) |
| └─TableFullScan_5 | 1.00 | cop[tikv] | table:t1 | keep order:false, stats:pseudo |
+-------------------------+---------+-----------+---------------+--------------------------------+
3 rows in set (0.00 sec)
4. What is your TiDB version? (Required)
Metadata
Metadata
Assignees
Labels
affects-8.4affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/tablepartitionThis issue is related to Table Partition of TiDB.This issue is related to Table Partition of TiDB.fuzz/randomtestseverity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.