I am using mysql 5.5.28.
I would like to ask a question about the nature of deadlocks in innodb engine.
I monitor deadlock with pt-deadlock-logger.
Recently I found deadlock of two transactions to two different tables. How it's possible? I thought deadlocks may happen only when two transactions try to get access to the same record of the same table. Both transactions tried to UPDATE field updated_at on the same time on the different tables.
How it's possible?
I also saved the output if SHOW ENGINE INNODB STATUS and can share with you any detail.
Queries:
UPDATE `tickets`
SET `updated_at` = '2012-11-27 08:24:24'
WHERE `id` = 123
UPDATE `ticket_info`
SET `updated_at` = '2012-11-27 08:24:23',
`ticket_for` = 'reason'
WHERE `id` = 456
SHOW CREATE TABLE tickets;andSHOW CREATE TABLE ticket_info;). I suspect there is one (or more?) foreign keys between the 2 tables, right? – ypercube Dec 2 '12 at 17:47