Monday, July 25, 2011

[Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.

Whenever a INSERT/UPDATE/DELETE query have LIMIT clause without ORDER BY clause on master server where replication type is STATEMENT,  such warnings can be seen in mysql error logs.
To avoid such warning we either have to satisfy the query with proper syntax or change the replication type to ROW from STATEMENT.
Here is detailed explanation

No comments:

Post a Comment