Bug #40816 event_scheduler_func fails randomly, test does an imperfect cleanup
Submitted: 18 Nov 2008 10:50 Modified: 14 May 2009 7:57
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.1.30 OS:Any
Assigned to: Bernt Marius Johnsen CPU Architecture:Any
Tags: sporadic

[18 Nov 2008 10:50] Matthias Leich
Description:
Testing of 5.1.30 by build team:
--------------------------------
TEST : main.event_scheduler_func (debug)
LOG  : log/nocona,linux-x86_64-icc,5.1-enterprise-commercial-advanced.log

@@ -20,7 +20,6 @@
 SELECT * from t1;
 id	name
 1	Record_1
-2	Record_1
 DROP EVENT test_event_1;
 DELETE from t1;
 select * from t1;

The test itself is weak.
- It uses simple sleeps and does not take into
  account that starting the event scheduler and
  execution of the "next" event might need more
  than the expected (hardcoded within the sleep)
  time when the testing box is under high parallel
  load.
- It does not save the state (switched on/off)
  of the event scheduler at the beginning of the
  test and restores it at the end.

This test is disabled within the replication tree
(see also
 Bug#37962 *_func tests containing sleeps/race conditions)

How to repeat:
Generate high parallel on your testing box and run
  ./mysql-test-run.pl event_scheduler_func
till the test shows differences between expected
and current results.
I made only short experiments and were not able to
repeat the problem.
Nevertheless, its clear visible that the script is weak.
[14 May 2009 7:57] Bernt Marius Johnsen
No longer an issue. Test was removed when the fix for  Bug#37962 was pushed (http://lists.mysql.com/commits/70168)