Before MySQL 4.1.1, the
OPTIMIZE TABLE, and
REPAIR TABLE statements are not
written to the binary log and thus are not replicated to the
slaves. This is not normally a problem because these statements
do not modify table data.
However, this behavior can cause difficulties under certain
circumstances. If you replicate the privilege tables in the
mysql database and update those tables
directly without using the
statement, you must issue a
PRIVILEGES statement on your slaves to put the new
privileges into effect. Also if you use
when renaming a
MyISAM table that is part of
MERGE table, you must issue
manually on the slaves.
As of MySQL 4.1.1, these statements are written to the binary
log (unless you specify
LOCAL). Exceptions are that
FLUSH TABLES WITH
READ LOCK are not logged in any case because they may
cause problems if replicated to a slave. For a syntax example,
see Section 188.8.131.52, “FLUSH Syntax”.