Bug #71682 PROCESSLIST_ID for slave sql thread is missing
Submitted: 12 Feb 2014 11:53 Modified: 20 May 2014 0:20
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S3 (Non-critical)
Version:5.6.15, 5.6.16 OS:Any
Assigned to: Marc ALFF CPU Architecture:Any

[12 Feb 2014 11:53] Daniël van Eeden
Description:
In performance_schema.threads the PROCESSLIST_ID for the slave sql thread is NULL. There is a ID for the slave sql thread in the information_schema.processlist however.

How to repeat:
mysql> select * from information_schema.processlist;
+------+-------------+-----------------+--------------------+---------+-------+----------------------------------+----------------------------------------------+
| ID   | USER        | HOST            | DB                 | COMMAND | TIME  | STATE                            | INFO                                         |
+------+-------------+-----------------+--------------------+---------+-------+----------------------------------+----------------------------------------------+
| 2521 | root        | localhost       | mysql              | Sleep   |    42 |                                  | NULL                                         |
| 1513 | root        | localhost:46393 | performance_schema | Query   |     0 | executing                        | select * from information_schema.processlist |
|    5 | root        | localhost       | mysql              | Sleep   |    15 |                                  | NULL                                         |
| 2520 | root        | localhost       | mysql              | Sleep   |    43 |                                  | NULL                                         |
|  214 | system user |                 | NULL               | Connect | 14883 | System lock                      | NULL                                         |
|    2 | system user |                 | NULL               | Connect |  2537 | Waiting for master to send event | NULL                                         |
+------+-------------+-----------------+--------------------+---------+-------+----------------------------------+----------------------------------------------+
6 rows in set (0.01 sec)

mysql> select * from threads where name='thread/sql/slave_sql'\G
*************************** 1. row ***************************
          THREAD_ID: 233
               NAME: thread/sql/slave_sql
               TYPE: BACKGROUND
     PROCESSLIST_ID: NULL
   PROCESSLIST_USER: root
   PROCESSLIST_HOST: localhost
     PROCESSLIST_DB: NULL
PROCESSLIST_COMMAND: NULL
   PROCESSLIST_TIME: 14871
  PROCESSLIST_STATE: System lock
   PROCESSLIST_INFO: NULL
   PARENT_THREAD_ID: 39
               ROLE: NULL
       INSTRUMENTED: YES
1 row in set (0.00 sec)

Suggested fix:
Make sure PROCESSLIST_ID in threads and I_S.processlist match for the slave threads.
[17 Feb 2014 10:33] MySQL Verification Team
Hello Daniel,

Thank you for the bug report.
Verified as described.

Thanks,
Umesh
[20 May 2014 0:20] Paul DuBois
Noted in 5.7.5 changelog.

The Performance Schema threads table displayed a PROCESS_ID value of
NULL for replication threads. Now it displays the same ID as SHOW
PROCESSLIST and the INFORMATION_SCHEMA.PROCESSLIST table.