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

runtime error: index out of range [3] with length 1 #39723

Closed
ChenPeng2013 opened this issue Dec 7, 2022 · 0 comments · Fixed by #39740
Closed

runtime error: index out of range [3] with length 1 #39723

ChenPeng2013 opened this issue Dec 7, 2022 · 0 comments · Fixed by #39740
Assignees
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. severity/critical sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@ChenPeng2013
Copy link
Contributor

ChenPeng2013 commented Dec 7, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)



use test;
CREATE TABLE `tbl_5` (
  `col_21` time DEFAULT '04:48:17',
  `col_22` varchar(403) COLLATE utf8_unicode_ci DEFAULT NULL,
  `col_23` year(4) NOT NULL,
  `col_24` char(182) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL,
  `col_25` set('Alice','Bob','Charlie','David') COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`col_24`(3)) /*T![clustered_index] CLUSTERED */,
  KEY `idx_10` (`col_22`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO `tbl_5` VALUES ('15:33:15','&U+x1',2007,'','Bob'),('00:57:58','suFy-',1990,'$tr咰bWv3怜蘨醲Lz閊','David'),('07:45:36','=9^S!#(kxQi9',2024,'6竨#X畦#~8l6','Charlie'),('18:32:29','DuvX8^K^q^+2~JTWQz~',1974,'@H凱=4襤曃','Bob'),('13:15:54','I8blt6n+_*%&f2MO',2029,'CtG!5赫=^FvT7-D%','Charlie'),('21:43:51','EOi+t=uC72Fo',1998,'C镯RI7e階IHmJ','David'),(NULL,'Cc*P=*V',1985,'f2I','Bob'),('14:20:13','pBuT',2009,'M呭褤鵬O鷩骍饁*(袪驯L','Bob'),('10:56:23','qgOwL7NDN7cerOJn#',2016,'偪毄蝏NzoPp','Bob'),('17:09:20','pmXcn$_jEGUb0&Un',1971,'盽N襜@','Bob'),('11:16:57','nXsTgvxgBJsVe0~U0~',2014,'蓕-Bxa)pmoz9-KMTA氷乍','Charlie'),('05:39:10','+%-*pPTAf7P(bS1#8',2035,'餕u憑&j駪iw棊囇','Charlie'),('23:10:56','CII6d26',1985,'鍨嚓HI2蘩','Alice'),('14:44:03','(uu%p',2023,'繾aX*','David'),('17:12:06','qv$&qIfxGKn',2024,'渻谝nn货sf帶ky','Charlie'),('11:46:45','UU0rw^D3qgpXG9B#f',2001,'薝4搱ZaG1糽輀菗','Charlie'),('15:27:17',')h^ZfMV4=egb3lN',1997,'剚蒂鮅xwyr糚QR','Charlie');

alter table tbl_5 add unique key idx_13 ( col_23 );

2. What did you expect to see? (Required)

3. What did you see instead (Required)

☁  tcms  KUBECONFIG=./kubeconfig.yml ./kubectl logs -p tidb-a-tidb-0
start tidb-server ...
/tidb-server --store=tikv --advertise-address=tidb-a-tidb-0.tidb-a-tidb-peer.nt-dml-test-tps-1324844-1-937.svc --host=0.0.0.0 --path=tidb-a-pd:2379 --config=/etc/tidb/tidb.toml

panic: runtime error: index out of range [3] with length 1

goroutine 1513 [running]:
github.com/pingcap/tidb/table/tables.TryGetHandleRestoredDataWrapper(0xc011bf3380, {0xc0165dc1e0, 0x1, 0x1?}, 0x0, 0xc001e195f0)
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/table/tables/tables.go:1891 +0x78d
github.com/pingcap/tidb/ddl.(*copContext).fetchTableScanResult(0xc0123131e0, {0x4f57a88, 0xc00095f600}, {0x4f4ec10, 0xc004f8a0f0}, 0xc012329ae0, {0xc00961b000?, 0x0, 0xa00})
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/ddl/index_cop.go:440 +0x439
github.com/pingcap/tidb/ddl.(*copReqSender).run(0xc011bf6620)
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/ddl/index_cop.go:142 +0x689
created by github.com/pingcap/tidb/ddl.(*copReqSenderPool).adjustSize
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/ddl/index_cop.go:192 +0x3c

4. What is your TiDB version? (Required)

Release Version: v6.5.0-alpha
Edition: Community
Git Commit Hash: dc6d9a01112a54af1ac7d0200521ea20b6d09b30
Git Branch: heads/refs/tags/v6.5.0-alpha
UTC Build Time: 2022-12-06 11:49:34
GoVersion: go1.19.3
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: unistore
@ChenPeng2013 ChenPeng2013 added type/bug The issue is confirmed as a bug. sig/sql-infra SIG: SQL Infra labels Dec 7, 2022
@ChenPeng2013 ChenPeng2013 added severity/critical affects-6.5 This bug affects the 6.5.x(LTS) versions. labels Dec 7, 2022
@ti-chi-bot ti-chi-bot added may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 may-affects-6.4 labels Dec 7, 2022
@ChenPeng2013 ChenPeng2013 removed may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 may-affects-6.4 labels Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. severity/critical sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants