MySQL Forums
Forum List  »  InnoDB

Re: DeadLock issue in MultiThreading due to foreign key constraint.
Posted by: Rishi anjan
Date: March 29, 2016 10:59PM

Thanks James.
Below are the sql queries for your refrence executed by hibernate on single thread:-

Hibernate: insert into Entitlement (Eid, Descr, Qty, RemainingQty) values (?, ?, ?, ?)
Hibernate: insert into LineItem (AttrId, AttrValue, EntId, LinkedLineItemId) values (?, ?, ?, ?)
Hibernate: insert into LineItem (AttrId, AttrValue, EntId, LinkedLineItemId) values (?, ?, ?, ?)
Hibernate: select entitlemen0_.EntId as EntId1_1_, entitlemen0_.Eid as Eid2_1_, entitlemen0_.Descr as Descr3_1_, entitlemen0_.Qty as Qty4_1_, entitlemen0_.RemainingQty as Remainin5_1_ from Entitlement entitlemen0_ where entitlemen0_.Eid=?
Hibernate: select lineitem0_.EntId as EntId4_1_2_, lineitem0_.LineItemId as LineItem1_2_2_, lineitem0_.LineItemId as LineItem1_2_1_, lineitem0_.AttrId as AttrId2_2_1_, lineitem0_.AttrValue as AttrValu3_2_1_, lineitem0_.EntId as EntId4_2_1_, lineitem0_.LinkedLineItemId as LinkedLi5_2_1_, lineitem1_.LineItemId as LineItem1_2_0_, lineitem1_.AttrId as AttrId2_2_0_, lineitem1_.AttrValue as AttrValu3_2_0_, lineitem1_.EntId as EntId4_2_0_, lineitem1_.LinkedLineItemId as LinkedLi5_2_0_ from LineItem lineitem0_ left outer join LineItem lineitem1_ on lineitem0_.LinkedLineItemId=lineitem1_.LineItemId where lineitem0_.EntId=?
Hibernate: delete from LineItem where LineItemId=?
Hibernate: insert into Entitlement (Eid, Descr, Qty, RemainingQty) values (?, ?, ?, ?)
Hibernate: insert into LineItem (AttrId, AttrValue, EntId, LinkedLineItemId) values (?, ?, ?, ?)
Hibernate: insert into LineItem (AttrId, AttrValue, EntId, LinkedLineItemId) values (?, ?, ?, ?)
Hibernate: insert into LineItem (AttrId, AttrValue, EntId, LinkedLineItemId) values (?, ?, ?, ?)
Hibernate: update Entitlement set Eid=?, Descr=?, Qty=?, RemainingQty=? where EntId=?

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.