Databases 3 min read

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.

Java Backend Technology
Java Backend Technology
Java Backend Technology
Why Does MySQL Skip Redundant UPDATEs in ROW Binlog 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.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

InnoDBmysqlBinlogRowUPDATEStatement
Java Backend Technology
Written by

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!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.