-
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
Join partition table with normal table will cause error: invalid memory address or nil pointer dereference #26250
Comments
[2021/07/15 10:42:05.376 +08:00] [ERROR] [misc.go:89] ["panic in the recoverable goroutine"] [r="\"invalid memory address or nil pointer dereference\""] ["stack trace"="github.com/pingcap/tidb/util.WithRecovery.func1\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/util/misc.go:91\nruntime.gopanic\n\t/Users/xuhuaiyu/.gvm/gos/go1.16/src/runtime/panic.go:965\nruntime.panicmem\n\t/Users/xuhuaiyu/.gvm/gos/go1.16/src/runtime/panic.go:212\nruntime.sigpanic\n\t/Users/xuhuaiyu/.gvm/gos/go1.16/src/runtime/signal_unix.go:734\ngithub.com/pingcap/parser/model.(*ColumnInfo).GetOriginDefaultValue\n\t/Users/xuhuaiyu/Development/GOPATH/pkg/mod/github.com/pingcap/parser@v0.0.0-20210707071004-31c87e37af5c/model/model.go:158\ngithub.com/pingcap/tidb/table.GetColOriginDefaultValue\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/table/column.go:484\ngithub.com/pingcap/tidb/executor.NewRowDecoder.func2\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/executor/builder.go:4167\ngithub.com/pingcap/tidb/util/rowcodec.(*ChunkDecoder).DecodeToChunk\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/util/rowcodec/decoder.go:240\ngithub.com/pingcap/tidb/executor.DecodeRowValToChunk\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/executor/point_get.go:517\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).Next\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/executor/point_get.go:301\ngithub.com/pingcap/tidb/executor.Next\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/executor/executor.go:286\ngithub.com/pingcap/tidb/executor.(*HashJoinExec).fetchBuildSideRows\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/executor/join.go:268\ngithub.com/pingcap/tidb/executor.(*HashJoinExec).fetchAndBuildHashTable.func2\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/executor/join.go:702\ngithub.com/pingcap/tidb/util.WithRecovery\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/util/misc.go:94"]
[2021/07/15 10:42:05.378 +08:00] [INFO] [conn.go:995] ["command dispatched failed"] [conn=3] [connInfo="id:3, addr:127.0.0.1:54951 status:10, collation:utf8_general_ci, user:root"] [command=Query] [status="inTxn:0, autocommit:1"] [sql="select * from tp,tn where tp.id=tn.id and tn.id=1 for update"] [txn_mode=OPTIMISTIC] [err="runtime error: invalid memory address or nil pointer dereference\ngithub.com/pingcap/tidb/executor.(*HashJoinExec).fetchAndBuildHashTable.func3\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/executor/join.go:706\ngithub.com/pingcap/tidb/util.WithRecovery.func1\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/util/misc.go:86\nruntime.gopanic\n\t/Users/xuhuaiyu/.gvm/gos/go1.16/src/runtime/panic.go:965\nruntime.panicmem\n\t/Users/xuhuaiyu/.gvm/gos/go1.16/src/runtime/panic.go:212\nruntime.sigpanic\n\t/Users/xuhuaiyu/.gvm/gos/go1.16/src/runtime/signal_unix.go:734\ngithub.com/pingcap/parser/model.(*ColumnInfo).GetOriginDefaultValue\n\t/Users/xuhuaiyu/Development/GOPATH/pkg/mod/github.com/pingcap/parser@v0.0.0-20210707071004-31c87e37af5c/model/model.go:158\ngithub.com/pingcap/tidb/table.GetColOriginDefaultValue\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/table/column.go:484\ngithub.com/pingcap/tidb/executor.NewRowDecoder.func2\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/executor/builder.go:4167\ngithub.com/pingcap/tidb/util/rowcodec.(*ChunkDecoder).DecodeToChunk\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/util/rowcodec/decoder.go:240\ngithub.com/pingcap/tidb/executor.DecodeRowValToChunk\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/executor/point_get.go:517\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).Next\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/executor/point_get.go:301\ngithub.com/pingcap/tidb/executor.Next\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/executor/executor.go:286\ngithub.com/pingcap/tidb/executor.(*HashJoinExec).fetchBuildSideRows\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/executor/join.go:268\ngithub.com/pingcap/tidb/executor.(*HashJoinExec).fetchAndBuildHashTable.func2\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/executor/join.go:702\ngithub.com/pingcap/tidb/util.WithRecovery\n\t/Users/xuhuaiyu/Development/GOPATH/src/github.com/pingcap/tidb/util/misc.go:94\nruntime.goexit\n\t/Users/xuhuaiyu/.gvm/gos/go1.16/src/runtime/asm_amd64.s:1371"] |
caused by #21148 |
Please edit this comment or add a new comment to complete the following informationNot a bug
Duplicate bug
BugNote: Make Sure that 'component', and 'severity' labels are added 1. Root Cause Analysis (RCA) (optional)When handling select for update and adding extra partition column, do not consider there might be non-partition table. 2. Symptom (optional)invalid memory address or nil pointer dereference 3. All Trigger Conditions (optional)select for update, on normal table join partition table 4. Workaround (optional)N/A 5. Affected versions[v5.0.0:v5.0.x], [v5.1.0:v5.1.x] 6. Fixed versionsmaster |
( AffectedVersions ) fields are empty. |
2 similar comments
( AffectedVersions ) fields are empty. |
( AffectedVersions ) fields are empty. |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
No error
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: