-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
A panic occurs when tidb_enable_ordered_result_mode is enabled #45044
Labels
affects-5.4
This bug affects 5.4.x versions.
affects-6.1
affects-6.5
affects-7.1
affects-7.5
severity/major
sig/planner
SIG: Planner
type/bug
The issue is confirmed as a bug.
Comments
ti-chi-bot
bot
added
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.1
may-affects-6.5
may-affects-7.1
labels
Jun 29, 2023
jebter
changed the title
开启 tidb_enable_ordered_result_mode 后,SQL 执行报错
A panic occurs when tidb_enable_ordered_result_mode is enabled
Jun 29, 2023
Panic happened during optimizing. I'd like to change the label to sig/planner |
@Bowen-Tang Can you provide detailed reproduce steps? |
stack
|
Seems (rs *resultReorder) extractHandleCol didn't handle other opetrators, like |
ti-chi-bot
added
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 5.4.x versions.
affects-6.1
affects-6.5
affects-7.1
and removed
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.1
may-affects-6.5
may-affects-7.1
labels
Jul 6, 2023
13 tasks
qw4990
removed
affects-5.2
This bug affects 5.2.x versions.
affects-5.3
This bug affects 5.3.x versions.
labels
Oct 30, 2023
This was referenced Oct 30, 2023
18 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-5.4
This bug affects 5.4.x versions.
affects-6.1
affects-6.5
affects-7.1
affects-7.5
severity/major
sig/planner
SIG: Planner
type/bug
The issue is confirmed as a bug.
Bug Report
开启 tidb_enable_ordered_result_mode 后,SQL 执行 panic
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
执行正常
3. What did you see instead (Required)
[2023/06/25 10:18:28.572 +08:00] [ERROR] [conn.go:1072] ["connection running loop panic"] [conn=8396308395326069831] [lastSQL="SELECT p.product_code \r\nFROM shop_upload_commodity_pic p\r\nGROUP BY p.product_code \r\nHAVING count(*)>1 \r\nORDER BY p.product_code \r\nlimit 10"] [err="runtime error: invalid memory address or nil pointer dereference"] [stack="github.com/pingcap/tidb/server.(*clientConn).Run.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1075\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:884\ngithub.com/pingcap/tidb/executor.(*Compiler).Compile.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/compiler.go:54\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:884\nruntime.panicmem\n\t/usr/local/go/src/runtime/panic.go:260\nruntime.sigpanic\n\t/usr/local/go/src/runtime/signal_unix.go:837\ngithub.com/pingcap/tidb/expression.(*Schema).ColumnIndex\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/expression/schema.go:133\ngithub.com/pingcap/tidb/expression.(*Schema).Contains\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/expression/schema.go:151\ngithub.com/pingcap/tidb/planner/core.(*resultReorder).extractHandleCol\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/rule_result_reorder.go:109\ngithub.com/pingcap/tidb/planner/core.(*resultReorder).completeSort\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/rule_result_reorder.go:55\ngithub.com/pingcap/tidb/planner/core.(*resultReorder).completeSort\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/rule_result_reorder.go:52\ngithub.com/pingcap/tidb/planner/core.(*resultReorder).completeSort\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/rule_result_reorder.go:52\ngithub.com/pingcap/tidb/planner/core.(*resultReorder).optimize\n\t/
4. What is your TiDB version? (Required)
tidb 7.1
The text was updated successfully, but these errors were encountered: