Microsoft ADO.NET 커넥터에서 MySQL에 액세스하고 있습니다.
때때로 우리는 innodb 상태에서 다음과 같은 교착 상태를보고 문제의 원인을 확인할 수 없었습니다. 트랜잭션 (2)이 동일한 잠금을 대기하고있는 것처럼 보입니까?
------------------------
LATEST DETECTED DEADLOCK
------------------------
110606 5:35:09
*** (1) TRANSACTION:
TRANSACTION 0 45321452, ACTIVE 0 sec, OS thread id 3804 starting index read
mysql tables in use 1, locked 1
LOCK WAIT 2 lock struct(s), heap size 368, 1 row lock(s)
MySQL thread id 84, query id 3265713 localhost 127.0.0.1 famdev Updating
UPDATE people SET company_id = 1610, name = '<name>', password = '<hash>', temp_password = NULL, reset_password_hash = NULL, email = '<redacted>@yahoo.com', phone = NULL, mobile = '<phone>', iphone_device_id = 'android:<id>-<id>', iphone_device_time = '2011-06-06 05:35:09', last_checkin = '2011-06-06 05:24:42', location_lat = <lat>, location_long = -<lng>, gps_strength = 3296, picture_blob_id = 1190, authority = 1, active = 1, date_created = '2011-04-13 20:21:20', last_login = '2011-06-06 05:35:09', panic_mode = 0, battery_level = NULL, battery_state = NULL WHERE people_id = 3125
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 11144 n bits 152 index `PRIMARY` of table `family`.`people` trx id 0 45321452 lock_mode X locks rec but not gap waiting
Record lock, heap no 12 PHYSICAL RECORD: n_fields 25; compact format; info bits 0
0: len 8; hex 8000000000000c35; asc 5;; 1: len 6; hex 000002b38ce6; asc ;; 2: len 7; hex 00000002801f89; asc ;; 3: len 8; hex 800000000000064a; asc J;; 4: len 4; hex <data>; asc <name>;; 5: len 30; hex <data>; asc <data>;...(truncated); 6: SQL NULL; 7: SQL NULL; 8: len 16; hex <data>; asc <redacted>@yahoo.com;; 9: SQL NULL; 10: len 10; hex <data>; asc <phone>;; 11: len 30; hex <data>; asc android:<id>;...(truncated); 12: len 8; hex <data>; asc J] Z;; 13: len 8; hex <data>; asc J] Z;; 14: len 8; hex a39410acaa9b4340; asc C@;; 15: len 8; hex <data>; asc m S ;; 16: len 2; hex 8ce0; asc ;; 17: len 8; hex 80000000000004a6; asc ;; 18: len 4; hex 80000001; asc ;; 19: len 1; hex 81; asc ;; 20: len 8; hex <data>; asc JR ;; 21: len 8; hex <data>; asc J] ;; 22: len 1; hex 80; asc ;; 23: SQL NULL; 24: SQL NULL;
*** (2) TRANSACTION:
TRANSACTION 0 45321448, ACTIVE 0 sec, OS thread id 3176 starting index read, thread declared inside InnoDB 500
mysql tables in use 1, locked 1
5 lock struct(s), heap size 1216, 2 row lock(s), undo log entries 1
MySQL thread id 85, query id 3265714 localhost 127.0.0.1 famdev Updating
UPDATE people SET company_id = 1610, name = '<name>', password = '<hash>', temp_password = NULL, reset_password_hash = NULL, email = '<redacted>@yahoo.com', phone = NULL, mobile = '<phone>', iphone_device_id = 'android:<id>-<id>-<id>-<id>', iphone_device_time = '2011-06-06 05:24:42', last_checkin = '2011-06-06 05:35:07', location_lat = <lat>, location_long = -<lng>, gps_strength = 3296, picture_blob_id = 1190, authority = 1, active = 1, date_created = '2011-04-13 20:21:20', last_login = '2011-06-06 05:35:09', panic_mode = 0, battery_level = NULL, battery_state = NULL WHERE people_id = 3125
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 0 page no 11144 n bits 152 index `PRIMARY` of table `family`.`people` trx id 0 45321448 lock mode S locks rec but not gap
Record lock, heap no 12 PHYSICAL RECORD: n_fields 25; compact format; info bits 0
0: len 8; hex 8000000000000c35; asc 5;; 1: len 6; hex 000002b38ce6; asc ;; 2: len 7; hex 00000002801f89; asc ;; 3: len 8; hex 800000000000064a; asc J;; 4: len 4; hex <data>; asc <name>;; 5: len 30; hex <data>; asc <data>;...(truncated); 6: SQL NULL; 7: SQL NULL; 8: len 16; hex <data>; asc <redacted>@yahoo.com;; 9: SQL NULL; 10: len 10; hex <data>; asc <phone>;; 11: len 30; hex <data>; asc android:<id>;...(truncated); 12: len 8; hex <data>; asc J] Z;; 13: len 8; hex <data>; asc J] Z;; 14: len 8; hex a39410acaa9b4340; asc C@;; 15: len 8; hex <data>; asc m S ;; 16: len 2; hex 8ce0; asc ;; 17: len 8; hex 80000000000004a6; asc ;; 18: len 4; hex 80000001; asc ;; 19: len 1; hex 81; asc ;; 20: len 8; hex <data>; asc JR ;; 21: len 8; hex <data>; asc J] ;; 22: len 1; hex 80; asc ;; 23: SQL NULL; 24: SQL NULL;
*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 11144 n bits 152 index `PRIMARY` of table `family`.`people` trx id 0 45321448 lock_mode X locks rec but not gap waiting
Record lock, heap no 12 PHYSICAL RECORD: n_fields 25; compact format; info bits 0
0: len 8; hex 8000000000000c35; asc 5;; 1: len 6; hex 000002b38ce6; asc ;; 2: len 7; hex 00000002801f89; asc ;; 3: len 8; hex 800000000000064a; asc J;; 4: len 4; hex <data>; asc <name>;; 5: len 30; hex <data>; asc <data>;...(truncated); 6: SQL NULL; 7: SQL NULL; 8: len 16; hex <data>; asc <redacted>@yahoo.com;; 9: SQL NULL; 10: len 10; hex <data>; asc <phone>;; 11: len 30; hex <data>; asc android:<id>;...(truncated); 12: len 8; hex <data>; asc J] Z;; 13: len 8; hex <data>; asc J] Z;; 14: len 8; hex a39410acaa9b4340; asc C@;; 15: len 8; hex <data>; asc m S ;; 16: len 2; hex 8ce0; asc ;; 17: len 8; hex 80000000000004a6; asc ;; 18: len 4; hex 80000001; asc ;; 19: len 1; hex 81; asc ;; 20: len 8; hex <data>; asc JR ;; 21: len 8; hex <data>; asc J] ;; 22: len 1; hex 80; asc ;; 23: SQL NULL; 24: SQL NULL;
*** WE ROLL BACK TRANSACTION (1)
다음 키 잠금에 대해서는 이 기사 를 읽었 지만 업데이트를 위해 선택하지 않기 때문에 적용되지 않는 것 같습니다.
최신 정보
오늘 아침에이 교착 상태의 근본 원인 인 약간 다른 교착 상태 서명을 발견했습니다. 나는 그 교착 상태를 간단하게 유지하기 위해 별도의 질문으로 게시했습니다 . 다른 질문이 원인임을 확인할 수 있으면 여기에서 업데이트하겠습니다.