Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
I fear this is going to get reclassified as a documentation bug rather than the behaviour being changed, but worth a shot:-
At present if one tries to create an EVENT within a compound statement but outside of a stored routine, the attempt fails with:
ERROR 1576 (HY000): Recursion of EVENT DDL statements is forbidden when body is present
For example:
DELIMITER //
IF @production IS NOT NULL THEN
CREATE EVENT IF NOT EXISTS report_stats ON SCHEDULE EVERY 5 MINUTE DO CALL report_stats();
ELSE
CREATE EVENT IF NOT EXISTS report_stats ON SCHEDULE EVERY 1 MINUTE DO CALL report_stats("Test");
END IF //
DELIMITER ;
Can you explain what you mean by behaviour being changed? Has it ever worked before?
If it did and it stopped working, it is a code bug, otherwise I indeed tend to see it as a documentation shortage:
And for the note, the error message "Recursion of EVENT DDL statements is forbidden when body is present" is really awful for any situation, and not suitable for this one (either within or outside an SP) at all.