* (bug 4268) Fixed data-loss bug in compressOld batch text compression
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 2 Feb 2007 18:11:05 +0000 (18:11 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 2 Feb 2007 18:11:05 +0000 (18:11 +0000)
  affecting pages which had null edits (move, protect, etc) as second
  edit in a batch group. Isolated and patched by Travis Derouin.

RELEASE-NOTES
maintenance/storage/compressOld.inc

index 9eb36e2..878f91c 100644 (file)
@@ -163,6 +163,9 @@ lighter making things easier to read.
 * (bug 6987) Allow perrow, widths, and heights attributes for <gallery>
 * (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 ==
index bd1bace..2da015b 100644 (file)
@@ -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]),