Why is it a dead end (MySQL using InnoDB)

SHOW INNODB ENGINE STATUS shows me this and calls it a dead end:

LAST DETECTED TERMS

100923 22:29:21 * (1) OPERATION: TRANSACTION 0 5335752, ACTIVE 0 sec, OS thread id 7992 of mysql table in use 1, 1 locked LOCK WAIT 5 struct (s) lock, heap size 1024, 4 row lock, undo log entries 3 MySQL thread id 26, request identifier 14422 localhost 127.0.0.1 root update insert into history_messagearguments (history_id, messageArguments_ORDER, messageArguments) values ​​(69, 1, '1') * (1) EXPECTED TO PROVIDE THIS UNIT: RECORD LOCKS space id 0 page no 179145 n bit 304 fk_history_msgargstable index zvs_rkl_01_test.history_messageargumentstrx id 0 5335752 lock_mode X locks the space until the intention to wait is re-set Record lock, heap no 198 PHYSICAL RECORD: n_fields 2; compact format; information bits 0 0: len 8; hex 8000000000000048; asc H ;; 1: len 6; hex 0000006fe7c5; asc o ;;

* (2) OPERATION: TRANSACTION 0 5335748, ACTIVE 0 sec., Thread id id 6988, thread declared inside InnoDB 500 mysql table in use 1, blocked 1 5 struct (s) locks, heap size 1024, 3 row lock, undo log entries 2 MySQL thread id 25, query ID 14424 localhost 127.0.0.1 root update insert in history_messagearguments (history_id, messageArguments_ORDER, messageArguments) values ​​(71, 0, '0') * (2) LOCK LOCK (S): RECORD LOCKS space id 0 page no 179145 n bit 304 fk_history_msgargstable index zvs_rkl_01_test. history_messageargumentstrx id 0 5335748 lock_mode X locks the gap until rec Record lock, no heap 198 PHYSICAL RECORD: n_fields 2; compact format; information bits 0 0: len 8; hex 8000000000000048; asc H ;; 1: len 6; hex 0000006fe7c5; asc o ;;

* (2) , : RECORD LOCKS id 0 179145 n 304 fk_history_msgargs zvs_rkl_01_test. history_messagearguments trx id 0 5335748 lock_mode X , 198 : n_fields 2; ; 0  0: len 8; hex 8000000000000048; asc H;; 1: len 6; hex 0000006fe7c5; asc o;;

* (2)

, . ", , ": 1. 1 , , .

4, : http://en.wikipedia.org/wiki/Deadlock#Necessary_conditions

, MySQL 2 . 1 .

(http://stackoverflow.com/questions/1851528/mysql-deadlock-explanation-needed) BrainCore ():

2 "" 1, a la FIFO queue.

- MySQL, ? , , .

, , .., . , SHOW ENGINE STATUS OUTPUT.

+3
1

1 2: :

  • : lock_mode X
  • , : RECORD LOCKS id 0 no 179145 n 304 fk_history_msgargs zvs_rkl_01_test.history_messagearguments trx id 0 5335748
  • , ,

InnoDB , innodb.

0

Source: https://habr.com/ru/post/1766988/


All Articles