Bug #56832 perfschema.server_init test output not consistent
Submitted: 17 Sep 2010 0:24 Modified: 3 Oct 2010 1:40
Reporter: Marc ALFF Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S3 (Non-critical)
Version:5.5.6-m3-release OS:Any
Assigned to: Marc ALFF CPU Architecture:Any

[17 Sep 2010 0:24] Marc ALFF
Description:
Tests failures seen for perfschema.server_init:

--- /export/home2/pb2/test/sb_2-2270762-1284378900.26/mysql-5.5.6-rc-linux2.6-x86_64-icc/mysql-test/suite/perfschema/r/server_init.result	2010-09-13 13:25:21.000000000 +0300
+++ /export/home2/pb2/test/sb_2-2270762-1284378900.26/mysql-5.5.6-rc-linux2.6-x86_64-icc/mysql-test/suite/perfschema/r/server_init.reject	2010-09-13 15:35:01.000000000 +0300
@@ -118,7 +118,7 @@
 select count(name) from MUTEX_INSTANCES
 where name like "wait/synch/mutex/sql/LOG_INFO::lock";
 count(name)
-1
+0
 select count(name) from MUTEX_INSTANCES
 where name like "wait/synch/mutex/sql/Query_cache::structure_guard_mutex";
 count(name)
@@ -154,7 +154,7 @@
 select count(name) from MUTEX_INSTANCES
 where name like "wait/synch/mutex/sql/LOCK_gdl";
 count(name)
-1
+0
 select count(name) from MUTEX_INSTANCES
 where name like "wait/synch/mutex/sql/tz_LOCK";
 count(name)

------

--- /export/home2/pb2/test/sb_2-2270762-1284378900.26/mysql-5.5.6-rc-linux2.6-x86_64-icc/mysql-test/suite/perfschema/r/server_init.result	2010-09-13 13:25:21.000000000 +0300
+++ /export/home2/pb2/test/sb_2-2270762-1284378900.26/mysql-5.5.6-rc-linux2.6-x86_64-icc/mysql-test/suite/perfschema/r/server_init.reject	2010-09-13 15:35:01.000000000 +0300
@@ -118,7 +118,7 @@
 select count(name) from MUTEX_INSTANCES
 where name like "wait/synch/mutex/sql/LOG_INFO::lock";
 count(name)
-1
+0
 select count(name) from MUTEX_INSTANCES
 where name like "wait/synch/mutex/sql/Query_cache::structure_guard_mutex";
 count(name)
@@ -154,7 +154,7 @@
 select count(name) from MUTEX_INSTANCES
 where name like "wait/synch/mutex/sql/LOCK_gdl";
 count(name)
-1
+0
 select count(name) from MUTEX_INSTANCES
 where name like "wait/synch/mutex/sql/tz_LOCK";
 count(name)

The problem here is that:
- struct st_log_info
- the event scheduler
may or may not be initialized depending on the server start options
(the event scheduler could be disabled for example), so expecting to always find an instrumented mutex in the test output is a bad assumption from the test script.

LOCK_gdl may only exist for a short time, while ddl log recovery is executed, and can not be assumed to still exist when the check is done.

This is a test failure only, not a failure in the code.

How to repeat:
See PB2, mysql-5.5.6-m3-release

Suggested fix:
Remove the checks for the offending mutexes in the test,
to only keep tests for mutexes that are truly global in the server.
[17 Sep 2010 1:04] 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/118438

3208 Marc Alff	2010-09-16
      Bug#56832 perfschema.server_init test output not consistent
      
      Before this fix, the test output for perfschema.server_init would
      vary between executions, because some of the objects tested were
      not guaranteed to exist in all configurations / code paths.
      
      This fix removes these weak tests.
      
      Also, comments referring to abandonned code have been cleaned up.
[17 Sep 2010 15:22] Christopher Powers
Patch approved.
[17 Sep 2010 17:03] Marc ALFF
Pushed into:
- mysql-5.5-bugfixing
- mysql-trunk-bugfixing
- mysql-next-mr-bugfixing
[2 Oct 2010 18:13] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alexander.nozdrin@oracle.com-20101002180948-852x1cuv7c6i85ea) (version source revid:alexander.nozdrin@oracle.com-20101002180857-an32jpuwzemsp4f2) (merge vers: 5.6.1-m4) (pib:21)
[2 Oct 2010 18:14] Bugs System
Pushed into mysql-next-mr (revid:alexander.nozdrin@oracle.com-20101002181053-6iotvl26uurcoryp) (version source revid:alexander.nozdrin@oracle.com-20101002180917-h0n62akupm3z20nt) (pib:21)
[2 Oct 2010 18:16] Bugs System
Pushed into mysql-5.5 5.5.7-rc (revid:alexander.nozdrin@oracle.com-20101002180831-590ka2tuit9qoxbb) (version source revid:alexander.nozdrin@oracle.com-20101002180831-590ka2tuit9qoxbb) (merge vers: 5.5.7-rc) (pib:21)
[3 Oct 2010 1:40] Paul DuBois
Changes to test suite. No changelog entry needed.