[drupal-devel] MySQL 3, MySQL 4 and MySQL 5

Gerhard Killesreiter killesreiter at physik.uni-freiburg.de
Sun May 1 19:01:17 UTC 2005



On Sun, 1 May 2005, Dries Buytaert wrote:

> Well, the syntax for row-level locking is this:
>
>   SELECT * FROM cache WHERE cid = %s FOR UPDATE
>   UPDATE cache SET ... WHERE ...
>
> A "SELECT ... FOR UPDATE" reads the data and sets exclusive locks on
> each row it reads.  AFAIK, this is valid ANSI SQL, yet it might give
> errors on either MySQL 3 or PostgreSQL.  I don't have a MySQL 3
> installation to test with these days but clearly, this is not something
> that is easily fixed using the database layer (unless you want to
> rewrite queries of course).

MySQL 3 does not support "FOR UPDATE", no idea about Postgres. Yes,
rewriting would be neccessary and I don't see it as a problem. If we
make this an extra function, it wouldn't have much of an impact, too.

BTW, there isn't a MySQL 4 backport on backports.org.

Cheers,
	Gerhard




More information about the drupal-devel mailing list