I need to create an event inside a procedure, I read somewhere that it's possible but I don't know the syntax. I'm trying:
CREATE PROCEDURE DUMMY_PROCEDURE() BEGIN CREATE event e on schedule every 1 second DO INSERT INTO test.t values (current_timestamp); END;
But it throws:
Any ideas on how to do this?, thanks for reading.
'#1576 - Recursion of EVENT DDL statements is forbidden when body is present
Edit1:
The reason I want to create an event within an event procedure is because it acts as an expiration date, so the function is executed an event with very specific parameters is also created, so when the expiration date arrives, automatically bank makes a particular action. Understand?