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

puregin puregin at puregin.org
Sun May 1 18:55:02 UTC 2005

On 1 May 2005, at 11:17 AM, Dries Buytaert wrote:

> On 01 May 2005, at 18:55, Gerhard Killesreiter wrote:
>> Generally, it will cause the same problem for me as switching to PHP 
>> 4.3
>> did. I run Debian and Debian stable does only provide MySQL 3. I 
>> haven't
>> checked if there is a .deb for MySQL 4 on backports.org yet.
>> However, since our database abstraction layer is very modular, I could
>> even continue to use mysql 3 if I wrote an appropriate include file 
>> and
>> would be willing to live without some of the more advanced features.
>> The question is if we should ship a database.mysql3.inc file with
>> Drupal 4.7 or not.
> 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).
     PostgreSQL 7.4 and later should support this:


I haven't tried this, though.


More information about the drupal-devel mailing list