show engine innodb status\G查看mysql死锁记录

2023-05-16

show engine innodb status\G及pt-deadlock-logger都可以查询到deadlock记录

但从使用上我觉得show engine innodb status\G显示的结果更清晰。

------------------------
LATEST DETECTED DEADLOCK
------------------------
2022-07-28 11:19:31 7f6c82cd9700
*** (1) TRANSACTION:
TRANSACTION 230465130, ACTIVE 1 sec inserting
mysql tables in use 1, locked 1
LOCK WAIT 258 lock struct(s), heap size 30248, 26585 row lock(s), undo log entries 48
MySQL thread id 99343, OS thread handle 0x7f6c9848d700, query id 27736562 172.1.1.34 arp update
INSERT INTO ACT_AUTH_USER(ID,USER_ID,CORP_ORG_ID,PROC_INST_ID,CREATE_TIME,TASK_ID,UPDATE_TIME,ETL_FLAG,SECRET_LEVEL)values('165897816111628002764043','158633914081628001644095','-1'                                                      ,'165897816071028002763869-grmhgd','2022-07-28 11:16:01.113','165897816073528002763932-grmhgd','2022-07-28 11:16:01.116','O','')
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 4332 page no 3368 n bits 320 index `IDX_ACT_AUTH_U_TASK_ID` of table `arp`.`ACT_AUTH_USER` trx id 230465130 lock_mode X locks gap before rec insert intention w                                                      aiting
Record lock, heap no 248 PHYSICAL RECORD: n_fields 2; compact format; info bits 32
 0: len 30; hex 3136353839373831363037333932383030323933323730382d677a6c6162; asc 165897816073928002932708-gzlab; (total 31 bytes);
 1: len 24; hex 313635383937383136303735343238303032393332373135; asc 165897816075428002932715;;

*** (2) TRANSACTION:
TRANSACTION 230465132, ACTIVE 1 sec inserting
mysql tables in use 1, locked 1
26 lock struct(s), heap size 2936, 102 row lock(s), undo log entries 145
MySQL thread id 99315, OS thread handle 0x7f6c82cd9700, query id 27736593 172.1.1.33 arp update
INSERT INTO ACT_AUTH_USER(ID,USER_ID,CORP_ORG_ID,PROC_INST_ID,CREATE_TIME,TASK_ID,UPDATE_TIME,ETL_FLAG,SECRET_LEVEL)values('165897816112728002932862','161882270442028002548195','161                                                      698315238928001126133','165897626035528002522733-gzlab0','2022-07-28 11:16:01.125','165897816098428002932822-gzlab0','2022-07-28 11:16:01.128','O','')
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 4332 page no 3368 n bits 320 index `IDX_ACT_AUTH_U_TASK_ID` of table `arp`.`ACT_AUTH_USER` trx id 230465132 lock_mode X
Record lock, heap no 175 PHYSICAL RECORD: n_fields 2; compact format; info bits 32
 0: len 30; hex 3136353839373632363034343732383030323532323835362d677a6c6162; asc 165897626044728002522856-gzlab; (total 31 bytes);
 1: len 24; hex 313635383937363236303439363238303032353232383634; asc 165897626049628002522864;;

Record lock, heap no 248 PHYSICAL RECORD: n_fields 2; compact format; info bits 32
 0: len 30; hex 3136353839373831363037333932383030323933323730382d677a6c6162; asc 165897816073928002932708-gzlab; (total 31 bytes);
 1: len 24; hex 313635383937383136303735343238303032393332373135; asc 165897816075428002932715;;

*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 4332 page no 3368 n bits 320 index `IDX_ACT_AUTH_U_TASK_ID` of table `arp`.`ACT_AUTH_USER` trx id 230465132 lock_mode X insert intention waiting
Record lock, heap no 1 PHYSICAL RECORD: n_fields 1; compact format; info bits 0
 0: len 8; hex 73757072656d756d; asc supremum;;

