Mysql – Missing statement information from ‘LATEST DETECTED DEADLOCK’ InnoDB status output

deadlockinnodbMySQLmysql-5.6

I'm learning how to interpret the LATEST DETECTED DEADLOCK section in the output of SHOW ENGINE INNODB STATUS, and had a question about the output. Some sample output of SHOW ENGINE INNODB STATUS from our DB:

------------------------
LATEST DETECTED DEADLOCK
------------------------
2015-09-29 17:00:30 7f9eb7410700
*** (1) TRANSACTION:
TRANSACTION 2842247584, ACTIVE 0 sec, thread declared inside InnoDB 4998
mysql tables in use 1, locked 1
LOCK WAIT 5 lock struct(s), heap size 1184, 26 row lock(s)
MySQL thread id 69517881, OS thread handle 0x7f9ee07bd700, query id 11929163563 cfsender01.cf.intela.local 192.168.20.116 cfsender01 updating
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
...

Notice that there is no SQL statement listed in transaction (1).

Does anyone know why this might happen, or what the lack of a sql statement in the show engine innodb status would indicate about the transaction?

FWIW, transaction (1) was chosen as the victim by MySQL and rolled back.

Also, we're running MySQL Server version: 5.6.19-67.0-log Percona Server (GPL), Release 67.0, Revision 618.

Best Answer

What language is the client written in? You should test for errors after every statement (including the COMMIT) in every transaction. That is the way to locate the problem. SHOW ENGINE InnoDB STATUS should not, as you see, be depended upon. More significantly, it won't necessarily catch all deadlocks.