MySQL Forums
Forum List  »  InnoDB

Possible to do if .. then atomically without exceptions?
Posted by: Archie Cobbs
Date: September 13, 2012 08:08PM

Please see this question on stackoverflow.com:

http://stackoverflow.com/questions/12373009/how-to-avoid-duplicate-keys-with-mysql-and-jpa

To summarize: is it possible to perform the following action atomically without the possibility of deadlock exceptions:

* Query for x (where x has a unique index)
* If x is not found, insert x

If so, how?

Thanks.

Options: ReplyQuote


Subject
Views
Written By
Posted
Possible to do if .. then atomically without exceptions?
1535
September 13, 2012 08:08PM


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.