Bug #97840 A problem about information_schema.processlist table of MySQL 8.0.13
Submitted: 2 Dec 2019 2:44 Modified: 2 Dec 2019 13:43
Reporter: chong ge Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:MySQL 8.0.13 OS:Debian
Assigned to: CPU Architecture:Any
Tags: 8.0.13

[2 Dec 2019 2:44] chong ge
Description:
Session A :
mysql> alter table sbtest22 add index idx_pad2(pad);
#alter sql is running 

Session B:
#First query
mysql> select * from information_schema.processlist where info is not null;select * from information_schema.processlist where info is not null;
+----------+--------------+--------------------+------+---------+------+----------------+---------------------------------------------------------------------+
| ID       | USER         | HOST               | DB   | COMMAND | TIME | STATE          | INFO                                                                |
+----------+--------------+--------------------+------+---------+------+----------------+---------------------------------------------------------------------+
| 34971045 | root_mysql80 | 172.17.10.21:62131 | tpcc | Query   |   28 | altering table | alter table sbtest22 add index idx_pad2(pad)                        |
| 18193494 | root_mysql80 | 172.17.10.21:61911 | tpcc | Query   |    0 | executing      | select * from information_schema.processlist where info is not null |
+----------+--------------+--------------------+------+---------+------+----------------+---------------------------------------------------------------------+
2 rows in set (0.04 sec)

+----------+--------------+--------------------+------+---------+------+-----------+---------------------------------------------------------------------+
| ID       | USER         | HOST               | DB   | COMMAND | TIME | STATE     | INFO                                                                |
+----------+--------------+--------------------+------+---------+------+-----------+---------------------------------------------------------------------+
| 18193494 | root_mysql80 | 172.17.10.21:61911 | tpcc | Query   |    0 | executing | select * from information_schema.processlist where info is not null |
+----------+--------------+--------------------+------+---------+------+-----------+---------------------------------------------------------------------+
1 row in set (0.10 sec)

#Second query
mysql> select * from information_schema.processlist where info is not null;select * from information_schema.processlist where info is not null;
+----------+--------------+--------------------+------+---------+------+----------------+---------------------------------------------------------------------+
| ID       | USER         | HOST               | DB   | COMMAND | TIME | STATE          | INFO                                                                |
+----------+--------------+--------------------+------+---------+------+----------------+---------------------------------------------------------------------+
| 34971045 | root_mysql80 | 172.17.10.21:62131 | tpcc | Query   |   37 | altering table | alter table sbtest22 add index idx_pad2(pad)                        |
| 18193494 | root_mysql80 | 172.17.10.21:61911 | tpcc | Query   |    0 | executing      | select * from information_schema.processlist where info is not null |
+----------+--------------+--------------------+------+---------+------+----------------+---------------------------------------------------------------------+
2 rows in set (0.02 sec)

+----------+--------------+--------------------+------+---------+------+-----------+---------------------------------------------------------------------+
| ID       | USER         | HOST               | DB   | COMMAND | TIME | STATE     | INFO                                                                |
+----------+--------------+--------------------+------+---------+------+-----------+---------------------------------------------------------------------+
| 18193494 | root_mysql80 | 172.17.10.21:61911 | tpcc | Query   |    0 | executing | select * from information_schema.processlist where info is not null |
+----------+--------------+--------------------+------+---------+------+-----------+---------------------------------------------------------------------+
1 row in set (0.07 sec)

#Third query
mysql> select * from information_schema.processlist where info is not null;select * from information_schema.processlist where info is not null;
+----------+--------------+--------------------+------+---------+------+----------------+---------------------------------------------------------------------+
| ID       | USER         | HOST               | DB   | COMMAND | TIME | STATE          | INFO                                                                |
+----------+--------------+--------------------+------+---------+------+----------------+---------------------------------------------------------------------+
| 34971045 | root_mysql80 | 172.17.10.21:62131 | tpcc | Query   |   72 | altering table | alter table sbtest22 add index idx_pad2(pad)                        |
| 18193494 | root_mysql80 | 172.17.10.21:61911 | tpcc | Query   |    0 | executing      | select * from information_schema.processlist where info is not null |
+----------+--------------+--------------------+------+---------+------+----------------+---------------------------------------------------------------------+
2 rows in set (0.04 sec)

+----------+--------------+--------------------+------+---------+------+-----------+---------------------------------------------------------------------+
| ID       | USER         | HOST               | DB   | COMMAND | TIME | STATE     | INFO                                                                |
+----------+--------------+--------------------+------+---------+------+-----------+---------------------------------------------------------------------+
| 18193494 | root_mysql80 | 172.17.10.21:61911 | tpcc | Query   |    0 | executing | select * from information_schema.processlist where info is not null |
+----------+--------------+--------------------+------+---------+------+-----------+---------------------------------------------------------------------+
1 row in set (0.09 sec)

mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.13    |
+-----------+
1 row in set (0.03 sec)

Session A :
mysql> alter table sbtest22 add index idx_pad2(pad);
Query OK, 0 rows affected, 1 warning (1 min 25.76 sec)

How to repeat:
The detailed operation procedure is as above.

A problem about information_schema.processlist table of MySQL 8.0.13:

Why are some active sessions not found in the information_ schema.processlist table?
[2 Dec 2019 13:43] MySQL Verification Team
Hi Mr. ge,

Thank you for your bug report.

However, this is not a bug. You simply have a filtering conditions that all statements do not satisfy.

Sometimes, column "INFO" can be NULL, sometimes a blank and sometimes a string.

If you still have problems , try 8.0.18. We do not hunt bugs in the ancient releases.