Bug #51621 DROP VIEW on a nonexistent view on a master causes replication to break on the s
Submitted: 1 Mar 2010 20:14 Modified: 2 Mar 2010 7:28
Reporter: Sheeri Cabral (Candidate Quality Contributor) Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.0.45 OS:Linux
Assigned to: CPU Architecture:Any
Tags: drop view, qc, replication, VIEW

[1 Mar 2010 20:14] Sheeri Cabral
DROP VIEW statements are always replicated, even if the view does not exist on the master.  This causes replication to break when the views are not on the slaves, either.

master-mysql> drop view fdsbjkewbjrkewbrekjw;
ERROR 1051 (42S02): Unknown table 'fdsbjkewbjrkewbrekjw'

slave then has the following error:
[ERROR] [ERROR] Slave: Error 'Unknown table 'fdsbjkewbjrkewbrekjw'' on query. Default database: 'test'. Query: 'drop view fdsbjkewbjrkewbrekjw', Error_code: 1051
[ERROR] [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.xxxxxx' position xxxxxxxxx
Return Code: 2

How to repeat:
Just try it out....

Suggested fix:
Don't replicate this query
[2 Mar 2010 7:25] Sveta Smirnova
Thank you for the report.

This bug is not repeatable with current development sources and with later versions (tested with 5.0.67). Please upgrade.
[2 Mar 2010 7:28] Sveta Smirnova
Duplicate of bug #30998 really.