[drupal-devel] LOCK vs. SELECT FOR UPDATE

Gerhard Killesreiter killesreiter at physik.uni-freiburg.de
Thu Sep 29 00:12:21 UTC 2005

On Thu, 29 Sep 2005, Karoly Negyesi wrote:

> I think we should use autoincrement/serial and have a db_last_id function
> (mysql_insert_id, select currval, lastInsertId in PDO etc.). This would
> make Drupal code actually shorter and simpler (a very little bit).

I think that I do now recall why we are looking up the next ID first: If
we use mysql_insert_id we risk not getting the right ID.

See here for some warnings:


More information about the drupal-devel mailing list