MySQL Forums
Forum List  »  Events (Job Scheduler)

How to stop replicating events?
Posted by: Adam Newman
Date: August 21, 2012 06:40AM

Hello!

We had a problem where our slave attempted to replicate a "DROP EVENT" statement from our master, but the event did not exist on the slave and so an error occured, causing replication to halt.

The event didn't exist on our slave because while the event was running on the master, the slave (after processing the initial "CREATE EVENT" statement) was rebooted and "forgot" about the event. When the master finished its event, the slave received the "DROP EVENT" statement and threw an error.

I had to then pick through the binlogs to find the position of this statement and skip it which took some time.

We don't actually need to run the event on the master, and would prefer if we could prevent the replication of the EVENT statements altogether. Is there any way to do this? We've used a wildcard prefix for tables which works ok for that, but I can't see a way to do this for EVENTs?

There is another thread that asked this question but it appears to be closed:

http://forums.mysql.com/read.php?119,241951,241951#msg-241951

**EDIT**

Been digging around in the options and I still can't find anything that helps. A workaround would be to have the event scheduler use "DROP IF EXISTS" when purging the events on mysql shutdown. At least then only a warning would be generated and replication would not halt.

Is there any way to override the event scheduler purge process so it doesn't try to do a "DROP EVENT"?

Cheers,
Adam.



Edited 1 time(s). Last edit at 08/21/2012 08:12AM by Adam Newman.

Options: ReplyQuote


Subject
Views
Written By
Posted
How to stop replicating events?
3387
August 21, 2012 06:40AM
1951
August 23, 2012 01:59AM
1742
October 04, 2012 09:01AM


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.