X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcompareParserCache.php;h=8bd060f324ecaa4f16b8a12c1641d4116f6b493e;hb=c2a681ba58c8718242d39450c34a603346126b98;hp=e5f0bb33bd425774f45c57b7a1f9b60e98369e86;hpb=630a39ce6b686872db84c2c2d022bb6c26bf23a8;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/compareParserCache.php b/maintenance/compareParserCache.php index e5f0bb33bd..8bd060f324 100644 --- a/maintenance/compareParserCache.php +++ b/maintenance/compareParserCache.php @@ -35,7 +35,7 @@ class CompareParserCache extends Maintenance { public function execute() { $pages = $this->getOption( 'maxpages' ); - $dbr = $this->getDB( DB_SLAVE ); + $dbr = $this->getDB( DB_REPLICA ); $totalsec = 0.0; $scanned = 0; @@ -43,15 +43,15 @@ class CompareParserCache extends Maintenance { $withdiff = 0; while ( $pages-- > 0 ) { $row = $dbr->selectRow( 'page', '*', - array( + [ 'page_namespace' => $this->getOption( 'namespace' ), 'page_is_redirect' => 0, 'page_random >= ' . wfRandom() - ), + ], __METHOD__, - array( + [ 'ORDER BY' => 'page_random', - ) + ] ); if ( !$row ) {