Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Email Address
mysql> create procedure show_processlist()
-> begin
-> select * from sys.processlist where pid is not NULL;
-> end //
mysql> call show_processlist\G
Care in using sys.processlist, I get below with 5.7, and I think blocking for more than 10 seconds to get the progress list should be considered a bug.
mysql> pager cat > /dev/null
PAGER set to ‘cat > /dev/null’
mysql> SET SESSION MAX_EXECUTION_TIME=10000;
Query OK, 0 rows affected (0.00 sec)
mysql> show processlist;
1989 rows in set (0.00 sec)
mysql> SELECT * FROM information_schema.processlist;
1982 rows in set (0.01 sec)
mysql> select * from sys.processlist where pid is not NULL;
ERROR 3024 (HY000): Query execution was interrupted, maximum statement execution time exceeded