*** WE ROLL BACK TRANSACTION (2)
------------
TRANSACTIONS
------------
Trx id counter 231269278
Purge done for trx's n:o < 231269278 undo n:o < 0 state: running but idle
History list length 1397
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0, not started
MySQL thread id 118575, OS thread handle 0x7f6c82bd7700, query id 34064879 localhost root init
show engine innodb status
---TRANSACTION 231269274, not started
MySQL thread id 118573, OS thread handle 0x7f6c83b76700, query id 34064868 172.1.1.34 arp cleaning up
---TRANSACTION 231269240, not started
MySQL thread id 118574, OS thread handle 0x7f6c7b420700, query id 34064824 172.1.1.34 arp cleaning up
---TRANSACTION 231269265, not started
MySQL thread id 118570, OS thread handle 0x7f6c7aa8d700, query id 34064840 172.1.1.33 arp cleaning up
---TRANSACTION 231269244, not started
MySQL thread id 118568, OS thread handle 0x7f6c7b4a1700, query id 34064826 172.1.1.32 arp cleaning up
---TRANSACTION 231269233, not started
MySQL thread id 118567, OS thread handle 0x7f6c82346700, query id 34064839 172.1.1.33 arp cleaning up
---TRANSACTION 231269058, not started
MySQL thread id 118565, OS thread handle 0x7f6c829d3700, query id 34064822 172.1.1.34 arp cleaning up
---TRANSACTION 231269022, not started
MySQL thread id 118562, OS thread handle 0x7f6c83162700, query id 34064837 172.1.1.35 arp cleaning up
---TRANSACTION 231269059, not started
MySQL thread id 118561, OS thread handle 0x7f6c82fdf700, query id 34064823 172.1.1.34 arp cleaning up
---TRANSACTION 231269276, not started
MySQL thread id 118557, OS thread handle 0x7f6c7a889700, query id 34064878 172.1.1.35 arp cleaning up
---TRANSACTION 231269260, not started
MySQL thread id 118554, OS thread handle 0x7f6c98289700, query id 34064827 172.1.1.32 arp cleaning up
--------
FILE I/O
--------
I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
I/O thread 1 state: waiting for completed aio requests (log thread)
I/O thread 2 state: waiting for completed aio requests (read thread)
I/O thread 3 state: waiting for completed aio requests (read thread)
I/O thread 4 state: waiting for completed aio requests (read thread)
I/O thread 5 state: waiting for completed aio requests (read thread)
I/O thread 6 state: waiting for completed aio requests (read thread)
I/O thread 7 state: waiting for completed aio requests (read thread)
I/O thread 8 state: waiting for completed aio requests (read thread)
I/O thread 9 state: waiting for completed aio requests (read thread)
I/O thread 10 state: waiting for completed aio requests (read thread)
I/O thread 11 state: waiting for completed aio requests (read thread)
I/O thread 12 state: waiting for completed aio requests (read thread)
I/O thread 13 state: waiting for completed aio requests (read thread)
I/O thread 14 state: waiting for completed aio requests (read thread)
I/O thread 15 state: waiting for completed aio requests (read thread)
I/O thread 16 state: waiting for completed aio requests (read thread)
I/O thread 17 state: waiting for completed aio requests (read thread)
I/O thread 18 state: waiting for completed aio requests (write thread)
I/O thread 19 state: waiting for completed aio requests (write thread)
I/O thread 20 state: waiting for completed aio requests (write thread)
I/O thread 21 state: waiting for completed aio requests (write thread)
I/O thread 22 state: waiting for completed aio requests (write thread)
I/O thread 23 state: waiting for completed aio requests (write thread)
I/O thread 24 state: waiting for completed aio requests (write thread)
I/O thread 25 state: waiting for completed aio requests (write thread)
I/O thread 26 state: waiting for completed aio requests (write thread)
I/O thread 27 state: waiting for completed aio requests (write thread)
I/O thread 28 state: waiting for completed aio requests (write thread)
I/O thread 29 state: waiting for completed aio requests (write thread)
I/O thread 30 state: waiting for completed aio requests (write thread)
I/O thread 31 state: waiting for completed aio requests (write thread)
I/O thread 32 state: waiting for completed aio requests (write thread)
I/O thread 33 state: waiting for completed aio requests (write thread)
Pending normal aio reads: 0 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] , aio writes: 0 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ,
 ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 0
1088389 OS file reads, 10018030 OS file writes, 6093828 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 2.45 writes/s, 2.41 fsyncs/s

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

