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. 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.
SLAVE STATUS is useful for this. Then fix the problem
START SLAVE. For example,
you might need to create a nonexistent table before you can
start the slave again.
If you are replicating between tables that use different
storage engines, you should keep in mind that the same
statement might produce a different error when run against one
version of the table, but not the other, or might cause an
error for one version of the table, but not the other. For
MyISAM ignores foreign key
UPDATE statement accessing an
InnoDB table on the master might cause a
foreign key violation but the same statement performed on a
MyISAM version of the same table on the
slave would produce no such error, causing replication to
MySQL Enterprise. For instant notification when a slave thread terminates, subscribe to the MySQL Enterprise Monitor. For more information, see http://www.mysql.com/products/enterprise/advisors.html.