The FOREIGN_KEY_CHECKS,
SQL_MODE, UNIQUE_CHECKS,
and SQL_AUTO_IS_NULL variables are all
replicated (this has been true since MySQL 5.0). The
storage_engine system variable (also known as
table_type) is not yet replicated in MySQL
5.1, which is a good thing for replication between different
storage engines.
Session variables are not replicated properly when used in
statements that update tables. For example, SET
MAX_JOIN_SIZE=1000 followed by INSERT INTO
mytable VALUES(@@MAX_JOIN_SIZE) will not insert the
same data on the master and the slave. This does not apply to
the common sequence of SET TIME_ZONE=...
followed by INSERT INTO mytable
VALUES(CONVERT_TZ(...,...,@@time_zone)).
Replication of session variables is not a problem when row-based replication is being used. See Section 6.1.2, “Replication Formats”.

User Comments
Add your own comment.