Description:
Manual page that describes instruments naming for PERFORMANCE_SCHEMA says (see http://dev.mysql.com/doc/refman/5.6/en/performance-schema-instrument-naming.html):
"Stage instruments have names of the form stage/code_area/stage_name, where code_area is a value such as sql or myisam, and stage_name indicates the stage of statement processing, such as Sorting result or Sending data. Stages correspond to the thread states displayed by SHOW PROCESSLIST or that are visible in the INFORMATION_SCHEMA.PROCESSLIST table."
I've checked all pages related to thread states explanation under http://dev.mysql.com/doc/refman/5.6/en/thread-information.html, but had not found any description for the following state:
mysql> select * from performance_schema.setup_instruments where name like 'stage/sql%readlock%';
+-----------------------------------+---------+-------+
| NAME | ENABLED | TIMED |
+-----------------------------------+---------+-------+
| stage/sql/Waiting to get readlock | YES | YES |
+-----------------------------------+---------+-------+
1 row in set (0.00 sec)
Just do not see "readlock" without space inside anywhere. Google search for "site:dev.mysql.com stage/sql/Waiting to get readlock" helps to find out this page, http://dev.mysql.com/doc/refman/5.5/en/general-thread-states.html, that explains:
"This state was removed in MySQL 5.5.8; Waiting for global read lock is used instead."
How to repeat:
Find this stage of SQL statement execution listed in setup_instruments:
mysql> select * from performance_schema.setup_instruments where name like 'stage/sql%readlock%';
+-----------------------------------+---------+-------+
| NAME | ENABLED | TIMED |
+-----------------------------------+---------+-------+
| stage/sql/Waiting to get readlock | YES | YES |
+-----------------------------------+---------+-------+
1 row in set (0.00 sec)
Then try to find description for this stage (thread status) in the manual for MySQL 5.6.
Suggested fix:
It seems this thread state was removed in MySQL 5.5.8 and is replaced by "Waiting for global read lock":
mysql> select * from performance_schema.setup_instruments where name like 'stage/sql%read lock%';
+----------------------------------------+---------+-------+
| NAME | ENABLED | TIMED |
+----------------------------------------+---------+-------+
| stage/sql/Waiting for global read lock | YES | YES |
+----------------------------------------+---------+-------+
1 row in set (0.00 sec)
Please, fix PERFORMANCE_SCHEMA and remove this extra stage, "stage/sql/Waiting to get readlock" that is no longer used from setup_instruments etc.