MySQL Forums
Forum List  »  Triggers

mysql update trigger not working
Posted by: Leon Kong
Date: June 14, 2012 12:03AM

env: mysql server A is master, mysql server B is slave of A。 B have a table t1 , sync form A,another table t2 was insert and update by two triggers on t1

CREATE TRIGGER tri_insert AFTER INSERT ON t1 FOR EACH ROW BEGIN INSERT INTO W_ListenRec(id,userdata) VALUES (new.id,new.userdata); END;

CREATE TRIGGER tri_update AFTER UPDATE ON t1 FOR EACH ROW BEGIN UPDATE t2 SET time= new.time WHERE id = new.id; END;

when insert a record on A.t1, B.t1 add a record and then B.t2 add a record by TRIGGER tri_insert when A.t1 update a record, B.t1 update the same record,but B.t2 will not be updated, same like TRIGGER tri_update not work。

that is too puzzy,who can tell me why?

Options: ReplyQuote


Subject
Views
Written By
Posted
mysql update trigger not working
5466
June 14, 2012 12:03AM
1681
June 14, 2012 08:53PM


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.