dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c576b0a
)
Do not have non-mysql databases attempt mysql-sepcific GET_LOCK commands. Move all...
author
Greg Sabino Mullane
<greg@users.mediawiki.org>
Mon, 25 Dec 2006 17:28:21 +0000
(17:28 +0000)
committer
Greg Sabino Mullane
<greg@users.mediawiki.org>
Mon, 25 Dec 2006 17:28:21 +0000
(17:28 +0000)
includes/FileStore.php
patch
|
blob
|
history
diff --git
a/includes/FileStore.php
b/includes/FileStore.php
index
294bf99
..
1fd35b0
100644
(file)
--- 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() {
* @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__ );
$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() {
* 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__ );
$dbw = wfGetDB( DB_MASTER );
$lockname = $dbw->addQuotes( FileStore::lockName() );
$result = $dbw->query( "SELECT RELEASE_LOCK($lockname)", __METHOD__ );