Mysql – Is the MySQL replica’s data consistent if the Master was switched to binlog_format = MIXED but the Slave’s relay logs were rotated sometime later

MySQLreplication

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

Best Answer

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.