我有一个脚本运行一批非常相似的查询。
除一个外,所有这些都运行得没有任何问题。
只有一个查询被卡住了。
在"显示进程列表"中,查询的状态为null
根据文档,show processlist应该只为"show processlist"线程本身报告"State=null"。
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)
可能是mysql版本的一个错误,请查看此错误以获取更多信息。