Description:
Running ALTER EVENT on an event can change the status of that event. May be related to the previously fixed Bug #31539.
How to repeat:
CREATE TABLE tbl_test(a int);
CREATE EVENT evt_test ON SCHEDULE EVERY 3 SECOND DISABLE ON SLAVE DO INSERT INTO tbl_test(a) VALUES(1);
SHOW EVENTS\G
ALTER EVENT evt_test ON SCHEDULE EVERY 4 SECOND;
SHOW EVENTS\G
Output:
mysql [localhost] {msandbox} (test) > CREATE TABLE tbl_test(a int);
Query OK, 0 rows affected (0.01 sec)
mysql [localhost] {msandbox} (test) > CREATE EVENT evt_test ON SCHEDULE EVERY 3 SECOND DISABLE ON SLAVE DO INSERT INTO tbl_test(a) VALUES(1);
Query OK, 0 rows affected (0.00 sec)
mysql [localhost] {msandbox} (test) > SHOW EVENTS\G
*************************** 1. row ***************************
Db: test
Name: evt_test
Definer: msandbox@%
Time zone: SYSTEM
Type: RECURRING
Execute at: NULL
Interval value: 3
Interval field: SECOND
Starts: 2010-10-01 01:19:05
Ends: NULL
Status: SLAVESIDE_DISABLED
Originator: 0
character_set_client: latin1
collation_connection: latin1_swedish_ci
Database Collation: latin1_swedish_ci
1 row in set (0.00 sec)
mysql [localhost] {msandbox} (test) > ALTER EVENT evt_test ON SCHEDULE EVERY 4 SECOND;
Query OK, 0 rows affected (0.00 sec)
mysql [localhost] {msandbox} (test) > SHOW EVENTS\G
*************************** 1. row ***************************
Db: test
Name: evt_test
Definer: msandbox@%
Time zone: SYSTEM
Type: RECURRING
Execute at: NULL
Interval value: 4
Interval field: SECOND
Starts: 2010-10-01 01:19:05
Ends: NULL
Status: ENABLED
Originator: 0
character_set_client: latin1
collation_connection: latin1_swedish_ci
Database Collation: latin1_swedish_ci
1 row in set (0.00 sec)
Suggested fix:
Status should remain in SLAVESIDE_DISABLED state unless specifically changed.