If a statement produces the same error (identical error code) on both the master and the slave, the error is logged, but replication continues.
If a statement produces different errors on the master and the
slave, the slave SQL thread terminates, and the slave writes a
message to its error log and waits for the database
administrator to decide what to do about the error. This
includes the case that a statement produces an error on the
master or the slave, but not both. To address the issue, connect
to the slave manually and determine the cause of the problem.
SHOW SLAVE STATUS is useful for
this. Then fix the problem and run START
SLAVE. For example, you might need to create a
nonexistent table before you can start the slave again.
If this error code validation behavior is not desirable, some or
all errors can be masked out (ignored) with the
--slave-skip-errors option. This
option is available starting with MySQL 3.23.47.
For nontransactional storage engines such as
MyISAM, it is possible to have a statement
that only partially updates a table and returns an error code.
This can happen, for example, on a multiple-row insert that has
one row violating a key constraint, or if a long update
statement is killed after updating some of the rows. If that
happens on the master, the slave expects execution of the
statement to result in the same error code. If it does not, the
slave SQL thread stops as described previously.

User Comments
Add your own comment.