Bug#29830 Test case 'events_scheduling' fails on Mac OS X and Windows.

Change LAST_EXECUTED time the execution start time, instead of the execution completion time. This ensures the END time always the same or later than the LAST_EXECUTED time.
parent 413112fb
...@@ -78,10 +78,10 @@ FROM INFORMATION_SCHEMA.EVENTS ...@@ -78,10 +78,10 @@ FROM INFORMATION_SCHEMA.EVENTS
WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2'; WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2';
IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR') IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR')
OK OK
SELECT IF(LAST_EXECUTED-ENDS < 3, 'OK', 'ERROR') SELECT IF(LAST_EXECUTED-ENDS <= 0, 'OK', 'ERROR')
FROM INFORMATION_SCHEMA.EVENTS FROM INFORMATION_SCHEMA.EVENTS
WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2'; WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2';
IF(LAST_EXECUTED-ENDS < 3, 'OK', 'ERROR') IF(LAST_EXECUTED-ENDS <= 0, 'OK', 'ERROR')
OK OK
"Already dropped because ended. Therefore an error." "Already dropped because ended. Therefore an error."
DROP EVENT event_3; DROP EVENT event_3;
......
...@@ -16,7 +16,6 @@ ctype_big5 : BUG#26711 2007-06-21 Lars Test has never worked on Do ...@@ -16,7 +16,6 @@ ctype_big5 : BUG#26711 2007-06-21 Lars Test has never worked on Do
federated_transactions : Bug#29523 Transactions do not work federated_transactions : Bug#29523 Transactions do not work
events : Bug#32664 events.test fails randomly events : Bug#32664 events.test fails randomly
events_scheduling : Bug#29830 Test case 'events_scheduling' fails on Mac OS X and Windows
lowercase_table3 : Bug#32667 lowercase_table3.test reports to error log lowercase_table3 : Bug#32667 lowercase_table3.test reports to error log
kill : Bug#29149: Test "kill" fails on Windows kill : Bug#29149: Test "kill" fails on Windows
grant3 : Bug#32723: grant3.test fails grant3 : Bug#32723: grant3.test fails
......
...@@ -87,7 +87,7 @@ SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR') ...@@ -87,7 +87,7 @@ SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR')
FROM INFORMATION_SCHEMA.EVENTS FROM INFORMATION_SCHEMA.EVENTS
WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2'; WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2';
SELECT IF(LAST_EXECUTED-ENDS < 3, 'OK', 'ERROR') SELECT IF(LAST_EXECUTED-ENDS <= 0, 'OK', 'ERROR')
FROM INFORMATION_SCHEMA.EVENTS FROM INFORMATION_SCHEMA.EVENTS
WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2'; WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2';
......
...@@ -1649,8 +1649,6 @@ Event_queue_element::compute_next_execution_time() ...@@ -1649,8 +1649,6 @@ Event_queue_element::compute_next_execution_time()
void void
Event_queue_element::mark_last_executed(THD *thd) Event_queue_element::mark_last_executed(THD *thd)
{ {
thd->set_current_time();
last_executed= (my_time_t) thd->query_start(); last_executed= (my_time_t) thd->query_start();
last_executed_changed= TRUE; last_executed_changed= TRUE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment