Bug #31649 events.test fails: NULL "state" field of SHOW PROCESSLIST
Submitted: 16 Oct 2007 19:15 Modified: 8 Nov 2007 14:40
Reporter: Timothy Smith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S7 (Test Cases)
Version:5.1, 5.2 OS:Any
Assigned to: Alexander Nozdrin CPU Architecture:Any
Tags: pbfail

[16 Oct 2007 19:15] Timothy Smith
Description:
main.events                    [ fail ]

--- /data0/pushbuild/pb2-4/pb/mysql-5.2-build/36/mysql-5.2.6-alpha-pb36/mysql-test/r/events.result	2007-10-11 23:19:25.000000000 +0300
+++ /dev/shm/var-ps_stm-171/log/events.reject	2007-10-11 23:55:09.763139537 +0300
@@ -481,7 +481,7 @@
 where (info like "select get_lock%" OR user='event_scheduler')
 order by info;
 user	host	db	command	state	info
-event_scheduler	localhost	NULL	Daemon	Waiting for next activation	NULL
+event_scheduler	localhost	NULL	Daemon	NULL	NULL
 root	localhost	events_test	Connect	User lock	select get_lock("test_lock2", 20)
 "Release the mutex, the event worker should finish."
 select release_lock("test_lock2");

mysqltest: Result content mismatch

How to repeat:
This shows up in PB test runs for pb-valgrind and sles10-ia64-a-2, across all test protocols.

https://intranet.mysql.com/secure/pushbuild/xref.pl?startdate=&enddate=&dir=&plat=&testtyp...

This happens fairly frequently.
[31 Oct 2007 9:02] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/36731

ChangeSet@1.2602, 2007-10-31 12:04:19+03:00, anozdrin@station. +1 -0
  Fix for a BUG#31649: events.test fails: NULL "state" field of
  SHOW PROCESSLIST.
  
  The problem was a race condition: if the Event Scheduler was not
  quick enough, the following scenario happens:
    - The Event Scheduler picks up the created event;
    - The event is executed;
    - event_scheduler_thread->proc_info is set to NULL;
    - The client issues SELECT FROM I_S.
  
  The fix is to wait for the Event Scheduler to reach 'Waiting
  for next activation' state.
[31 Oct 2007 12:53] Alexander Nozdrin
Pushed into 5.1-runtime.
[7 Nov 2007 21:59] Bugs System
Pushed into 6.0.4-alpha
[7 Nov 2007 22:01] Bugs System
Pushed into 5.1.23-rc
[8 Nov 2007 14:40] Paul DuBois
Test case change. No changelog entry needed.