The server uses several logging formats to record information in the binary log. The exact format employed depends on the version of MySQL being used. There are three logging formats:
Replication capabilities in MySQL originally were based on
propagation of SQL statements from master to slave. This is
called statement-based logging. You can
cause this format to be used by starting the server with
In row-based logging, the master writes
events to the binary log that indicate how individual table
rows are affected. You can cause the server to use row-based
logging by starting it with
A third option is also available: mixed
logging. With mixed logging, statement-based
logging is used by default, but the logging mode switches
automatically to row-based in certain cases as described
below. You can cause MySQL to use mixed logging explicitly
by starting mysqld with the option
Support for row-based logging was added in MySQL 5.1.5. Mixed
logging is available beginning with MySQL 5.1.8. In MySQL
MIXED become the default logging
mode; in 5.1.29, the default was changed back to
STATEMENT for compatibility with MySQL 5.0.
Starting with MySQL 5.1.20, the logging format can also be set or limited by the storage engine being used. This helps to eliminate issues when replicating certain statements between a master and slave that are using different storage engines.
With statement-based replication, there may be issues with replicating nondeterministic statements. In deciding whether or not a given statement is safe for statement-based replication, MySQL determines whether it can guarantee that the statement can be replicated using statement-based logging. If MySQL cannot make this guarantee, it marks the statement as potentially unreliable and issues the warning, Statement may not be safe to log in statement format.
Prior to MySQL 5.1.36, this warning read, Statement is not safe to log in statement format. (Bug #42415)
You can avoid these issues by using MySQL's row-based replication instead.