-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Comments
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 |
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\ngit.luolix.top/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\ngit.luolix.top/pingcap/tidb/expression.(*Schema).ColumnIndex\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/expression/schema.go:133\ngit.luolix.top/pingcap/tidb/expression.(*Schema).Contains\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/expression/schema.go:151\ngit.luolix.top/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\ngit.luolix.top/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\ngit.luolix.top/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\ngit.luolix.top/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\ngit.luolix.top/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: