MySQL 查看进行中的事务
如题, SQL如下:
select t1.trx_mysql_thread_id, t1.trx_state, t1.trx_started, t1.trx_query, t2.PROCESSLIST_DB, t2.PROCESSLIST_USER, t2.PROCESSLIST_ID, t2.PROCESSLIST_HOST, t2.PROCESSLIST_STATE, t2.PROCESSLIST_COMMAND from information_schema.innodb_trx t1 join performance_schema.threads t2 on t1.trx_mysql_thread_id = t2.PROCESSLIST_ID ;