mysql查看当前事务id



  

SELECT * FROM INFORMATION_SCHEMA.INNODB_TRX

MySQL 如何获得当前会话的TRX_ID 事务ID

SELECT TRX_ID FROM INFORMATION_SCHEMA.INNODB_TRX  WHERE TRX_MYSQL_THREAD_ID = CONNECTION_ID();

begin;
select * from hbec_wallet_cg_fund_profit;
SELECT TRX_ID FROM INFORMATION_SCHEMA.INNODB_TRX  WHERE TRX_MYSQL_THREAD_ID = CONNECTION_ID();
commit;

你可能感兴趣的:(mysql查看当前事务id)