summaryrefslogtreecommitdiff
path: root/maintenance/storage/compressOld.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-01-18 16:46:04 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-01-18 16:46:04 +0100
commit63601400e476c6cf43d985f3e7b9864681695ed4 (patch)
treef7846203a952e38aaf66989d0a4702779f549962 /maintenance/storage/compressOld.php
parent8ff01378c9e0207f9169b81966a51def645b6a51 (diff)
Update to MediaWiki 1.20.2
this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'maintenance/storage/compressOld.php')
-rw-r--r--maintenance/storage/compressOld.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/maintenance/storage/compressOld.php b/maintenance/storage/compressOld.php
index afe01458..4594db71 100644
--- a/maintenance/storage/compressOld.php
+++ b/maintenance/storage/compressOld.php
@@ -17,8 +17,9 @@
* -c <chunk-size> maximum number of revisions in a concat chunk
* -b <begin-date> earliest date to check for uncompressed revisions
* -e <end-date> latest revision date to compress
- * -s <startid> the old_id to start from
- * -n <endid> the old_id to stop at
+ * -s <startid> the id to start from (referring to the text table for
+ * type gzip, and to the page table for type concat)
+ * -n <endid> the page_id to stop at (only when using concat compression type)
* --extdb <cluster> store specified revisions in an external cluster (untested)
*
* This program is free software; you can redistribute it and/or modify
@@ -40,7 +41,7 @@
* @ingroup Maintenance ExternalStorage
*/
-require_once( dirname( __FILE__ ) . '/../Maintenance.php' );
+require_once( __DIR__ . '/../Maintenance.php' );
class CompressOld extends Maintenance {
/**
@@ -56,9 +57,9 @@ class CompressOld extends Maintenance {
$this->addOption( 'chunksize', 'Maximum number of revisions in a concat chunk', false, true, 'c' );
$this->addOption( 'begin-date', 'Earliest date to check for uncompressed revisions', false, true, 'b' );
$this->addOption( 'end-date', 'Latest revision date to compress', false, true, 'e' );
- $this->addOption( 'startid', 'The old_id to start from', false, true, 's' );
+ $this->addOption( 'startid', 'The id to start from (gzip -> text table, concat -> page table)', false, true, 's' );
$this->addOption( 'extdb', 'Store specified revisions in an external cluster (untested)', false, true );
- $this->addOption( 'endid', 'Stop at this old_id', false, true, 'n' );
+ $this->addOption( 'endid', 'The page_id to stop at (only when using concat compression type)', false, true, 'n' );
}
public function execute() {
@@ -293,7 +294,7 @@ class CompressOld extends Maintenance {
$chunk = new ConcatenatedGzipHistoryBlob();
$stubs = array();
- $dbw->begin();
+ $dbw->begin( __METHOD__ );
$usedChunk = false;
$primaryOldid = $revs[$i]->rev_text_id;
@@ -393,7 +394,7 @@ class CompressOld extends Maintenance {
}
# Done, next
$this->output( "/" );
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
$i += $thisChunkSize;
wfWaitForSlaves();
}