mysql 查询锁

  • mysql有正在执行的事务没有提交
SELECT
	* 
FROM
	information_schema.PROCESSLIST a,
	information_schema.INNODB_TRX b 
WHERE
	b.trx_mysql_thread_id = a.id 
ORDER BY
	1 DESC;