MySQL Forums
Forum List  »  InnoDB

Re: DeadLock issue in MultiThreading due to foreign key constraint.
Posted by: Rick James
Date: March 30, 2016 11:14AM

That list of about 12 statements are between BEGIN and COMMIT?

Perhaps the DELETE is removing something that the other thread is trying to work with?

LinkedLineItemId is the FOREIGN KEY that is "causing the trouble"? 2646 and 2650 are somehow involved -- Were they inserted during the same transactions?

Guess #1: A logic error in those 12 statements.

Guess #2: The deadlock may be unavoidable. So, the 'fix' is to detect it and restart the transaction. You seem to be detecting it, but I don't notice the restart.

Options: ReplyQuote




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.