Skip to content

Commit

Permalink
lock on replace
Browse files Browse the repository at this point in the history
Signed-off-by: zyguan <[email protected]>
  • Loading branch information
zyguan committed Apr 11, 2023
1 parent cbba3c2 commit 87b6f6c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions executor/replace.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ func (e *ReplaceExec) removeRow(ctx context.Context, txn kv.Transaction, handle
}
if rowUnchanged {
e.ctx.GetSessionVars().StmtCtx.AddAffectedRows(1)
_, err := appendUnchangedRowForLock(e.ctx, r.t, handle, oldRow)
if err != nil {
return false, err
}
return true, nil
}

Expand Down

0 comments on commit 87b6f6c

Please sign in to comment.