Add commit statements after each block
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 19 Jan 2009 20:46:31 +0000 (20:46 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 19 Jan 2009 20:46:31 +0000 (20:46 +0000)
maintenance/rebuildFileCache.php

index 1864924..7c42d8f 100644 (file)
@@ -35,6 +35,7 @@ $end += $BATCH_SIZE - 1;
 $blockStart = $start;
 $blockEnd = $start + $BATCH_SIZE - 1;
 
+$dbw = wfGetDB( DB_MASTER );
 // Go through each page and save the output
 while( $blockEnd <= $end ) {
        // Get the pages
@@ -78,6 +79,7 @@ while( $blockEnd <= $end ) {
                } else {
                        echo "Page {$row->page_id} not cacheable\n";
                }
+               $dbw->commit(); // commit any changes
        }
        $blockStart += $BATCH_SIZE;
        $blockEnd += $BATCH_SIZE;