On 13.11.2007 19:19 CE(S)T, Perrin Harkins wrote:
> "You can use next-key locking to implement a uniqueness check in your
> application: (...)
> http://dev.mysql.com/doc/refman/5.0/en/innodb-next-key-locking.html

This doesn't help my problem either. It may lock new INSERTs to the
table, but it won't lock SELECTs so any other concurrent user can still
find its own (same) MAX(id) value and then do an insert. Or any other
process can still check for uniqueness and then fail with its insert.
The insert of the first process may succeed guaranteed, but the second
will fail at a point where it should not. (Actually, it should never
fail when I found a new id value / found that my new value is unique.)

I have tested the SELECT ... FOR UPDATE and the LOCK TABLES with
autocommit = 0 thing. Both don't lock anything (at least not for reading
by others which is what I need). May I now conclude that exclusive full
table locking is not possible with InnoDB? Or is there another way that
I don't know yet?

-- 
Yves Goergen "LonelyPixel" <[EMAIL PROTECTED]>
Visit my web laboratory at http://beta.unclassified.de

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to