Description:
In debugging the test rpl_loaddata_m.test, I found that cluster replication was still replicating the test database. This was supposed to be ignored due to the master option file that contains --binlog_ignore_db=test. I assume this is due to the injector thread not being aware of the the ignore_db variable.
Output from a MyISAM run:
--- 18,31 ----
SELECT COUNT(*) FROM mysqltest.t1;
COUNT(*)
2
+ SHOW BINLOG EVENTS;
+ Log_name Pos Event_type Server_id End_log_pos Info
+ master-bin.000001 4 Format_desc 1 102 Server ver: 5.1.7-beta-log, Binlog ver: 4
+ master-bin.000001 102 Query 1 203 drop database if exists mysqltest
+ master-bin.000001 203 Query 1 296 CREATE DATABASE mysqltest
+ master-bin.000001 296 Query 1 404 use `mysqltest`; CREATE TABLE t1(a INT, b INT, UNIQUE(b))
+ master-bin.000001 404 Table_map 1 449 mysqltest.t1
+ master-bin.000001 449 Write_rows 1 496
SHOW DATABASES;
Database
information_schema
Output from NDBCluster run:
SELECT COUNT(*) FROM mysqltest.t1;
COUNT(*)
2
+ SHOW BINLOG EVENTS;
+ Log_name Pos Event_type Server_id End_log_pos Info
+ master-bin.000001 4 Format_desc 1 102 Server ver: 5.1.7-beta-log, Binlog ver: 4
+ master-bin.000001 102 Query 1 203 drop database if exists mysqltest
+ master-bin.000001 203 Query 1 267 BEGIN
+ master-bin.000001 267 Table_map 1 65 cluster_replication.apply_status
+ master-bin.000001 332 Write_rows 1 107
+ master-bin.000001 374 Table_map 1 147 test.t1
+ master-bin.000001 414 Write_rows 1 194
+ master-bin.000001 461 Query 1 526 COMMIT
+ master-bin.000001 526 Query 1 619 CREATE DATABASE mysqltest
+ master-bin.000001 619 Query 1 727 use `mysqltest`; CREATE TABLE t1(a INT, b INT, UNIQUE(b))
+ master-bin.000001 727 Query 1 791 BEGIN
+ master-bin.000001 791 Table_map 1 65 cluster_replication.apply_status
+ master-bin.000001 856 Write_rows 1 107
+ master-bin.000001 898 Table_map 1 152 mysqltest.t1
+ master-bin.000001 943 Write_rows 1 199
+ master-bin.000001 990 Query 1 1055 COMMIT
SHOW DATABASES;
Database
information_schema
***************
How to repeat:
Due to sync issues you will need to comment out the syncing of the slave and if you want binlog events you will need to add the show binlog events statement.
./mysql-test-run --force --mysqld=--binlog-format=row --do-test=rpl_loaddata_m
./mysql-test-run --force --ndb-extra-test --with-ndbcluster-all --mysqld=--default-storage-engine=ndb --do-test=rpl_loaddata_m
Suggested fix:
Cluster should handel all the variables that have an affect how the binlog acts on and controls data replication.