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)
prepare stmt1 using a point get plan
execute some autocommit point get with the prepared stmt1, now the prepared point get plan is cached
start transation
execute the same point get with prepared stmt1
2. What did you expect to see? (Required)
The result is returned.
3. What did you see instead (Required)
TiDB reports panic error in v4.0
err="runtime error: invalid memory address or nil pointer dereference\ngithub.com/pingcap/tidb/executor.(*recordSet).Next.func1\n\t/home/rwork/go/src/github.com/pingcap/tidb/executor/adapter.go:124\nruntime.gopanic\n\t/home/rwork/go/go/src/runtime/panic.go:679\nruntime.panicmem\n\t/home/rwork/go/go/src/runtime/panic.go:199\nruntime.sigpanic\n\t/home/rwork/go/go/src/runtime/signal_unix.go:394\ngithub.com/pingcap/tidb/session.(*TxnState).GetSnapshot\n\t:1\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).Next\n\t/home/rwork/go/src/github.com/pingcap/tidb/executor/point_get.go:151\ngithub.com/pingcap/tidb/executor.Next\n\t/home/rwork/go/src/github.com/pingcap/tidb/executor/executor.go:253\ngithub.com/pingcap/tidb/executor.(*recordSet).Next\n\t/home/rwork/go/src/github.com/pingcap/tidb/executor/adapter.go:128\ngithub.com/pingcap/tidb/server.
4. What is your TiDB version? (Required)
v4.0.8 v4.0.12.
v5.0.1 has the same problem, though it dose not panic, the execution logic is incorrect.
The error is caused that the in transaction point get execute with prepared statement params, the execution should not use the cached plan, the logic check is incomplete, the check should be used.
The text was updated successfully, but these errors were encountered:
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
prepare stmt1 using a point get plan
execute some autocommit point get with the prepared stmt1, now the prepared point get plan is cached
start transation
execute the same point get with prepared stmt1
2. What did you expect to see? (Required)
The result is returned.
3. What did you see instead (Required)
TiDB reports panic error in v4.0
err="runtime error: invalid memory address or nil pointer dereference\ngithub.com/pingcap/tidb/executor.(*recordSet).Next.func1\n\t/home/rwork/go/src/github.com/pingcap/tidb/executor/adapter.go:124\nruntime.gopanic\n\t/home/rwork/go/go/src/runtime/panic.go:679\nruntime.panicmem\n\t/home/rwork/go/go/src/runtime/panic.go:199\nruntime.sigpanic\n\t/home/rwork/go/go/src/runtime/signal_unix.go:394\ngithub.com/pingcap/tidb/session.(*TxnState).GetSnapshot\n\t:1\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).Next\n\t/home/rwork/go/src/github.com/pingcap/tidb/executor/point_get.go:151\ngithub.com/pingcap/tidb/executor.Next\n\t/home/rwork/go/src/github.com/pingcap/tidb/executor/executor.go:253\ngithub.com/pingcap/tidb/executor.(*recordSet).Next\n\t/home/rwork/go/src/github.com/pingcap/tidb/executor/adapter.go:128\ngithub.com/pingcap/tidb/server.
4. What is your TiDB version? (Required)
v4.0.8 v4.0.12.
v5.0.1 has the same problem, though it dose not panic, the execution logic is incorrect.
The error is caused that the in transaction point get execute with prepared statement params, the execution should not use the cached plan, the logic check is incomplete, the check should be used.
The text was updated successfully, but these errors were encountered: