X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fstorage%2FtestCompression.php;h=c3ed4fce0c104a7e83ca53bedd958c9e2b98fcaa;hb=801a8bdaa38cea5ff4db0440c82e9eb83e083772;hp=deb2ca60d55a8ce5b0409d765894ce0ae303659d;hpb=e39699f90f696dc589878cd6038a3de97b70ca89;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/storage/testCompression.php b/maintenance/storage/testCompression.php index deb2ca60d5..c3ed4fce0c 100644 --- a/maintenance/storage/testCompression.php +++ b/maintenance/storage/testCompression.php @@ -45,23 +45,21 @@ if ( isset( $options['limit'] ) ) { $limit = 1000; $untilHappy = true; } -$type = isset( $options['type'] ) ? $options['type'] : 'ConcatenatedGzipHistoryBlob'; +$type = isset( $options['type'] ) ? $options['type'] : ConcatenatedGzipHistoryBlob::class; $dbr = $this->getDB( DB_REPLICA ); +$revQuery = Revision::getQueryInfo( [ 'page', 'text' ] ); $res = $dbr->select( - [ 'page', 'revision', 'text' ], - array_merge( - Revision::selectFields(), - Revision::selectPageFields(), - Revision::selectTextFields() - ), + $revQuery['tables'], + $revQuery['fields'], [ 'page_namespace' => $title->getNamespace(), 'page_title' => $title->getDBkey(), - 'page_id=rev_page', 'rev_timestamp > ' . $dbr->addQuotes( $dbr->timestamp( $start ) ), - 'rev_text_id=old_id' - ], __FILE__, [ 'LIMIT' => $limit ] + ], + __FILE__, + [ 'LIMIT' => $limit ], + $revQuery['joins'] ); $blob = new $type;