Vla*_*cea 3 mysql postgresql transaction
PostgreSQL 支持使用如下查询检索当前正在运行的事务 ID:
select txid_current();
Run Code Online (Sandbox Code Playgroud)
MySQL 有没有这样的等价物?
从 MySQL 5.7 开始,您可以在性能模式中查看当前事务。
见http://dev.mysql.com/doc/refman/5.7/en/events-transactions-current-table.html
现在,要找出THREAD_ID当前连接的,请使用
SELECT THREAD_ID FROM performance_schema.threads
WHERE PROCESSLIST_ID = CONNECTION_ID()
Run Code Online (Sandbox Code Playgroud)
见http://dev.mysql.com/doc/refman/5.7/en/threads-table.html
| 归档时间: |
|
| 查看次数: |
1565 次 |
| 最近记录: |