CREATE VIEW does not replicate to slave. Subsequent DROP VIEW breaks slave replication.
The setup:
I have a single master and a single slave, both running 5.0.18 from the SuSE Enterprise 9 RPMs. The conf is mostly derived from my-innodb-heavy-4G.cnf with some memory related tweaks and server-id and relay-log set appropriately. I set up replication using the procedure from the chapter "How to Set Up Replication" in the MySQL ref manual. It worked great; new tables and data replicated from the master almost instantantly.
The problem:
We can't get views to replicate. We used CREATE VIEW to create a new view on the master. The view did not replicate over. Not surprisingly, when we did a DROP VIEW on the master, the slave spit out the following error and replication stopped cold:
060110 20:34:47 [ERROR] Slave: Error 'Unknown table 'Traffic.v_shortterm'' on query. Default database: 'Traffic'.
Query: 'drop view v_shortterm', Error_code: 1051
To get replication working again, we create the view manually on the slave and restart the slave. The slave reads the DROP VIEW from the relay log and replication works normally again.
Has anyone run into this in their travels? Is it something we're doing wrong, something by design, or a bug? I've checked the forums and googled for issues with views and replication, but haven't found anyone with the same problem.
Thanks much,
Jon
Subject
Views
Written By
Posted
CREATE VIEW does not replicate to slave. Subsequent DROP VIEW breaks slave replication.
2593
January 18, 2006 04:44PM
1536
January 20, 2006 10:57AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.