You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
MySQL [clustered]> select * from PK_MULTI_COL_4799 where col1 > 0xFB50F2B806101A3B2295 AND col2 > 0xFB50F2B806101A3B2295;
ERROR 1105 (HY000): runtime error: index out of range [10] with length 10
MySQL [clustered]> select * from PK_MULTI_COL_4799 where col1 > 0xFB50F2B806101A3B2295;
Empty set (0.01 sec)
MySQL [clustered]> select * from PK_MULTI_COL_4799 where col2 > 0xFB50F2B806101A3B2295;
ERROR 1105 (HY000): runtime error: index out of range [10] with length 10
MySQL [clustered]>
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
MySQL [clustered]> select * from PK_MULTI_COL_4799 where col1 > 0xFB50F2B806101A3B2295 AND col2 > 0xFB50F2B806101A3B2295;
ERROR 1105 (HY000): runtime error: index out of range [10] with length 10
MySQL [clustered]> select * from PK_MULTI_COL_4799 where col1 > 0xFB50F2B806101A3B2295;
Empty set (0.01 sec)
MySQL [clustered]> select * from PK_MULTI_COL_4799 where col2 > 0xFB50F2B806101A3B2295;
ERROR 1105 (HY000): runtime error: index out of range [10] with length 10
MySQL [clustered]>
MySQL [clustered]> show create table PK_MULTI_COL_4799;
Table | Create Table |
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| PK_MULTI_COL_4799 | CREATE TABLE
PK_MULTI_COL_4799
(COL1
binary(10) NOT NULL,COL2
char(1) COLLATE utf8_general_ci NOT NULL,COL3
double NOT NULL,PRIMARY KEY (
COL1
(5),COL2
,COL3
) /*T![clustered_index] NONCLUSTERED */,UNIQUE KEY
UIDXM
(COL1
(5),COL2
),UNIQUE KEY
UIDX
(COL2
),KEY
IDX3
(COL3
),KEY
IDXM
(COL3
,COL2
)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci |
2. What did you expect to see? (Required)
SQL can run without error
3. What did you see instead (Required)
[2021/04/14 12:53:30.999 +08:00] [ERROR] [conn.go:736] ["connection running loop panic"] [conn=63621] [lastSQL="select * from PK_MULTI_COL_4799 where col1 > 0xFB50F2B806101A3B2295 AND col2 > 0xFB50F2B806101A3B2295"] [err="runtime error: index out of range [10] with length 10"] [stack="goroutine 131515528 [running]:\ngithub.com/pingcap/tidb/server.(*clientConn).Run.func1(0x3ff6060, 0xc047511410, 0xc044f82400)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:734 +0xee\npanic(0x378df20, 0xc04c02d600)\n\t/usr/local/go/src/runtime/panic.go:679 +0x1b2\ngithub.com/pingcap/tidb/util/collate.decodeRune(0xc04e62d604, 0xa, 0x9, 0xa, 0xc)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/collate/collate.go:262 +0x129\ngithub.com/pingcap/tidb/util/collate.(*generalCICollator).Key(0x5f82ce0, 0xc04e62d604, 0xa, 0x5f82ce0, 0x20, 0x3484960)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/collate/general_ci.go:48 +0xcd\ngithub.com/pingcap/tidb/util/codec.encodeString(0xc04c02d5c0, 0x0, 0x13, 0x5, 0x0, 0xc01beb2d80, 0xf, 0xc04e62d604, 0xa, 0xa, ...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/codec/codec.go:200 +0x171\ngithub.com/pingcap/tidb/util/codec.encode(0xc034f28300, 0xc04c02d5c0, 0x0, 0x13, 0xc0349c75d8, 0x1, 0x1, 0x1359b01, 0xc03503a5f0, 0x50, ...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/codec/codec.go:94 +0x569\ngithub.com/pingcap/tidb/util/codec.EncodeKey(...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/codec/codec.go:287\ngithub.com/pingcap/tidb/util/ranger.validInterval(0xc034f28300, 0xc03503a5f0, 0xc03503a5a0, 0xc03503a5a0, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/ranger/ranger.go:36 +0x189\ngithub.com/pingcap/tidb/util/ranger.points2Ranges(0xc034f28300, 0xc043013900, 0x2, 0x4, 0xc050ed98c0, 0x2, 0x2, 0x0, 0xc043013900, 0x2)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/ranger/ranger.go:66 +0x1ab\ngithub.com/pingcap/tidb/util/ranger.(*rangeDetacher).buildCNFIndexRange(0xc0349c7b30, 0xc03296b3a8, 0x2, 0x2, 0x0, 0xc034e6f120, 0x1, 0x1, 0x1, 0x0, ...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/ranger/ranger.go:365 +0x764\ngithub.com/pingcap/tidb/util/ranger.(*rangeDetacher).detachCNFCondAndBuildRangeForIndex(0xc0349c7b30, 0xc034e6f0c0, 0x1, 0x1, 0xc03296b3a8, 0x1, 0x1, 0xc0349c7a01, 0x1f554d1, 0xc03a4ace00, ...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/
/panic
4. What is your TiDB version? (Required)
v5.0.0
The text was updated successfully, but these errors were encountered: