Bug #19492 --binlog-do-db option cuases tables create issues for ndb master
Submitted: 2 May 2006 20:41 Modified: 22 May 2006 14:50
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
Category:MySQL Cluster: Replication Severity:S2 (Serious)
Version:5.1.10 OS:Linux (Linux 32 Bit OS)
Assigned to: Tomas Ulin CPU Architecture:Any

[2 May 2006 20:41] Jonathan Miller
Found running rpl_create_database.test.

The test contains to option files. One for the master and one for the slave.
Both contain:
--binlog-do-db=mysqltest_sisyfos --binlog-do-db=mysqltest_prometheus

If the test runs as part of a large run it will fail with:
mysqltest: At line 29: query 'CREATE TABLE t1 (b int)' failed: 1005: Can't create table 'mysqltest_sisyfos.t1' (errno: 157)

If the test is ran as standalone you get:
WARNING: Waited 180.1 seconds for /home/ndbdev/jmiller/clones/mysql-5.1-new/mysql-test/var/master-data/cluster/apply_status.ndb to be created, still waiting for #### seconds...

In the master error log you find:
060502 23:25:38 [Note] NDB: Creating cluster.apply_status
060502 23:25:38 [ERROR] NDB: CREATE TABLE IF NOT EXISTS cluster.apply_status ( server_id INT UNSIGNED NOT NULL, epoch BIGINT UNSIGNED NOT NULL,  PRIMARY KEY USING HASH (server_id) ) ENGINE=NDB: error Can't create table 'cluster.apply_status' (errno: 157) 1005 1 1

Removing both the OPT files and the test runs fine, of course without the correct resutls but the above errors are not incurred.

If you run the test with just the master OPT file and with only one or both --binlog-do-db= you will get the errors. 

If you remove the master OPT file and reinstate the slave OPT, the test passes without issue.
TEST                           RESULT         TIME (ms)
rpl_create_database            [ pass ]          38666

How to repeat:
 ./mysql-test-run.pl --do-test=rpl_create_database --force --mysqld=--default-storage-engine=ndb --with-ndbcluster-all

Suggested fix:
Fix NDB Injector thread to work with  --binlog-do-db option
[2 May 2006 21:05] Jonathan Miller
-- The test contains to option files. One for the master and one for the slave.
Both contain: --binlog-do-db=mysqltest_sisyfos --binlog-do-db=mysqltest_prometheus

++ The test contains two (2) option files. One for the master and one for the slave.
Both contain: --binlog-do-db=mysqltest_sisyfos --binlog-do-db=mysqltest_prometheus
[5 May 2006 21:33] 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:

[22 May 2006 14:31] Tomas Ulin
pushed to 5.1.10
[22 May 2006 14:50] 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

Additional info:

Documented bugfix in 5.1.10 changelog; closed.