Bug #73441 schedule event history
Submitted: 30 Jul 2014 18:44 Modified: 6 Apr 2018 16:44
Reporter: Mathias Brem Garcia Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Information schema Severity:S4 (Feature request)
Version:8.0.5, 8.0.4, 8.0.3,8.0.2,8.0.1, 5.7, 5.6 OS:Any
Assigned to: CPU Architecture:Any
Tags: Event, schedule

[30 Jul 2014 18:44] Mathias Brem Garcia
Description:
For example, i have a event on event scheduler, on first execution, the event (test1) is executed with success! But on second execution, the event (test1) failed! In mysql don't have a historic for analyze the execution status.

I think, is necessary for analyze errors or report status the routine implemented on schedule.

How to repeat:
This example make a failed on second execution:

USE mysql;
CREATE TABLE test(a INT);

DELIMITER $$
 
CREATE PROCEDURE stupidInsertDrop()
BEGIN 

INSERT INTO mysql.test(a) values(1);
DROP TABLE mysql.test;
 
END$$
 
DELIMITER ;
 
use mysql;

CREATE EVENT stupidInsertDrop
ON SCHEDULE EVERY 2 MINUTE
DO CALL stupidInsertDrop;

On first execution the event complete wich success! But on second execution this events failed, because the table "test" does not existis!

So, in MySQL Don't have a column in "mysql.event" with status for last execution or a new table for execution history

Suggested fix:
My suggestion:

CREATE a new table "EVENT_HISTORY" in mysql schema and implement the historic to events executions or implement a column "STATUS_LAST_EXECUTION" on a table "EVENT".
[6 Apr 2018 16:44] Kumar Verma
Could not find a table that contains a complete history for Event scheduler executions