MySQL Forums
Forum List  »  InnoDB

Re: deadlock for mixed row and table lock?
Posted by: Peter Brawley
Date: February 24, 2013 03:39PM

Are these nested sets keys? If so, you've illustrated why Celko's model isn't optimal for changeable trees.

SELECT ... FOR UPDATE doesn't issue a table lock; it locks the rows and associated index records as if you'd issued an UPDATE for those rows, ie it blocks other changes till the transaction is complete. INSERT locks the inserted row (index-record lock, not a next-key lock). I can't rule out deadlock from what you've shown, but it doesn't look likely.

In the scenario you paint, do you care which transaction gets to go first?

Options: ReplyQuote


Subject
Views
Written By
Posted
1582
January 12, 2013 11:43AM
Re: deadlock for mixed row and table lock?
667
February 24, 2013 03:39PM


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.