Skip to content

Commit

Permalink
session: reset CTEStorageMap before txn conflict and retry() #49399 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancaiamao authored May 17, 2024
1 parent fd44473 commit 4f182e3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,7 @@ func (s *session) retry(ctx context.Context, maxCnt uint) (err error) {
for i, sr := range nh.history {
st := sr.st
s.sessionVars.StmtCtx = sr.stmtCtx
s.sessionVars.StmtCtx.CTEStorageMap = map[int]*executor.CTEStorages{}
s.sessionVars.StmtCtx.ResetForRetry()
s.sessionVars.PreparedParams = s.sessionVars.PreparedParams[:0]
schemaVersion, err = st.RebuildPlan(ctx)
Expand Down

0 comments on commit 4f182e3

Please sign in to comment.