mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
rpl.rpl_invoked_features fails sporadically with "Duplicate key error"
The reason was that Event e11 was re-executed before "ALTER EVENT e11 DISABLE" had been executed. Fixed by increasing re-schedule time Other things: - Removed double accounting of 'execution_count'. It was incremented in top->mark_last_executed(thd) that was executed a few lines earlier.
This commit is contained in:
@ -45,14 +45,14 @@ BEGIN
|
||||
UPDATE t12 SET c = '';
|
||||
UPDATE t13 SET c = '';
|
||||
END|
|
||||
CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND DISABLE DO
|
||||
CREATE EVENT e1 ON SCHEDULE EVERY 10 SECOND DISABLE DO
|
||||
BEGIN
|
||||
ALTER EVENT e1 DISABLE;
|
||||
CALL p1(10, '');
|
||||
END|
|
||||
Warnings:
|
||||
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
|
||||
CREATE EVENT e11 ON SCHEDULE EVERY 1 SECOND DISABLE DO
|
||||
CREATE EVENT e11 ON SCHEDULE EVERY 10 SECOND DISABLE DO
|
||||
BEGIN
|
||||
ALTER EVENT e11 DISABLE;
|
||||
CALL p11(10, '');
|
||||
|
@ -102,14 +102,17 @@ BEGIN
|
||||
UPDATE t13 SET c = '';
|
||||
END|
|
||||
|
||||
# Create events which will run every 1 sec
|
||||
CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND DISABLE DO
|
||||
# Create events which will run every 10 sec
|
||||
# It cannot be much shorter as we have to ensure that a new
|
||||
# event is not scheduled before the DISABLE has been
|
||||
# executed.
|
||||
CREATE EVENT e1 ON SCHEDULE EVERY 10 SECOND DISABLE DO
|
||||
BEGIN
|
||||
ALTER EVENT e1 DISABLE;
|
||||
CALL p1(10, '');
|
||||
END|
|
||||
|
||||
CREATE EVENT e11 ON SCHEDULE EVERY 1 SECOND DISABLE DO
|
||||
CREATE EVENT e11 ON SCHEDULE EVERY 10 SECOND DISABLE DO
|
||||
BEGIN
|
||||
ALTER EVENT e11 DISABLE;
|
||||
CALL p11(10, '');
|
||||
|
@ -650,7 +650,6 @@ Event_queue::get_top_for_execution_if_time(THD *thd,
|
||||
top->status= Event_parse_data::DISABLED;
|
||||
DBUG_PRINT("info", ("event %s status is %d", top->name.str, top->status));
|
||||
|
||||
top->execution_count++;
|
||||
(*event_name)->dropped= top->dropped;
|
||||
/*
|
||||
Save new values of last_executed timestamp and event status on stack
|
||||
|
Reference in New Issue
Block a user