Hoo man has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311487

Change subject: Fix SQLite $wgObjectCaches definition + b/c handling
......................................................................

Fix SQLite $wgObjectCaches definition + b/c handling

Follow-up to 47e816c69c197fec86c344256d81d7c8f781b880

Change-Id: Id94857a7c8726871cf826a34b5cf10cb465b7125
---
M includes/installer/SqliteInstaller.php
M includes/objectcache/SqlBagOStuff.php
2 files changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/87/311487/1

diff --git a/includes/installer/SqliteInstaller.php 
b/includes/installer/SqliteInstaller.php
index 6024331..9bf87f4 100644
--- a/includes/installer/SqliteInstaller.php
+++ b/includes/installer/SqliteInstaller.php
@@ -319,6 +319,7 @@
                'type' => 'sqlite',
                'dbname' => 'wikicache',
                'tablePrefix' => '',
+               'dbDirectory' => \$wgSQLiteDataDir,
                'flags' => 0
        ]
 ];";
diff --git a/includes/objectcache/SqlBagOStuff.php 
b/includes/objectcache/SqlBagOStuff.php
index d06213f..62bec38 100644
--- a/includes/objectcache/SqlBagOStuff.php
+++ b/includes/objectcache/SqlBagOStuff.php
@@ -179,6 +179,15 @@
                                $info = $this->serverInfos[$serverIndex];
                                $type = isset( $info['type'] ) ? $info['type'] 
: 'mysql';
                                $host = isset( $info['host'] ) ? $info['host'] 
: '[unknown]';
+
+                               // b/c: In the past it was not required to set 
'dbDirectory' in the
+                               // $wgObjectCaches definitions.
+                               if ( $info['type'] === 'sqlite' && !isset( 
$info['dbDirectory'] ) ) {
+                                       // XXX: Log a warning?
+                                       $dir = 
MediaWikiServices::getInstance()->getMainConfig()->get( 'SQLiteDataDir' );
+                                       $info['dbDirectory'] = $dir;
+                               }
+
                                $this->logger->debug( __CLASS__ . ": connecting 
to $host" );
                                // Use a blank trx profiler to ignore 
expections as this is a cache
                                $info['trxProfiler'] = new 
TransactionProfiler();

-- 
To view, visit https://gerrit.wikimedia.org/r/311487
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id94857a7c8726871cf826a34b5cf10cb465b7125
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hoo man <h...@online.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to