Certain functions do not replicate well under some conditions:
The USER(),
CURRENT_USER(),
UUID(), and
LOAD_FILE() functions are
replicated without change and thus do not work reliably on
the slave. This is also true for
CONNECTION_ID() in slave
versions older than 4.1.1. The new implementation of the
PASSWORD() function in MySQL
4.1 is well replicated in masters from 4.1.1 and up, but
your slaves also must be 4.1.1 or above to replicate it. If
you have older slaves and need to replicate
PASSWORD() from your 4.1.x
master, you must start your master with the
--old-passwords option, so
that it uses the old implementation of
PASSWORD().
The PASSWORD() implementation
in MySQL 4.1.0 differs from every other version of MySQL.
Avoid using 4.1.0 in a replication scenario.
The GET_LOCK(),
RELEASE_LOCK(),
IS_FREE_LOCK(), and
IS_USED_LOCK() functions that
handle user-level locks are replicated without the slave
knowing the concurrency context on the master. Therefore,
these functions should not be used to insert into a master
table because the content on the slave would differ. For
example, do not issue a statement such as INSERT
INTO mytable VALUES(GET_LOCK(...)).
The FOUND_ROWS() function is
not replicated reliably. A workaround is to store the result
of the function call in a user variable, and then use that
in the INSERT statement. For
example, if you wish to store the result in a table named
mytable, you might normally do so like
this:
SELECT SQL_CALC_FOUND_ROWS FROM mytable LIMIT 1; INSERT INTO mytable VALUES( FOUND_ROWS() );
In 3.23, RAND() in updates
does not replicate properly. Use
RAND(
if you are replicating updates with
determinstic_expression)RAND(). You can, for example,
use UNIX_TIMESTAMP() as the
argument to RAND().

User Comments
Add your own comment.