$db = $this->getDB( DB_MASTER );
if ( !$db->tableExists( 'revision' ) ) {
$this->error( "revision table does not exist", true );
- } else if ( !$db->fieldExists( 'revision', 'rev_sha1', __METHOD__ ) ) {
- $this->output( "rev_sha1 column does not exist\n\n", true );
+ } else if ( !$db->fieldExists( 'revision', 'rev_len', __METHOD__ ) ) {
+ $this->output( "rev_len column does not exist\n\n", true );
return false;
}
$blockEnd = intval( $start ) + $this->mBatchSize - 1;
$count = 0;
$missing = 0;
+ $fields = Revision::selectFields();
while ( $blockStart <= $end ) {
$this->output( "...doing rev_id from $blockStart to $blockEnd\n" );
$res = $db->select( 'revision',
- Revision::selectFields(),
+ $fields,
array( "rev_id >= $blockStart",
"rev_id <= $blockEnd",
"rev_len IS NULL" ),