I want to run multiple events in different schemas. I am trying to use the events inside in one stored procedure. So that I can execute one Sp for all the schemas. But I am getting "Recursion of EVENT DDL statements is forbidden when body is present" this error.
Asked
Active
Viewed 927 times
0
-
You cannot fire an event manually. You can create a stored procedure for everything an event does, and let both the event and your stored procedure just call that procedure. Also: please add your code. Your error message implies that you are trying to create the events (not execute them). – Solarflare Jun 26 '17 at 08:57
-
Can you please share some examples for above mentioned issue. – Subramanian Jun 26 '17 at 12:51
-
I mean: create a procedure `A` (which does everything your event shall do). Then create your event, which will just consist of one line that calls procedure `A`. If you want to execute that event manually (e.g. in another procedure), you just call procedure `A` there too. – Solarflare Jun 26 '17 at 13:11
-
I have created the procedure where all the event related logic written. I Created event that one is calling the procedure internally. it's working fine .Thanks. – Subramanian Jul 05 '17 at 09:02