-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.component/tablepartitionThis issue is related to Table Partition of TiDB.This issue is related to Table Partition of TiDB.report/communityThe community has encountered this bug.The community has encountered this bug.severity/majorsig/plannerSIG: PlannerSIG: Plannertype/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)
drop table if exists t;
create table t(
id int(10) default null,
Uid bigint(20) unsigned not null primary key,
bid varchar(50) default null,
index idx(bid)
) partition by hash(Uid) partitions 10;
insert into t values (1,1,1), (2,2,2), (3,3,3),(4,4,4), (5,5,5);
set tidb_partition_prune_mode='dynamic';
analyze table t;
select * from t limit 1;
2. What did you expect to see? (Required)
query success
3. What did you see instead (Required)
select * from t limit 1;
(1105, 'runtime error: index out of range [0] with length 0')
tidb log
[2023/08/04 09:30:25.914 +08:00] [ERROR] [conn.go:1072] ["connection running loop panic"] [conn=5250810137421021591] [lastSQL="select * from t as a limit 1"] [err="runtime error: index out of range [0] with length 0"] [stack="github.com/pingcap/tidb/server.(*clientConn).Run.func1
/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1075
runtime.gopanic
/usr/local/go1.20.5/src/runtime/panic.go:884
github.com/pingcap/tidb/server.(*clientConn).writeResultSet.func1
/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:2237
runtime.gopanic
/usr/local/go1.20.5/src/runtime/panic.go:884
runtime.goPanicIndex
/usr/local/go1.20.5/src/runtime/panic.go:113
github.com/pingcap/tidb/util/chunk.(*Column).IsNull
/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/util/chunk/column.go:169
github.com/pingcap/tidb/util/chunk.Row.IsNull
/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/util/chunk/row.go:218
github.com/pingcap/tidb/server.dumpTextRow
/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/util.go:401
github.com/pingcap/tidb/server.(*clientConn).writeChunks
/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:2353
github.com/pingcap/tidb/server.(*clientConn).writeResultSet
/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:2256
github.com/pingcap/tidb/server.(*clientConn).handleStmt
/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:2124
github.com/pingcap/tidb/server.(*clientConn).handleQuery
/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1885
github.com/pingcap/tidb/server.(*clientConn).dispatch
/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1372
github.com/pingcap/tidb/server.(*clientConn).Run
/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1153
github.com/pingcap/tidb/server.(*Server).onConn
/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/server.go:677"]
4. What is your TiDB version? (Required)
v7.1.1
master(522a008)
Metadata
Metadata
Assignees
Labels
affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.component/tablepartitionThis issue is related to Table Partition of TiDB.This issue is related to Table Partition of TiDB.report/communityThe community has encountered this bug.The community has encountered this bug.severity/majorsig/plannerSIG: PlannerSIG: Plannertype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.