title: when pid column of sys.session will be null in mysql?
body: <p>Am using mysql 5.7.19-log server, i am working on application monitor tool where i need to monitor session details of a mysql server. In the process came to know that pid column can be null in sys.session table. i want to know what are the cases in which pid can be null?</p>
  
  <p>when i exec desc session in mysql shell result as follows:</p>
  
  <pre><code>mysql&gt;desc session;
  +------------------------+------------------------------------------+------+-----+---------+-------+
  | Field                  | Type                                     | Null | Key | Default | Extra |
  +------------------------+------------------------------------------+------+-----+---------+-------+
  | thd_id                 | bigint(20) unsigned                      | NO   |     | NULL    |       |
  | conn_id                | bigint(20) unsigned                      | YES  |     | NULL    |       |
  | user                   | varchar(128)                             | YES  |     | NULL    |       |
  | db                     | varchar(64)                              | YES  |     | NULL    |       |
  | command                | varchar(16)                              | YES  |     | NULL    |       |
  | state                  | varchar(64)                              | YES  |     | NULL    |       |
  | time                   | bigint(20)                               | YES  |     | NULL    |       |
  | current_statement      | longtext                                 | YES  |     | NULL    |       |
  | statement_latency      | text                                     | YES  |     | NULL    |       |
  | progress               | decimal(26,2)                            | YES  |     | NULL    |       |
  | lock_latency           | text                                     | YES  |     | NULL    |       |
  | rows_examined          | bigint(20) unsigned                      | YES  |     | NULL    |       |
  | rows_sent              | bigint(20) unsigned                      | YES  |     | NULL    |       |
  | rows_affected          | bigint(20) unsigned                      | YES  |     | NULL    |       |
  | tmp_tables             | bigint(20) unsigned                      | YES  |     | NULL    |       |
  | tmp_disk_tables        | bigint(20) unsigned                      | YES  |     | NULL    |       |
  | full_scan              | varchar(3)                               | NO   |     |         |       |
  | last_statement         | longtext                                 | YES  |     | NULL    |       |
  | last_statement_latency | text                                     | YES  |     | NULL    |       |
  | current_memory         | text                                     | YES  |     | NULL    |       |
  | last_wait              | varchar(128)                             | YES  |     | NULL    |       |
  | last_wait_latency      | text                                     | YES  |     | NULL    |       |
  | source                 | varchar(64)                              | YES  |     | NULL    |       |
  | trx_latency            | text                                     | YES  |     | NULL    |       |
  | trx_state              | enum('ACTIVE','COMMITTED','ROLLED BACK') | YES  |     | NULL    |       |
  | trx_autocommit         | enum('YES','NO')                         | YES  |     | NULL    |       |
  | pid                    | varchar(1024)                            | YES  |     | NULL    |       |
  | program_name           | varchar(1024)                            | YES  |     | NULL    |       |
  +------------------------+------------------------------------------+------+-----+---------+-------+
  28 rows in set (0.00 sec)```
  </code></pre>