From: Brion Vibber Date: Fri, 2 Feb 2007 18:11:05 +0000 (+0000) Subject: * (bug 4268) Fixed data-loss bug in compressOld batch text compression X-Git-Tag: 1.31.0-rc.0~54152 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=8d02cf5e502585bee8806edb725615b52ef20146;p=lhc%2Fweb%2Fwiklou.git * (bug 4268) Fixed data-loss bug in compressOld batch text compression affecting pages which had null edits (move, protect, etc) as second edit in a batch group. Isolated and patched by Travis Derouin. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9eb36e226a..878f91c238 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -163,6 +163,9 @@ lighter making things easier to read. * (bug 6987) Allow perrow, widths, and heights attributes for * (bug 8858) Safer handling when $wgImageLimits is changed. Added a note in DefaultSettings to make it clear. +* (bug 4268) Fixed data-loss bug in compressOld batch text compression + affecting pages which had null edits (move, protect, etc) as second + edit in a batch group. Isolated and patched by Travis Derouin. == Languages updated == diff --git a/maintenance/storage/compressOld.inc b/maintenance/storage/compressOld.inc index bd1bace2ea..2da015b00e 100644 --- a/maintenance/storage/compressOld.inc +++ b/maintenance/storage/compressOld.inc @@ -276,8 +276,8 @@ function compressWithConcat( $startId, $maxChunkSize, $maxChunkFactor, $factorTh # Store the stub objects for ( $j = 1; $j < $thisChunkSize; $j++ ) { - # Skip if not compressing - if ( $stubs[$j] !== false ) { + # Skip if not compressing and don't overwrite the first revision + if ( $stubs[$j] !== false && $revs[$i + $j]->rev_text_id != $primaryOldid ) { $dbw->update( 'text', array( /* SET */ 'old_text' => serialize($stubs[$j]),