1、查询事务
SELECT * FROM information_schema.INNODB_TRX t
2、查询正在运行的进程(Sleep为等待操作的链接)
SELECT p.*,t.trx_state FROM information_schema.processlist p
3、进程与事务关联起来
SELECT p.*,t.trx_state FROM information_schema.processlist p LEFT JOIN information_schema.INNODB_TRX t ON p.id = t.trx_mysql_thread_id where host like '192.168.101.17%' order by p.time desc