From: Greg Sabino Mullane Date: Mon, 25 Dec 2006 17:28:21 +0000 (+0000) Subject: Do not have non-mysql databases attempt mysql-sepcific GET_LOCK commands. Move all... X-Git-Tag: 1.31.0-rc.0~54770 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=a1eab3fe452d7febc2b7d5aeb649383c18d5d28c;p=lhc%2Fweb%2Fwiklou.git Do not have non-mysql databases attempt mysql-sepcific GET_LOCK commands. Move all this to DatabaseMysql.php someday. --- diff --git a/includes/FileStore.php b/includes/FileStore.php index 294bf990b0..1fd35b01f6 100644 --- a/includes/FileStore.php +++ b/includes/FileStore.php @@ -36,6 +36,9 @@ class FileStore { * @fixme Probably only works on MySQL. Abstract to the Database class? */ static function lock() { + global $wgDBtype; + if ($wgDBtype != 'mysql') + return true; $dbw = wfGetDB( DB_MASTER ); $lockname = $dbw->addQuotes( FileStore::lockName() ); $result = $dbw->query( "SELECT GET_LOCK($lockname, 5) AS lockstatus", __METHOD__ ); @@ -54,6 +57,9 @@ class FileStore { * Release the global file store lock. */ static function unlock() { + global $wgDBtype; + if ($wgDBtype != 'mysql') + return true; $dbw = wfGetDB( DB_MASTER ); $lockname = $dbw->addQuotes( FileStore::lockName() ); $result = $dbw->query( "SELECT RELEASE_LOCK($lockname)", __METHOD__ );