Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
joechenrh committed Feb 6, 2025
1 parent 3883fa4 commit 7387692
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions executor/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ func updateRecord(
}
}

sc.AddTouchedRows(1)
// If no changes, nothing to do, return directly.
if !changed {
// See https://dev.mysql.com/doc/refman/5.7/en/mysql-real-connect.html CLIENT_FOUND_ROWS
Expand Down Expand Up @@ -255,8 +256,6 @@ func updateRecord(
}
}

sc.AddTouchedRows(1)

// If handle changed, remove the old then add the new record, otherwise update the record.
if handleChanged {
// For `UPDATE IGNORE`/`INSERT IGNORE ON DUPLICATE KEY UPDATE`
Expand Down

0 comments on commit 7387692

Please sign in to comment.