Re: question about locking

2006-02-10 Thread Peter Brawley
Patrick, >I thought, that if I turned off autocommit I would enter a transaction. >Then, by using the "select...for update", that I would take and hole a lock on the table. With a transaction-capable table, eg InnoDB, otherwise neither setting autocommit off nor adding FOR UPDATE has any eff

RE: question about locking

2006-02-08 Thread Burke, Dan
I've done similar things with sequences. This method is borrowed from the DBIx::MySQLSequence perl module (the _sequences table can contain many sequences, named in the "sequence_name" field): update _sequences set sequence_value = LAST_INSERT_ID(sequence_value + 1) where sequence_name

Re: question about locking

2006-02-08 Thread Gleb Paharenko
Hello. The logic of your application is clear and should work (though I haven't been digging deeply inside the code). Check that the table type is InnoDB. 4.0.1 version is rather old and could have lots of bugs, I recommend you to upgrade to the latest release. Another reason, is that your algorit