MySQL Forums
Forum List  »  Triggers

conditional trigger
Posted by: Kim Hambuchen
Date: April 24, 2006 03:57PM

I am doing dual-master replication that will have a user on each master entering info, possibly simultaneously and/or conflicting (is research project). I need a trigger (on insert or on update) that will only insert/update conditionally. That is, if a record exists on the slave w/ information that conflicts with the master record according to a priori rules, do not complete the insert/update. I could accomplish this using rollback/commit procedures but they are not allowed. I attempted to throw an error if the trigger did not complete, but that shuts down my Slave SQL thread(which I can only manage to restart by shutting down the slave server and deleting bin files). Since the error is known and expected, I do not wish for the thread to shut down. Does anyone know if there is a way to implement conditional triggers?

Thanks.

Options: ReplyQuote


Subject
Views
Written By
Posted
conditional trigger
3311
April 24, 2006 03:57PM


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.