From 2c2895ad26c5dc31f0b00bf66823b587dad4a0b8 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 28 Mar 2005 11:19:59 +0000 Subject: [PATCH] Fix a couple schema-related changes. There's still major breakage in this file (use of 'old' table etc) --- maintenance/compressOld.inc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/maintenance/compressOld.inc b/maintenance/compressOld.inc index bb4aa6efd9..31146478e3 100644 --- a/maintenance/compressOld.inc +++ b/maintenance/compressOld.inc @@ -5,7 +5,7 @@ */ /** */ -require_once( '../includes/Revision.php' ); +require_once( 'includes/Revision.php' ); /** @todo document */ function compressOldPages( $start = 0 ) { @@ -82,12 +82,12 @@ function compressWithConcat( $startId, $maxChunkSize, $maxChunkFactor, $factorTh } if ( $loadStyle == LS_CHUNKED ) { $tables = array( 'revision', 'text' ); - $fields = array( 'rev_id', 'old_flags', 'old_text' ); - $conds[] = 'rev_id=old_id'; + $fields = array( 'rev_id', 'rev_text_id', 'old_flags', 'old_text' ); + $conds[] = 'rev_text_id=old_id'; $revLoadOptions = 'FOR UPDATE'; } else { $tables = array( 'revision' ); - $fields = array( 'rev_id' ); + $fields = array( 'rev_id', 'rev_text_id' ); $revLoadOptions = array(); } @@ -97,7 +97,7 @@ function compressWithConcat( $startId, $maxChunkSize, $maxChunkFactor, $factorTh print $titleObj->getPrefixedDBkey() . " "; # Load revisions - $revRes = $dbw->select( 'old', $fields, + $revRes = $dbw->select( $tables, $fields, array( 'rev_page' => $pageRow->page_id ) + $conds, $fname, $revLoadOptions @@ -126,11 +126,11 @@ function compressWithConcat( $startId, $maxChunkSize, $maxChunkFactor, $factorTh $stubs = array(); $dbw->begin(); $usedChunk = false; - $primaryOldid = $revs[$i]->rev_id; + $primaryOldid = $revs[$i]->rev_text_id; # Get the text of each revision and add it to the object for ( $j = 0; $j < $thisChunkSize && $chunk->isHappy( $maxChunkFactor, $factorThreshold ); $j++ ) { - $oldid = $revs[$i + $j]->rev_id; + $oldid = $revs[$i + $j]->rev_text_id; # Get text if ( $loadStyle == LS_INDIVIDUAL ) { -- 2.20.1