Unix Technical Forum

Deadlocks. Can 1 transaction both hold and wait for the same lock?

This is a discussion on Deadlocks. Can 1 transaction both hold and wait for the same lock? within the MySQL forums, part of the Database Server Software category; --> Am I reading something wrong in the below deadlock section taken from "show engine innodb status"? It seems to ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-29-2008, 10:41 AM
Chuck
 
Posts: n/a
Default Deadlocks. Can 1 transaction both hold and wait for the same lock?

Am I reading something wrong in the below deadlock section taken from
"show engine innodb status"? It seems to be saying that transaction (2)
is both holding and waiting on the same lock -
7765626d6f6e6b65795f6d6564696177696b692d6d775f3a6d 6573736167.

How is that possible with row level locking?

TIA


------------------------
LATEST DETECTED DEADLOCK
------------------------
[tx 1 snipped]

*** (2) TRANSACTION:
TRANSACTION 0 15784891, ACTIVE 13 sec, OS thread id 6420200 inserting,
thread declared inside InnoDB 500
mysql tables in use 1, locked 1
4 lock struct(s), heap size 1216, undo log entries 2
MySQL thread id 6420189, query id 111643110 scntde52-01.advancepubs.net
10.244.16.84 wm_wiki_user update
INSERT /* MediaWikiBagOStuff::_doinsert 10.244.4.17 */ IGNORE INTO
`mw_objectcache` (keyname,value,exptime) VALUES
('webmonkey_mediawiki-mw_:messageslock',\
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 0 page no 2861 n bits 88 index `keyname` of table
`webmonkey_mediawiki/mw_objectcache` trx id 0 15784891 lock_mode X locks
rec but not gap
Record lock, heap no 10 PHYSICAL RECORD: n_fields 5; compact format;
info bits 32
0: len 30; hex
7765626d6f6e6b65795f6d6564696177696b692d6d775f3a6d 6573736167; asc
webmonkey_mediawiki-mw_:messag;...(truncated); 1: len 6; hex
000000f0dbbb; asc ;; 2: len 7; hex 0000000f2c23c7; asc ,# ;;
3: len 30; hex
25904f6bc3300cc5effd1422176f30125af6079cf360bd74b0 8dc1183bd8; asc % Ok 0
" o0 Z ` t ; ;...(truncated); 4: len 8; hex 800012435cce44da;
asc C\ D ;;

Record lock, heap no 13 PHYSICAL RECORD: n_fields 5; compact format;
info bits 0
0: len 30; hex
7765626d6f6e6b65795f6d6564696177696b692d6d775f3a6d 6573736167; asc
webmonkey_mediawiki-mw_:messag;...(truncated); 1: len 6; hex
000000f0dbbb; asc ;; 2: len 7; hex 0000000f2c2429; asc ,$);;
3: len 6; hex cbb432b40600; asc 2 ;; 4: len 8; hex 800012435cbf02ab;
asc C\ ;;

*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 2187 n bits 312 index `exptime` of table
`webmonkey_mediawiki/mw_objectcache` trx id 0 15784891 lock_mode X locks
gap before rec insert intention waiting
Record lock, heap no 238 PHYSICAL RECORD: n_fields 2; compact format;
info bits 32
0: len 8; hex 800012435cbf02fb; asc C\ ;; 1: len 30; hex
7765626d6f6e6b65795f6d6564696177696b692d6d775f3a6d 6573736167; asc
webmonkey_mediawiki-mw_:messag;...(truncated);

*** WE ROLL BACK TRANSACTION (1)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:16 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com