Skip to content

Commit

Permalink
fix: clear buffer on stmt retry
Browse files Browse the repository at this point in the history
Signed-off-by: ekexium <eke@fastmail.com>
  • Loading branch information
ekexium authored and ti-chi-bot committed May 11, 2023
1 parent ff8445c commit e02238c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sessiontxn/isolation/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ func (p *baseTxnContextProvider) OnPessimisticStmtEnd(_ context.Context, _ bool)
// OnStmtRetry is the hook that should be called when a statement is retried internally.
func (p *baseTxnContextProvider) OnStmtRetry(ctx context.Context) error {
p.ctx = ctx
p.sctx.GetSessionVars().TxnCtx.CurrentStmtPessimisticLockCache = nil
return nil
}

Expand Down

0 comments on commit e02238c

Please sign in to comment.