Bug #98491 Broken MTR case main.events_1

Submitted: 5 Feb 2020 9:41 Modified: 5 Feb 2020 10:51
Reporter: Hao LI Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.6,5.7,8.0 OS:Any
Assigned to: CPU Architecture:Any

[5 Feb 2020 9:41] Hao LI
Description:
Due to the scheduling datetimme of event has expired, so execution of this case will failed. and the error message as following: 

200203 16:42:15 [ 72%] main.errors                              w7  [ pass ]   2454
200203 16:42:17 [ 72%] main.events_1                            w7  [ fail ]
        Test ended at 2020-02-03 16:42:17

CURRENT_TEST: main.events_1
mysqltest: At line 69: Query 'ALTER EVENT event_starts_test ON SCHEDULE AT '2020-02-02 20:00:02'' failed.
ERROR 1589 (HY000): Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future.

The result from queries just before the failure was:
drop event if exists event1;
Warnings:
Note	1305	Event event1 does not exist
create event event1 on schedule every 15 minute starts now() ends date_add(now(), interval 5 hour) DO begin end;
alter event event1 rename to event2 enable;
alter event event2 disable;
alter event event2 enable;
alter event event2 on completion not preserve;
alter event event2 on schedule every 1 year on completion preserve rename to event3 comment "new comment" do begin select 1; end__
alter event event3 rename to event2;
drop event event2;
create event event2 on schedule every 2 second starts now() ends date_add(now(), interval 5 hour) comment "some" DO begin end;
drop event event2;
CREATE EVENT event_starts_test ON SCHEDULE EVERY 10 SECOND COMMENT "" DO SELECT 1;
SELECT interval_field, interval_value, event_definition FROM information_schema.events WHERE event_name='event_starts_test';
INTERVAL_FIELD	INTERVAL_VALUE	EVENT_DEFINITION
SECOND	10	SELECT 1
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, event_comment FROM information_schema.events WHERE event_schema='events_test' AND event_name='event_starts_test';
execute_at IS NULL	starts IS NULL	ends IS NULL	EVENT_COMMENT
1	0	1	
safe_process[14228]: Child process: 14229, exit: 1

How to repeat:
just runing this MTR case, main.events_1.

Suggested fix:
We can use 'ON COMPLETION PRESERVE DISABLE' to keep the event after event completion;
[5 Feb 2020 10:51] MySQL Verification Team
Hello Hao Li,

Thank you for the report and feedback.
This is duplicate of https://bugs.mysql.com/bug.php?id=98475

regards,
Umesh

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.059 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.