MySQL Forums
Forum List  »  InnoDB

Re: deadlock: a row being locked by a query twice?
Posted by: Peter Brawley
Date: April 09, 2016 03:02PM

Unless I'm missing something in this query, it can be written more efficiently and perhaps avoid the second lock ...

SELECT *
FROM `active_user`
WHERE `user_id`=111111 AND `identifier`='XXXXXXXXXXXXXX@gmail.com' and type in('1','11','18');
FOR UPDATE ;

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: deadlock: a row being locked by a query twice?
592
April 09, 2016 03:02PM


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.