MySQL Forums
Forum List  »  InnoDB

Tricky problem with parallel update of table.
Posted by: James La Guma
Date: May 22, 2013 12:12AM

Good day.

I have tricky problem which I'm struggling to get right.
I have the following situation:
1) InnoDB database
2) There is a table "licences" which has encrypted string "lics" in it.
3) I have code which grabs that string, decrypts it, deducts a license, encrypts it again, updates that table with new encrypted string.

The problem is that if 5 users execute this code at the same time, only 1 license deduction happens.

How can I get this right so all 5 licenses are deducted even when 5 users run that code at exactly the same time?

Thanks.

Options: ReplyQuote


Subject
Views
Written By
Posted
Tricky problem with parallel update of table.
1231
May 22, 2013 12:12AM


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.