Why Does MySQL Skip Redundant UPDATEs in ROW Binlog Mode?
This article tests whether MySQL re‑executes an UPDATE that sets a row to its existing values, comparing the behavior under binlog_format=ROW with binlog_row_image=FULL versus binlog_format=STATEMENT, and explains why redundant updates are ignored in ROW mode.
Background
This article tests whether MySQL re‑executes an UPDATE statement that does not change any data (i.e., the new values are identical to the existing ones).
Test Environment
MySQL 5.7.25
CentOS 7.4
binlog_format = ROW
1. Parameters
2. Test Steps
session1
session2
session1
3. Summary
When binlog_format=row and binlog_row_image=FULL , MySQL records all column values in the binlog, so reading the data pulls all fields. Consequently, an UPDATE that does not change any values is skipped: InnoDB receives a “modify to (1,55)” request, detects no change, and returns without updating.
binlog_format = STATEMENT
1. Parameters
2. Test Steps
session1
session2
session1
3. Summary
When binlog_format=statement and binlog_row_image=FULL , InnoDB fully executes the UPDATE, performing the “modify to (1,999)” operation, acquiring necessary locks and applying the change.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Java Backend Technology
Focus on Java-related technologies: SSM, Spring ecosystem, microservices, MySQL, MyCat, clustering, distributed systems, middleware, Linux, networking, multithreading. Occasionally cover DevOps tools like Jenkins, Nexus, Docker, and ELK. Also share technical insights from time to time, committed to Java full-stack development!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
