Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
什么会导致MySQL中trx_query null的事务长时间运行?_Mysql_Innodb - Fatal编程技术网

什么会导致MySQL中trx_query null的事务长时间运行?

什么会导致MySQL中trx_query null的事务长时间运行?,mysql,innodb,Mysql,Innodb,查询: 结果: SELECT trx_id, trx_state, timestampdiff( SECOND, trx_started, now() ) duration, trx_query FROM information_schema.INNODB_TRX; 我注意到一个非常有趣的交易: trx_id trx_state duration trx_query 329182111765896 RUNNIN

查询:

结果:

SELECT
  trx_id,
  trx_state,
  timestampdiff(
      SECOND,
      trx_started,
      now()
  ) duration,
  trx_query
FROM information_schema.INNODB_TRX;
我注意到一个非常有趣的交易:

trx_id          trx_state   duration    trx_query
329182111765896 RUNNING     25043   
7511439990      RUNNING     26  
7511442157      LOCK WAIT   22          select * from...
7511442102      LOCK WAIT   22          update `xxx` set ...
329182111487256 RUNNING     0           select * from ...

这是一个运行时间很长的事务,带有trx_query null。怎么会这样?该交易的可能原因是什么?

您找到原因了吗?
 329182111765896    RUNNING     25043