gal.m
gal.m

Reputation: 45

Why using SKIP LOCKED is unsafe for statement based replication?

I'm reading about SKIP LOCKED on mysql documentation. is someone could try to help me understand what the reason that SKIP LOCKED is unsafe for statement based replication?

"Statements that use NO WAIT or SKIP LOCKED are unsafe for statement based replication"

source: https://dev.mysql.com/doc/refman/8.0/en/innodb-locking-reads.html#innodb-locking-reads-nowait-skip-locked

Or even, what they mean by saying "unsafe"?

Thank you!

Upvotes: 1

Views: 224

Answers (1)

Turbo J
Turbo J

Reputation: 7701

Or even, what they mean by saying "unsafe"?

It is quite trivial to see that these statements can behave differently on the master and on the slave.

Simply put, the slave will have a different idea whether to skip or not to skip the statement, leaving you with a difference in the slave database. Usually that is a very bad thing for replicated databases.

Upvotes: 1

Related Questions