Oracle 5.0 Reference Manual page 1520

Table of Contents

Advertisement

the compiler used to build MySQL, and so forth. See
Evaluation", and
16.4.1.7. Replication and
Some forms of the
to a slave:
FLUSH
For a syntax example, see
OPTIMIZE
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
a
FLUSH PRIVILEGES
FLUSH TABLES
manually on the slaves. These statements are written to the binary log unless you specify
TABLES
NO_WRITE_TO_BINLOG
16.4.1.8. Replication and System Functions
Certain functions do not replicate well under some conditions:
• The
USER()
LOAD_FILE()
slave.
• For
NOW()
call to this function on the master is replicated to the slave. This can lead to a possibly unexpected
result when replicating between MySQL servers in different time zones. Suppose that the master
is located in New York, the slave is located in Stockholm, and both servers are using local time.
Suppose further that, on the master, you create a table mytable, perform an
this table, and then select from the table, as shown here:
mysql>
CREATE TABLE mytable (mycol TEXT);
Query OK, 0 rows affected (0.06 sec)
mysql>
INSERT INTO mytable VALUES ( NOW() );
Query OK, 1 row affected (0.00 sec)
mysql>
SELECT * FROM mytable;
+---------------------+
| mycol
+---------------------+
| 2009-09-01 12:00:00 |
+---------------------+
1 row in set (0.00 sec)
Local time in Stockholm is 6 hours later than in New York; so, if you issue
slave at that exact same instant, the value
if you select from the slave's copy of
just shown have been replicated, you might expect
18:00:00. However, this is not the case; when you select from the slave's copy of mytable, you
obtain exactly the same result as on the master:
mysql>
SELECT * FROM mytable;
+---------------------+
| mycol
+---------------------+
| 2009-09-01 12:00:00 |
+---------------------+
1 row in set (0.00 sec)
As of MySQL 5.0.13, the
Implications are that
Replication Features and Issues
Section C.5.5.8, "Problems with Floating-Point
FLUSH
statement are not logged because they could cause problems if replicated
FLUSH
LOGS,
FLUSH
MASTER,
Section 13.7.6.2,
TABLE, and
REPAIR TABLE
database and update those tables directly without using GRANT, you must issue
mysql
on the slaves to put the new privileges into effect. In addition, if you use
when renaming a
or its alias LOCAL.
[964],
CURRENT_USER()
[890]
functions are replicated without change and thus do not work reliably on the
[926], the binary log includes the timestamp. This means that the value as returned by the
|
|
SYSDATE()
SYSDATE()
Section 12.2, "Type Conversion in Expression
SLAVE, and
FLUSH
"FLUSH
Syntax". The
statements are written to the binary log and thus replicated to
table that is part of a
MyISAM
[959],
[967],
UUID()
2009-09-01 18:00:00
after the
mytable
mycol
[928]
function is no longer equivalent to
[928]
is not replication-safe because it is not affected by
1500
Values".
FLUSH TABLES WITH READ
FLUSH
TABLES,
table, you must issue
MERGE
[964], and
VERSION()
INSERT
SELECT NOW()
is returned. For this reason,
and
CREATE TABLE
INSERT
to contain the value
NOW()
LOCK.
ANALYZE
TABLE,
FLUSH
statement on
on the
statements
2009-09-01
[926].
SET

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents