MySQL Forums
Forum List  »  Triggers

Re: Before Update Trigger prevents further edit in MySQL 8.0
Posted by: David Harrison
Date: December 17, 2019 05:06PM

Hi Peter. I found a better way to populate the Updated column using DDL ON UPDATE syntax.

However, I decided to try a different trigger to see if the behavior persisted. It did. Here is the new trigger:

CREATE DEFINER = CURRENT_USER TRIGGER `idojo`.`Action_AFTER_INSERT` AFTER INSERT ON `Action` FOR EACH ROW
BEGIN
UPDATE Senshu S
SET S.PointTot = S.PointTot + 1
WHERE S.ID = NEW.SenshuID;
END

This trigger actually worked and updated the column in the Senshu table. However, when I try to edit the Action table I get the error messages described earlier.

Thank you.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Before Update Trigger prevents further edit in MySQL 8.0
556
December 17, 2019 05:06PM


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.