-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Closed
Copy link
Labels
affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.component/tablepartitionThis issue is related to Table Partition of TiDB.This issue is related to Table Partition of TiDB.severity/criticalsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.type/regression
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
create table t(col varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL) PARTITION BY KEY (`col`) PARTITIONS 7;
explain select * from t where col = 'linpin';
explain select * from t where col = 'LINPIN';
2. What did you expect to see? (Required)
The query above should be pruned to the same partition.
3. What did you see instead (Required)
mysql> explain select * from t where col = 'linpin';
+-------------------------+----------+-----------+-----------------------+--------------------------------+
| id | estRows | task | access object | operator info |
+-------------------------+----------+-----------+-----------------------+--------------------------------+
| TableReader_8 | 10.00 | root | | data:Selection_7 |
| └─Selection_7 | 10.00 | cop[tikv] | | eq(test.t.col, "linpin") |
| └─TableFullScan_6 | 10000.00 | cop[tikv] | table:t, partition:p4 | keep order:false, stats:pseudo |
+-------------------------+----------+-----------+-----------------------+--------------------------------+
3 rows in set, 1 warning (0.01 sec)
mysql> explain select * from t where col = 'LINPIN';
+-------------------------+----------+-----------+-----------------------+--------------------------------+
| id | estRows | task | access object | operator info |
+-------------------------+----------+-----------+-----------------------+--------------------------------+
| TableReader_8 | 10.00 | root | | data:Selection_7 |
| └─Selection_7 | 10.00 | cop[tikv] | | eq(test.t.col, "LINPIN") |
| └─TableFullScan_6 | 10000.00 | cop[tikv] | table:t, partition:p3 | keep order:false, stats:pseudo |
+-------------------------+----------+-----------+-----------------------+--------------------------------+
3 rows in set, 1 warning (0.00 sec)
partition:p4
and partition:p3
, they are not same.
4. What is your TiDB version? (Required)
master
Metadata
Metadata
Assignees
Labels
affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.component/tablepartitionThis issue is related to Table Partition of TiDB.This issue is related to Table Partition of TiDB.severity/criticalsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.type/regression