From 8d02cf5e502585bee8806edb725615b52ef20146 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 2 Feb 2007 18:11:05 +0000 Subject: [PATCH] * (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. --- RELEASE-NOTES | 3 +++ maintenance/storage/compressOld.inc | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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]), -- 2.20.1