Bug #98712 event_scheduler thread causing unstable tests
Submitted: 22 Feb 2020 20:41 Modified: 24 Feb 2020 4:32
Reporter: Manuel Ung Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Tests Severity:S7 (Test Cases)
Version:8.0.19 OS:Any
Assigned to: CPU Architecture:Any

[22 Feb 2020 20:41] Manuel Ung
Description:
The event queue is not cleared of events even after events have been deleted.

This is fine for correctness, as the scheduler will simply move onto the next event if the current one has been deleted. However, until the timer runs out, the state of the event_scheduler thread will show 'waiting for next activation' even though there are no events to actually run.

This causes mtr tests that run show processlist to become flaky.

How to repeat:
eg. This combination of mtr tests running right after another will cause a failure:

./mtr --no-reorder main.ddl_i18n_utf8 main.sp-threads

(but this can happen to any tests that create scheduled events, then run processlist)

Suggested fix:
Easiest way to is to restart mysqld at the end of event tests, and have mtr_check.sql enforce this by checking show processlist (today it filters out event_scheduler).

An alternative is to make sure that all mtr tests run show processlist with special filtering for event_scheduler.
[24 Feb 2020 4:32] MySQL Verification Team
Hello Manuel Ung,

Thank you for the bug report and feedback.

regards,
Umesh