Web lists-archives.com

Mysql 5.5 Dead Locks




Hi,

I'm receiving MySQL 5.5 deadlocks.

I enabled the innodb lock monitor using this command:
CREATE TABLE innodb_lock_monitor(a int) ENGINE=INNODB;

I got the following output:

------------------------
LATEST DETECTED DEADLOCK
------------------------
151007 13:58:36
*** (1) TRANSACTION:
TRANSACTION 13F6957A, ACTIVE 10 sec starting index read
mysql tables in use 2, locked 2
LOCK WAIT 6 lock struct(s), heap size 1248, 3 row lock(s), undo log entries
2
MySQL thread id 15115, OS thread handle 0x2b1b51a55700, query id 150823016
10.129.28.111 awsuser Updating
update LANCAMENTO set ALTERADO_INTERFACE=1, DATA_CRIACAO='2015-08-28',
DATA_FIN_MAT_DISTRIB=null, DATA_LCTO_DISTRIBUIDOR='2015-08-24',
DATA_LCTO_PREVISTA='2015-08-24', DATA_REC_DISTRIB='2015-10-23',
DATA_REC_PREVISTA='2015-10-23', DATA_STATUS='2015-10-07 11:01:43',
ESTUDO_ID=null, EXPEDICAO_ID=641, JURAMENTADO=null, NUMERO_LANCAMENTO=1,
NUMERO_REPROGRAMACOES=null, PERIODO_LANCAMENTO_PARCIAL_ID=null,
PRODUTO_EDICAO_ID=464, REPARTE=2700, REPARTE_PROMOCIONAL=0,
SEQUENCIA_MATRIZ=null, STATUS='EXPEDIDO', TIPO_LANCAMENTO='LANCAMENTO',
USUARIO_ID=11 where ID=464
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 48034 page no 15 n bits 216 index `PRIMARY` of table
`db_00757350`.`lancamento` trx id 13F6957A lock_mode X locks rec but not
gap waiting
Record lock, heap no 144 PHYSICAL RECORD: n_fields 24; compact format; info
bits 0
 0: len 8; hex 80000000000001d0; asc         ;;
 1: len 6; hex 000013f6933b; asc      ;;;
 2: len 7; hex 0b00002c6629e2; asc    ,f) ;;
 3: len 1; hex 81; asc  ;;
 4: len 3; hex 8fbf1c; asc    ;;
 5: len 3; hex 8fbf18; asc    ;;
 6: len 3; hex 8fbf18; asc    ;;
 7: len 3; hex 8fbf57; asc   W;;
 8: len 3; hex 8fbf57; asc   W;;
 9: SQL NULL;
 10: len 8; hex 80001253c59ee3d4; asc    S    ;;
 11: len 9; hex 80000000000a8c0000; asc          ;;
 12: len 9; hex 800000000000000000; asc          ;;
 13: SQL NULL;
 14: len 8; hex 455850454449444f; asc EXPEDIDO;;
 15: len 10; hex 4c414e43414d454e544f; asc LANCAMENTO;;
 16: len 8; hex 80000000000001d0; asc         ;;
 17: len 8; hex 8000000000000281; asc         ;;
 18: len 8; hex 800000000000000b; asc         ;;
 19: len 4; hex 80000001; asc     ;;
 20: SQL NULL;
 21: SQL NULL;
 22: SQL NULL;
 23: SQL NULL;

Somebody could help me to understand this result?

Thanks!