MySQL Forums
Forum List  »  InnoDB

Re: Deadlock from a single query locking the same index twice
Posted by: Rick James
Date: August 28, 2008 10:36PM

The main clue is
... index `word_account_date` ... lock_mode X locks gap before rec insert intention waiting ...

That index is on (word, companyid, datetime). The INSERT is probably going next to a row that the UPDATE is modifying. (Note: "gap")

Probably your best bet is to catch the error, make sure it is a deadlock rollback, and then redo the instruction.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Deadlock from a single query locking the same index twice
2064
August 28, 2008 10:36PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.