Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mysql show processlist query shows state = null

I have a script running a batch of very similar queries.
All of them, except one, run without any problem.
Only one query is getting stuck.
In "show processlist" the query has state=null
According to docs, show processlist should report "State=null" only for the "show processlist" thread itself.

    Server version: 5.0.67 MySQL Community Server (GPL)
    mysql> show processlist;
    +---------+--------+-----------+--------------+---------+------+-------+------------------------------------------------------------------------------------------------------+
    | Id      | User   | Host      | db           | Command | Time | State | Info                                                                                                 |
    +---------+--------+-----------+--------------+---------+------+-------+------------------------------------------------------------------------------------------------------+
    | 3866613 | user   | localhost | db_name      | Query   | 1986 | NULL  | select log_time,log_action,log_action_id,log_object_id, @abcde:=if(log_action='abcde',to_            |
    | 3873414 | root   | localhost | NULL         | Query   |    0 | NULL  | show processlist                                                                                     |
    +---------+--------+-----------+--------------+---------+------+-------+------------------------------------------------------------------------------------------------------+
    2 rows in set (0.00 sec)
like image 997
user1312090 Avatar asked Apr 04 '12 06:04

user1312090


1 Answers

Could be a bug of your version of mysql, take a look at this bug for more information .

like image 85
aleroot Avatar answered Sep 25 '22 05:09

aleroot