? $maxRevId
: $dbw->selectField( 'revision', 'MAX(rev_id)', false, __METHOD__ );
$blockStart = $start;
- $revCount = 0;
+ $attempted = 0;
+ $inserted = 0;
$this->output( "Copying IP revisions to ip_changes, from rev_id $start to rev_id $end\n" );
'ipc_hex' => IP::toHex( $row->rev_user_text ),
];
- $revCount++;
+ $attempted++;
}
}
'IGNORE'
);
+ $inserted += $dbw->affectedRows();
+
$lbFactory->waitForReplication();
usleep( $throttle * 1000 );
$blockStart = $blockEnd + 1;
}
- $this->output( "$revCount IP revisions copied.\n" );
+ $this->output( "Attempted to insert $attempted IP revisions, $inserted actually done.\n" );
return true;
}