(bug 39635) PostgreSQL has no LOCK IN SHARE MODE
authorsaper <saper@saper.info>
Mon, 27 Aug 2012 16:58:54 +0000 (18:58 +0200)
committersaper <saper@saper.info>
Mon, 27 Aug 2012 16:58:54 +0000 (18:58 +0200)
includes/Category.php tells us to use "SELECT ...
LOCK IN SHARE MODE" before "UPDATE".

This is MySQL-only construct:

http://dev.mysql.com/doc/refman/5.0/en/innodb-locking-reads.html

Change-Id: I80709da9e15c891f1605900e7c527d5042a88f73

RELEASE-NOTES-1.20
includes/db/DatabasePostgres.php

index 92f050e..de0456c 100644 (file)
@@ -260,6 +260,7 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki.
 * (bug 38904) prop=revisions&rvstart=... no longer blows up when continuing.
 * (bug 39032) ApiQuery generates help in constructor.
 * (bug 11142) Improve file extension blacklist error reporting in API upload
+* (bug 39635) PostgreSQL LOCK IN SHARE MODE option is a syntax error
 
 === Languages updated in 1.20 ===
 
index 8f8f5e8..457bf38 100644 (file)
@@ -1406,9 +1406,6 @@ SQL;
                if ( isset( $noKeyOptions['FOR UPDATE'] ) ) {
                        $postLimitTail .= ' FOR UPDATE';
                }
-               if ( isset( $noKeyOptions['LOCK IN SHARE MODE'] ) ) {
-                       $postLimitTail .= ' LOCK IN SHARE MODE';
-               }
                if ( isset( $noKeyOptions['DISTINCT'] ) || isset( $noKeyOptions['DISTINCTROW'] ) ) {
                        $startOpts .= 'DISTINCT';
                }