Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
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 Feb 10 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 Feb 10 at 16:01
    
It you don't have "log_slave_updates" then you shouldn’t care about anything, really. –  Shlomi Noach Feb 11 at 10:33
    
Great, thanks for clarifying. –  HTTP500 Feb 11 at 15:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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