Binary Log Format : I was thinking that since Percona XtraDB Cluster (PXC) required using binlog_format as ROW
, all the read-only Slaves should also have that setting.
binlog_do_db : It will record every option for a given database only. Notwithstanding, this is an option that is sometimes misunderstood. Please read this blog entry from mysqlperformanceblog on how replication can get confused.
Concerning binlog_do_db for ROW based binlogs
Row-based logging. Logging is restricted to database db_name. Only
changes to tables belonging to db_name are logged; the default
database has no effect on this. Suppose that the server is started
with --binlog-do-db=sales and row-based logging is in effect, and then
the following statements are executed:
USE prices;
UPDATE sales.february SET amount=amount+100;
The changes
to the february table in the sales database are logged in accordance
with the UPDATE statement; this occurs whether or not the USE
statement was issued. However, when using the row-based logging format
and --binlog-do-db=sales, changes made by the following UPDATE are not
logged:
USE prices;
UPDATE prices.march SET amount=amount-25;
Even if the USE
prices statement were changed to USE sales, the UPDATE statement's
effects would still not be written to the binary log.
Another important difference in --binlog-do-db handling for
statement-based logging as opposed to the row-based logging occurs
with regard to statements that refer to multiple databases. Suppose
that the server is started with --binlog-do-db=db1, and the following
statements are executed:
USE db1;
UPDATE db1.table1 SET col1 = 10, db2.table2 SET col2 = 20;
If you are using statement-based logging, the updates to both tables are
written to the binary log. However, when using the row-based format,
only the changes to table1 are logged; table2 is in a different
database, so it is not changed by the UPDATE. Now suppose that,
instead of the USE db1 statement, a USE db4 statement had been used:
USE db4;
UPDATE db1.table1 SET col1 = 10, db2.table2 SET col2 = 20;
In this case, the UPDATE statement is not written to the binary log when
using statement-based logging. However, when using row-based logging,
the change to table1 is logged, but not that to table2—in other words,
only changes to tables in the database named by --binlog-do-db are
logged, and the choice of default database has no effect on this
behavior.
Based on this, I would suggest, not do binlog_do_db in PXC, but, do replicate_do_db on the Slaves instead.
SHOW VARIABLES LIKE 'binlog_format';
from PXC and the Slaves?mysqld --version