public function execute() {
$db = $this->getDB( DB_MASTER );
+ $batchSize = $this->getBatchSize();
if ( !$db->tableExists( 'page_restrictions' ) ) {
$this->error( "page_restrictions table does not exist", true );
}
$end = $db->selectField( 'page', 'MAX(page_id)', false, __METHOD__ );
# Do remaining chunk
- $end += $this->mBatchSize - 1;
+ $end += $batchSize - 1;
$blockStart = $start;
- $blockEnd = $start + $this->mBatchSize - 1;
+ $blockEnd = $start + $batchSize - 1;
$encodedExpiry = 'infinity';
while ( $blockEnd <= $end ) {
$this->output( "...doing page_id from $blockStart to $blockEnd out of $end\n" );
throw new MWException( "Deadlock loop failed wtf :(" );
}
}
- $blockStart += $this->mBatchSize - 1;
- $blockEnd += $this->mBatchSize - 1;
+ $blockStart += $batchSize - 1;
+ $blockEnd += $batchSize - 1;
wfWaitForSlaves();
}
$this->output( "...removing dead rows from page_restrictions\n" );