Bug #46424 Table creation is not replicated in some cases
Submitted: 28 Jul 2009 9:09 Modified: 28 Jul 2009 10:13
Reporter: zohar aharoni Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.1.33 OS:Linux (CentOS release 5.2)
Assigned to: CPU Architecture:Any
Tags: replication

[28 Jul 2009 9:09] zohar aharoni
Description:
Hi,
When creating a table when I'm not in a specific database the table creation is not being replicated to the slaves.
When I'm running the same "create" from the databse it is working...

for example:

create table dbtest.test_table(a integer primary key);

first try to run this before "using" dbtest databse. it will not be replicated.
then - "use" dbtest, run the create. the table creation will be replicated...

I'm using MIXED mode in read commited environment...
I'm using:
replicate-do-db = dbtest

How to repeat:
create table dbtest.test_table(a integer primary key);

first try to run this before "using" dbtest databse. it will not be replicated.
then - "use" dbtest, run the create. the table creation will be replicated...

Suggested fix:
I think that the parser should notice that I'm creating table in replicated database even if I'm not running it from the database itself...
[28 Jul 2009 10:13] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Please read at http://dev.mysql.com/doc/refman/5.1/en/replication-options-slave.html#option_mysqld_replic... how option replicate-do-db works