-
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
CTE query execute failed: type assertion for CTEStorageMap failed #46522
Labels
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
affects-7.5
found/gs
found by gs
report/customer
Customers have encountered this bug.
severity/major
sig/sql-infra
SIG: SQL Infra
type/bug
The issue is confirmed as a bug.
type/regression
Comments
here is the stack error information: [err="type assertion for CTEStorageMap failed
github.com/pingcap/tidb/executor.(*executorBuilder).buildCTE
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/builder.go:5140
github.com/pingcap/tidb/executor.(*executorBuilder).build
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/builder.go:308
github.com/pingcap/tidb/executor.(*executorBuilder).buildIndexLookUpJoin
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/builder.go:3059
github.com/pingcap/tidb/executor.(*executorBuilder).buildIndexNestedLoopHashJoin
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/builder.go:3289
github.com/pingcap/tidb/executor.(*executorBuilder).build
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/builder.go:262
github.com/pingcap/tidb/executor.(*executorBuilder).buildProjection
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/builder.go:1686
github.com/pingcap/tidb/executor.(*executorBuilder).build
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/builder.go:270
github.com/pingcap/tidb/executor.(*executorBuilder).buildInsert
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/builder.go:867
github.com/pingcap/tidb/executor.(*executorBuilder).build
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/builder.go:200
github.com/pingcap/tidb/executor.(*ExecStmt).buildExecutor
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/adapter.go:1110
github.com/pingcap/tidb/executor.(*ExecStmt).Exec
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/adapter.go:513
github.com/pingcap/tidb/session.(*session).retry
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:1286
github.com/pingcap/tidb/session.(*session).doCommitWithRetry
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:1008
github.com/pingcap/tidb/session.(*session).CommitTxn
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:1114
github.com/pingcap/tidb/session.autoCommitAfterStmt
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/tidb.go:282
github.com/pingcap/tidb/session.finishStmt
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/tidb.go:248
github.com/pingcap/tidb/session.runStmt
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:2392
github.com/pingcap/tidb/session.(*session).ExecuteStmt
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:2237
github.com/pingcap/tidb/server.(*TiDBContext).ExecuteStmt
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/driver_tidb.go:252
github.com/pingcap/tidb/server.(*clientConn).handleStmt
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:2122
github.com/pingcap/tidb/server.(*clientConn).handleQuery
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1972
github.com/pingcap/tidb/server.(*clientConn).dispatch
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1403
github.com/pingcap/tidb/server.(*clientConn).Run
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1152
github.com/pingcap/tidb/server.(*Server).onConn
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/server.go:648
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1594"] |
ti-chi-bot
bot
added
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
Aug 30, 2023
What's the SQL and table schema? @knull-cn |
/found gs |
/label affects-6.5 |
From @jackysp
|
The root cause is that if the CTE run to commit and auto retry, it rebuild the executor, but the |
13 tasks
jackysp
added
affects-5.3
This bug affects 5.3.x versions.
affects-5.4
This bug affects 5.4.x versions.
affects-6.1
affects-7.1
and removed
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-7.1
labels
Dec 13, 2023
13 tasks
This was referenced Dec 13, 2023
This was referenced May 17, 2024
/found customer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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
affects-7.5
found/gs
found by gs
report/customer
Customers have encountered this bug.
severity/major
sig/sql-infra
SIG: SQL Infra
type/bug
The issue is confirmed as a bug.
type/regression
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
run cte-query
2. What did you expect to see? (Required)
run success and no error
3. What did you see instead (Required)
run failed and stack info
4. What is your TiDB version? (Required)
v6.5.3
The text was updated successfully, but these errors were encountered: