-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-7.6report/communityThe community has encountered this bug.The community has encountered this bug.severity/majorsig/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)
drop table if exists t;
create table t (b varchar(255), a int primary key nonclustered, key (b)) partition by key(a) partitions 3;
insert into t values ('Ab', 1),('abc',2),('BC',3),('AC',4),('BA',5),('cda',6);
analyze table t;
select * from t where a = 2;
2. What did you expect to see? (Required)
Success
3. What did you see instead (Required)
tidb> create table t (b varchar(255), a int primary key nonclustered, key (b)) partition by key(a) partitions 3;
Query OK, 0 rows affected (0.13 sec)
tidb> insert into t values ('Ab', 1),('abc',2),('BC',3),('AC',4),('BA',5),('cda',6);
Query OK, 6 rows affected (0.02 sec)
Records: 6 Duplicates: 0 Warnings: 0
tidb> analyze table t;
Query OK, 0 rows affected, 6 warnings (0.29 sec)
tidb> select * from t where a = 2;
ERROR 1105 (HY000): runtime error: index out of range [1] with length 1
4. What is your TiDB version? (Required)
tidb_version(): Release Version: v7.5.0
Edition: Community
Git Commit Hash: 069631e2ecfedc000ffb92c67207bea81380f020
Git Branch: heads/refs/tags/v7.5.0
UTC Build Time: 2023-11-24 08:50:14
GoVersion: go1.21.3
Race Enabled: false
Check Table Before Drop: false
Store: tikv
Metadata
Metadata
Assignees
Labels
affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-7.6report/communityThe community has encountered this bug.The community has encountered this bug.severity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.type/regression