2

The accepted answer to this question is very helpful but it's not clear to me if one should be concerned about the replication that occurred from the time the Master's binlog_format was changed to MIXED to the time the Slave's relay logs were rotated.

There are no errors or warnings in the Slave's error log.

Both Master and Slave are MySQL 5.1

1 Answer 1

3

Relay log rotation have nothing to do with it.

What's critical is that the slaves, if set up with log_slave_updates (i.e. in themselves logging to binary logs), are pre-configured with binlog_format = MIXED or binlog_format = ROW.

To elaborate: there is no problem if the master uses binlog_format = STATEMENT and the slaves use ROW. There is a problem if the master uses ROW and the slaves use STATEMENT. You just can't restore the exact original statement from ROW format.

Likewise, if you master is MIXED, then slaves must be wither MIXED or ROW.

Back to your question, assuming the slaves are already configured with MIXED, there is no problem in just SET GLOBAL binlog_format = MIXED on the master. There is no problem in the binary log containing some entries of this format and some entries of the other. There is no problem with the relay logs containing entries of both forms.

I disagree with the accepted answer you linked to.

3
  • Thanks for your reply. The Slaves are not themselves logging to binary logs and are using the default binlog_format which would be STATEMENT. The linked to answer lead me to believe that provided the relay logs were rotated on the Slaves that all is good. Just to be crystal clear you are saying that the Slaves should have their binlog_format set to MIXED as well (the answer linked to indicated this could be done, not that it must be done). If there are no errors in the Slave's error log is it safe to switch to MIXED now or does the data on the Slave need to be initialized again?
    – HTTP500
    Commented Feb 10, 2014 at 13:38
  • I think the confusion is whether this only matters in the case where Slaves themselves have log_slave_updates enabled. My initial thoughts were that this was indeed the case but after reading the linked to answer I wasn't so sure. Reading your answer again and again leads me to believe that this is the case but if you could confirm that would be great. Thanks!
    – HTTP500
    Commented Feb 10, 2014 at 16:01
  • It you don't have "log_slave_updates" then you shouldn’t care about anything, really. Commented Feb 11, 2014 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.