MySQL Forums
Forum List  »  Newbie

Transaction timeout for data-base mutex
Posted by: tourneur
Date: August 26, 2004 04:45AM


I'de like to use transaction locking mechanism as a mutex. I've already succeeded making this work on pgsql.

The algo is simple: I open a connection, set lock timeout to whatever i want, start the transaction and try to update a dummy row or create a dummy table (P/semTake of mutex), check if I got the mutex token (affected rows > 0 on update, no error on create table) (if not exit), execute my critical job and finally close the data-base connection causing a roll-back on update or create table (V/semGive of mutex).

With MySQL, I haven't found anything to modify the lock timeout. Does someone know?

thanks for any answer.


Options: ReplyQuote

Written By
Transaction timeout for data-base mutex
August 26, 2004 04:45AM

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.