Running this procedure causes MySQL (or phpMyAdmin) to freeze. I have to stop MySQL with the XAMPP command, which freezes and doesn't respond about 20 seconds before it stops. I believe this is caused by the separator command, which in itself starts the problems. I tried using a different delimiter ("//") without effect.
DELIMITER $ CREATE TRIGGER coroner AFTER INSERT ON events FOR EACH ROW BEGIN UPDATE teams WHERE id = NEW.victim SET live = live-1; UPDATE teams WHERE id = NEW.shooter SET score = score+points; END $ DELIMITER ;
source share