From: saper Date: Mon, 27 Aug 2012 16:58:54 +0000 (+0200) Subject: (bug 39635) PostgreSQL has no LOCK IN SHARE MODE X-Git-Tag: 1.31.0-rc.0~22576^2 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=5fe67c61a777c9a97aacdf835cd067c754054454;p=lhc%2Fweb%2Fwiklou.git (bug 39635) PostgreSQL has no LOCK IN SHARE MODE 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 --- diff --git a/RELEASE-NOTES-1.20 b/RELEASE-NOTES-1.20 index 92f050e68e..de0456c11e 100644 --- a/RELEASE-NOTES-1.20 +++ b/RELEASE-NOTES-1.20 @@ -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 === diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index 8f8f5e83e4..457bf384a8 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -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'; }