Bug #17188 CRBR: ignores --binlog_ignore_db= settings
Submitted: 7 Feb 2006 13:20 Modified: 14 Feb 2006 10:40
Reporter: Jonathan Miller
Status: Closed
Category:Server: Cluster Severity:S3 (Non-critical)
Version:5.1.7-alpha OS:Linux (Linux 32 Bit OS)
Assigned to: Tomas Ulin Target Version:

[7 Feb 2006 13:20] Jonathan Miller
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.
[7 Feb 2006 18:08] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/2253
[7 Feb 2006 18:26] Tomas Ulin
pushed into 5.1.7
[14 Feb 2006 10:40] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented bugfix in 5.1.7 changelog. CLosed.