Skip to content

Instantly share code, notes, and snippets.

@sunfuze
Created February 28, 2019 09:37
Show Gist options
  • Save sunfuze/3d9239539a080d39bd0a253dcd1cbdb8 to your computer and use it in GitHub Desktop.
Save sunfuze/3d9239539a080d39bd0a253dcd1cbdb8 to your computer and use it in GitHub Desktop.
数据库事务查询
# 事务隔离级别,
# READ-UNCOMMITTED 读未提交
# READ-COMMITTED 读提交
# REPEATABLE-READ 可重复读
# SERIALIZABLE 串行化
show variables like 'transaction_isolation';
# 事务事件执行事件大于 60 秒的操作
select * from information_schema.innodb_trx where TIME_TO_SEC(timediff(now(),trx_started))>60;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment