MySQL Forums
Forum List  »  Events (Job Scheduler)

alter event status in trigger
Posted by: Nithya Natarajan
Date: October 17, 2014 05:18AM

Is it possible to alter event status in trigger?

I have created an event:
DELIMITER $$
CREATE EVENT `testdb`.`test_event`
ON SCHEDULE
AT CURRENT_TIMESTAMP
ON COMPLETION PRESERVE DISABLE
DO
BEGIN
CALL test_proc();
END$$
DELIMITER ;

Trigger:
DELIMITER $$
CREATE TRIGGER `testdb`.`test_trigger` AFTER UPDATE
ON `testdb`.`testtable`
FOR EACH ROW BEGIN
ALTER EVENT test_event ENABLE;
END$$
DELIMITER ;

But i got the following error while creating a trigger

Error Code: 1422
Explicit or implicit commit is not allowed in stored function or trigger.

Options: ReplyQuote


Subject
Views
Written By
Posted
alter event status in trigger
2301
October 17, 2014 05:18AM


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.