MySQL Forums
Forum List  »  MyISAM

Re: Need I lock the table?
Posted by: Roland Bouman
Date: July 16, 2005 04:59AM

If theres no bug or quirk in the code that checks the limit, i guess it's still possible that you're having this problem becaus of concurrency, like:

Time=0: Thread 1 checks the limit, thinks its ok to insert
Time=1: Thread 2 checks the limit, thinks its ok to insert
Time=2: Thread 2 inserts, limit is reached
Time=3: Thread 1 still thinks it's ok to insert, inserts, limit is exceeded

I never tried this, but a quick look in the manual makes me think that you could use locks to prevent this.

By All means, read chapter 13 of the manual. Halfway ,the LOCK TABLES statement is explained.

I hope it helps!

Options: ReplyQuote


Subject
Views
Written By
Posted
3096
July 15, 2005 05:55PM
Re: Need I lock the table?
1628
July 16, 2005 04:59AM
1940
July 17, 2005 11:02AM


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.