mysql> show innodb status /G ……. ------------------------ LATEST DETECTED DEADLOCK ------------------------ 070710 14:05:16 *** (1) TRANSACTION: TRANSACTION 0 117470078, ACTIVE 117 sec, process no 1468, OS thread id 1197328736 inserting mysql tables in use 1, locked 1 LOCK WAIT 5 lock struct(s), heap size 1216 MySQL thread id 7521657, query id 673468054 localhost root update insert into country (country_id,country) values(110,'Test') ……… *** (2) TRANSACTION: TRANSACTION 0 117470079, ACTIVE 39 sec, process no 1468, OS thread id 1164048736 starting index read, thread declared inside InnoDB 500 mysql tables in use 1, locked 1 4 lock struct(s), heap size 1216, undo log entries 1 MySQL thread id 7521664, query id 673468058 localhost root statistics select first_name,last_name from actor where actor_id = 1 for update *** (2) HOLDS THE LOCK(S): ……… *** (2) WAITING FOR THIS LOCK TO BE GRANTED: ……… *** WE ROLL BACK TRANSACTION (1) …… |