惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
I
InfoQ
Engineering at Meta
Engineering at Meta
D
DataBreaches.Net
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Recent Announcements
Recent Announcements
GbyAI
GbyAI
爱范儿
爱范儿
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
美团技术团队
罗磊的独立博客
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
雷峰网
雷峰网
M
MIT News - Artificial intelligence
D
Docker
MongoDB | Blog
MongoDB | Blog
F
Fortinet All Blogs
博客园 - 叶小钗

博客园 - 卡卡西村长

QT使用linuxdeployqt打包 统计vertica表的行数 基于QScintilla项目实现SQL编辑器 Vertica中的group_concat函数 vscode中文乱码问题及几种常见的解决方案 改善[Vertica] current ResultSet because its buffer(8192) is full的错误 通过 phantomjs抓取仁医在线的练习题 notepad++ 配置fasm汇编环境 springboot动态启用RabbitMQ消费Listener mysql日期字段分区索引 排查tomcat服务器CPU占用率过高的问题 FFMPEG把图片序列合成为视频 统计nginx日志中的ipv4和ipv6占比 vertica性能优化汇总 oracle unwrap解密工具 windows10上安装OpenSSL_1.1.1d_x64 centos7上安装phantomjs并对页面截屏 如何用Java Socket实现一个简单的Redis客户端 cenos上通过yum安装mariadb
查看mysql当前事务锁并kill
卡卡西村长 · 2022-12-15 · via 博客园 - 卡卡西村长

执行如下SQL,查看当前事务:

select
  t.trx_mysql_thread_id,
  t.trx_started,
  t.trx_state,
  t.trx_tables_in_use,
  t.trx_tables_locked,
  t.trx_rows_locked,
  timestampdiff(second, t.trx_started, now()) as trx_run_seconds,
  concat(e.timer_wait/1000000000000, 's') as timer_wait_seconds
from information_schema.innodb_trx t
join performance_schema.threads c on c.processlist_id=t.trx_mysql_thread_id
join performance_schema.events_statements_current e on e.thread_id=c.thread_id

  返回是trx_mysql_thread_id就是线程ID,通过kill命令可以终止线程。