show engine innodb status\G查看mysql死锁记录 的相关文章

  • 如何在 HTML / Javascript 页面中插入 PHP 下拉列表

    好吧 这是我的第二篇文章 请接受我是一个完全的新手 愿意学习 花了很多时间在各个网站上寻找答案 而且我几乎已经到达了我需要到达的地方 至少在这一点上 我有一个网页 其中有许多 javascript 函数 这些函数一起使用 google 地图
  • 为什么我在 MySQL 中设置更大的 INT 数据类型长度时没有收到错误消息?

    我对 MySql 中的数据类型长度有点困惑 我阅读了参考手册http dev mysql com doc refman 5 0 en data types html http dev mysql com doc refman 5 0 en
  • 如何在 codeigniter 查询中使用 FIND_IN_SET?

    array array classesID gt 6 this gt db gt select gt from this gt table name gt where array gt order by this gt order by q
  • 一个表可以有多个主键吗?

    我现在很困惑 也许你可以帮助我更好地理解这个问题 即一个表可以有两个主键 如果是 那么如何 如果没有 那为什么 您询问是否可以有多个主键field你当然可以 您只能有一个主键 但它可以包含唯一标识行所需的任意数量的列 创建表时使用类似这样的
  • 在上下文中提取搜索字符串

    我正在尝试执行 MySQL 查询 在上下文中提取搜索字符串 因此 如果搜索是 mysql 我想从 body 列返回类似的内容 下载后只需几分钟MySQL安装程序即可使用 这就是我现在得到的 但它不起作用 因为它只是从正文字段中获取前 20
  • Laravel 5.4 升级 - 违反完整性约束 - 列不能为空

    奇怪的是 所有这些都在 5 2 中工作 但我不知道可以改变什么来实现这一点 下面是错误和正在插入的数组 SQLSTATE 23000 Integrity constraint violation 1048 Column gender can
  • 在 django ORM 中查询时如何将 char 转换为整数?

    最近开始使用 Django ORM 我想执行这个查询 select student id from students where student id like 97318 order by CAST student id as UNSIG
  • 日期时间与时间戳字段

    我是 MySQL 数据库的新手 您是否建议在表创建中使用日期时间或时间戳字段以及原因 我正在使用 MySQL 5 7 和 innodb 引擎 Thanks 我会用TIMESTAMP对于任何需要自动管理的事情 因为它支持诸如ON UPDATE
  • 如何使用 Mysql Python 连接器检索二进制数据?

    如果我在 MySQL 中创建一个包含二进制数据的简单表 CREATE TABLE foo bar binary 4 INSERT INTO foo bar VALUES UNHEX de12 然后尝试使用 MySQL Connector P
  • 如何为我的整个 Node.js 应用程序使用相同的 MySQL 连接?

    我有一个app js 我从那里运行我的整个应用程序 在 app js 内部 我require许多文件中都有代码 对于每个文件 我都这样做 var mysql require mysql var mclient mysql createCon
  • WHERE NOT EXIST 附近的语法错误

    我在堆栈中搜索 但没有一个达到最终答案 我的查询是这样的 INSERT INTO user username frequence autoSend VALUES feri2 3 1 WHERE NOT EXISTS SELECT FROM
  • MySQL 左连接 WHERE table2.field = "X"

    我有以下表格 pages Field Type Null Key Default Extra page id int 11 NO PRI NULL auto increment type varchar 20 NO NULL
  • NHibernate - 无法执行查询 - 输入字符串的格式不正确

    我已经为此摸不着头脑有一段时间了 我不知道出了什么问题 概述 我的 MySQL 数据库中有两个表 两者都正确映射到数据库 我可以加载数据 并且我能够查询一个表 但不能查询另一个表 我研究过的解决方案 表和 C 代码之间的类型转换问题 映射问
  • meta_query,如何使用关系 OR 和 AND 进行搜索?

    已解决 请参阅下面的答案 我有一个名为的自定义帖子类型BOOKS 它有几个自定义字段 名称为 TITLE AUTHOR GENRE RATING 我该如何修复我的meta query下面的代码以便仅books在自定义字段中包含搜索词 tit
  • Dapper 或 MySql 未找到包含句号“.”的存储过程。

    我有一个简单的 C 控制台 它使用 Dapper ORM 调用本地 MySql 数据库 以执行名为的存储过程users UserCreate 但是 当运行查询时 我收到一个异常 在数据库 用户 中找不到过程或函数 UserCreate Bu
  • 显示和随机化 php 数组

    我有一个显示结果的数组 如下所示 Array 0 gt 71 1 gt 56 2 gt 64 3 gt 82 4 gt 90 5 gt 80 6 gt 65 7 gt 62 8 gt 14 9 gt 3 我的代码是 while row my
  • Mysql带限制的删除语句

    我试图从表中删除行 但出现错误 DELETE FROM chat messages ORDER BY timestamp DESC LIMIT 20 50 我在 50 时收到此错误 您的 SQL 语法有错误 检查与您的 MySQL 服务器版
  • 使用用户定义函数 MySql 时出错

    您好 请帮我解决这个问题 提前致谢 我在数据库中定义了这些函数 CREATE FUNCTION levenshtein s1 VARCHAR 255 s2 VARCHAR 255 RETURNS INT DETERMINISTIC BEGI
  • 无法连接到 MAMP 上的 phpMyAdmin

    我收到此错误消息 MySQL 说道 无法连接 设置无效 phpMyAdmin 尝试连接 MySQL 服务器 但服务器拒绝连接 您应该检查配置中的主机 用户名和密码 并确保它们与 MySQL 服务器管理员提供的信息相对应 用户和通行证是默认的
  • rake db 问题:迁移 -

    我无法为 Ruby on Rails 设置 MySQL 数据库 设置数据库并确保 config database yml 文件匹配后 我遇到了以下错误消息 U Rails alpha gt rake db migrate trace in

随机推荐