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 [-1] #31035

Closed
ChenPeng2013 opened this issue Dec 27, 2021 · 2 comments · Fixed by #31324
Closed

runtime error: index out of range [-1] #31035

ChenPeng2013 opened this issue Dec 27, 2021 · 2 comments · Fixed by #31324
Assignees
Labels
affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects the 5.4.x(LTS) versions. severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@ChenPeng2013
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use test;
source [test.txt](https://github.com/pingcap/tidb/files/7778220/test.txt)
SELECT * FROM UK_MU15122 WHERE col1 != "" ORDER BY COL2 + 9843176;

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

3. What did you see instead (Required)

runtime error: index out of range [-1]
github.com/pingcap/tidb/executor.recoveryProjection
	/root/tidb/executor/projection.go:453
github.com/pingcap/tidb/executor.(*projectionWorker).run.func1
	/root/tidb/executor/projection.go:423
runtime.gopanic
	/usr/local/go/src/runtime/panic.go:965
runtime.goPanicIndex
	/usr/local/go/src/runtime/panic.go:88
github.com/pingcap/tidb/types.doSub
	/root/tidb/types/mydecimal.go:1718
github.com/pingcap/tidb/types.DecimalAdd
	/root/tidb/types/mydecimal.go:1560
github.com/pingcap/tidb/expression.(*builtinArithmeticPlusDecimalSig).vecEvalDecimal
	/root/tidb/expression/builtin_arithmetic_vec.go:1007
github.com/pingcap/tidb/expression.(*ScalarFunction).VecEvalDecimal
	/root/tidb/expression/scalar_function.go:63
github.com/pingcap/tidb/expression.evalOneVec
	/root/tidb/expression/chunk_executor.go:163
github.com/pingcap/tidb/expression.(*defaultEvaluator).run
	/root/tidb/expression/evaluator.go:52
github.com/pingcap/tidb/expression.(*EvaluatorSuite).Run
	/root/tidb/expression/evaluator.go:124
github.com/pingcap/tidb/executor.(*projectionWorker).run
	/root/tidb/executor/projection.go:439
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1371

4. What is your TiDB version? (Required)

Release Version: v5.4.0-alpha-507-g5ea46eaf2
Edition: Community
Git Commit Hash: 5ea46eaf22b8ac8529f29bf95c4aa903ea11c5f1
Git Branch: master
UTC Build Time: 2021-12-27 03:29:14
GoVersion: go1.16.5
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
@ChenPeng2013 ChenPeng2013 added type/bug The issue is confirmed as a bug. sig/execution SIG execution severity/major affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. labels Dec 27, 2021
@yudongusa
Copy link

@XuHuaiyu assign this to you for now.

@XuHuaiyu XuHuaiyu assigned guo-shaoge and unassigned XuHuaiyu Jan 4, 2022
@XuHuaiyu XuHuaiyu added sig/planner SIG: Planner and removed sig/execution SIG execution labels Jan 6, 2022
@yudongusa yudongusa added the affects-5.4 This bug affects the 5.4.x(LTS) versions. label Jan 6, 2022
@github-actions
Copy link

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects the 5.4.x(LTS) versions. severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants