Bug #25388 DROP DATABASE is not relayed in a replication chain
Submitted: 3 Jan 2007 14:18 Modified: 8 Jan 2007 8:39
Reporter: Michael Zimmermann Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.0.27 OS:Linux (Linux)
Assigned to: CPU Architecture:Any
Tags: drop database, relay, replication

[3 Jan 2007 14:18] Michael Zimmermann
Description:
In a replication-chain with more than two servers a DROP DATABASE command
is only replayed on the first slave.

How to repeat:
Setup 3 Servers for replication -
on all servers mysql-DB and test-DB is excluded from the bin-logs

Start server A, create a database X on it.

Setup server B as a slave of server A - excluding mysql-DB and test-DB
B: stop server
-synchronize B to A with:
A: FLUSH TABLES WITH READ LOCK;
A: copy database X via a rsync to B:
A: SHOW MASTER STATUS;
A: UNLOCK TABLES;
B: start server
B: SET MASTER TO ... with values from A ...
B: START SLAVE;

Setup server C likewise as a slave of server B.

Execute "DROP DATABASE X;" on Server A.
Result: Database X is dropped on Server A and Server B,
but is NOT dropped on server C.
[3 Jan 2007 20:07] Valeriy Kravchuk
Thank you for a problem report. Please, send my.cnf files for all three servers. Just to be sure.
[7 Jan 2007 19:19] MySQL Verification Team
Michael,

Thank you for the bug report, but this is not really a bug.
By default slave doesn't log events that come from master. You can enabled it with --log-slave-updates option.

http://dev.mysql.com/doc/refman/5.0/en/replication-options.html
[8 Jan 2007 8:39] Michael Zimmermann
Ooops, sorry for the hassle I caused.