MySQL Forums
Forum List  »  Replication

Re: A qq reg SBL with current_timestamp()
Posted by: Rick James
Date: September 22, 2012 05:26PM

The goal of replication is for the Slave(s) to have exactly the same data as the Master. This implies that all non-deterministic values (RAND, NOW, CURRENT_TIMESTAMP, etc) must be passed through the replication stream (binlog->relaylog), not recreated on the Slave.

There are many exceptions, and even the ones mentioned above have issues.

See
http://dev.mysql.com/doc/refman/5.5/en/replication-features-functions.html
and the sibling pages.

Note that there are many things that impact the question --
* Version
* --sysdate-is-now option
* Row vs Statement based replication
* Whether the function is called multiple times (eg, a multi-row UPDATE).
* Whether the Master and Slave are set to the same timezone. (CURRENT_TIMESTAMP() is affected by this.)

My guess is that the problem you point out has always been there (or not). SYSDATE() is a different matter; it returns the exact time at which it executes unless you have --sysdate-is-now.

Options: ReplyQuote


Subject
Views
Written By
Posted
2166
September 20, 2012 04:33AM
Re: A qq reg SBL with current_timestamp()
1270
September 22, 2012 05:26PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.