Spec-Zone .ru
спецификации, руководства, описания, API
|
Some forms of the FLUSH
statement are not logged because they could cause problems if replicated to
a slave: FLUSH
LOGS
, FLUSH MASTER
, FLUSH
SLAVE
, and FLUSH TABLES WITH READ LOCK
. For a syntax example, see Section
13.7.6.3, "FLUSH
Syntax". The FLUSH TABLES
, ANALYZE TABLE
, OPTIMIZE TABLE
, and REPAIR TABLE
statements are written to the binary log and thus replicated to
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 GRANT
, you must issue a FLUSH PRIVILEGES
on the slaves to put the new privileges into effect. In
addition, if you use FLUSH TABLES
when renaming a MyISAM
table that
is part of a MERGE
table, you must issue FLUSH TABLES
manually on the slaves. These statements are written to the
binary log unless you specify NO_WRITE_TO_BINLOG
or its alias LOCAL
.