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. You should then connect to the slave
manually and determine the cause of the problem.
(SHOW SLAVE STATUS is useful for
this.) Then fix the problem (for example, you might need to
create a nonexistent table) and run START
SLAVE.
This is also the case if a statement produces an error on the master or the slave, but not both.
However, 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 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
example, since MyISAM ignores foreign key
constraints, an INSERT or
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
stop.


User Comments
Add your own comment.