Skip to content

Commit

Permalink
txn: fix retried transactions' statements is not inclueded in TIDB_TRX (
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-srebot authored Oct 13, 2021
1 parent c62fc9f commit 9751790
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,10 @@ func (s *session) retry(ctx context.Context, maxCnt uint) (err error) {
zap.Uint("retryCnt", retryCnt),
zap.Int("queryNum", i))
}
_, digest := s.sessionVars.StmtCtx.SQLDigest()
s.txn.onStmtStart(digest.String())
_, err = st.Exec(ctx)
s.txn.onStmtEnd()
if err != nil {
s.StmtRollback()
break
Expand Down

0 comments on commit 9751790

Please sign in to comment.