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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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) |