系统吧 专业的电脑操作系统,支持重装各种原版系统xp/win7/win8/win10 这个系统怎么样?试试系统吧系统,体验办公系统畅快愉悦感。 各种电脑系统安装过程一样,神一般的畅快!
-->
当前位置:主页 > win10 >

MySQL死锁检查处理的正常方法(4)

作者:孙紫潇 分类:win10 发布时间:2021-07-25 09:32:00

?123456789 #step 3:窗口一 (若第三步中锁请求太久,则出现锁超时而终止执行) mysql> update bb set name = 'bbb' ; ERROR 1205 (HY000): Lock wait timeout exceeded; try restarti...

?123456789#step 3:窗口一 (若第三步中锁请求太久,则出现锁超时而终止执行)mysql> update bb set name='bbb';ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction    #"窗口一" 锁请求超时前,执行第五步,使死锁产生,则该连接 "窗口二" 执行终止,"窗口一" 顺利执行#step 5:窗口二mysql> update aa set name='aa';ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction

查看最近一个死锁情况

?12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758#查看最近一个死锁情况mysql> SHOW ENGINE INNODB STATUS\G ;...............------------------------LATEST DETECTED DEADLOCK------------------------2018-03-12 11:01:06 7ffb4993a700 #发生时间*** (1) TRANSACTION: #事务1TRANSACTION 130718515, ACTIVE 19 sec starting index readmysql tables in use 1, locked 1 #正被访问的表LOCK WAIT 4 lock struct(s), heap size 1184, 4 row lock(s), undo log entries 1 #影响行数MySQL thread id 5, OS thread handle 0x7ffb498f8700, query id 205 localhost root updating #线程/连接host/用户update bb set name='bb' #请求语句*** (1) WAITING FOR THIS LOCK TO BE GRANTED: #等待以下资源 (锁定位置及锁模式)RECORD LOCKS space id 65 page no 3 n bits 72 index `GEN_CLUST_INDEX` of table `test`.`bb` trx id 130718515 lock_mode X waitingRecord lock, heap no 5 PHYSICAL RECORD: n_fields 5; compact format; info bits 0 0: len 6; hex 000000000300; asc  ;; 1: len 6; hex 000007ca9b34; asc  4;; 2: len 7; hex 1f000002092075; asc  u;; 3: len 4; hex 80000001; asc  ;; 4: len 2; hex 6262; asc bb;;  *** (2) TRANSACTION: #事务2TRANSACTION 130718516, ACTIVE 14 sec starting index readmysql tables in use 1, locked 14 lock struct(s), heap size 1184, 4 row lock(s), undo log entries 1MySQL thread id 4, OS thread handle 0x7ffb4993a700, query id 206 localhost root updatingupdate aa set name='aa' #请求语句
xp 更多>>
win7 更多>>
win8 更多>>
win10 更多>>
U盘 更多>>
电脑技术 更多>>
网站地图 | 豫ICP备2021035069号-4 | 友情链接qq:191064436
系统吧

版权所有 © 2012-2023 系统吧 免责声明:本站资源均收集于互联网,其著作权归原作者所有,如果有侵犯您权利的资源,请来信告知,我们将及时删除相应资源。