binlog_format = STATEMENT and CURRENT_TIMESTAMP with MySQL replication

Posted by xma on Stack Overflow See other posts from Stack Overflow or by xma
Published on 2010-05-18T22:07:52Z Indexed on 2010/05/18 22:10 UTC
Read the original article Hit count: 167

Filed under:
|

Hi,

can a MySQL slave instance have different row values for the same ID when binlog_format is set to STATEMENT and we insert something like:

insert into foo values(CURRENT_TIMESTAMP)

As I understand it, the slave read the SQL statement and execute it thus, if the replication is lagging, could lead to differences for the same row. Right or wrong ?

How can I avoid this situation ?

Thank you.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about replication