summaryrefslogtreecommitdiff
path: root/maintenance/refreshLinks.php
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:31:33 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:31:33 -0400
commit150f94f051128f367bc89f6b7e5f57eb2a69fc62 (patch)
tree181f454813b310ee97385058c6c6f2e3f34d5fd8 /maintenance/refreshLinks.php
parent7e85254903c7c0cb49e381f16b18441ea7b058cc (diff)
parent80f7dc77d430774192b929d780f96260066df2ee (diff)
Merge commit '80f7dc'
# Conflicts: # extensions/ArchInterWiki.sql
Diffstat (limited to 'maintenance/refreshLinks.php')
-rw-r--r--maintenance/refreshLinks.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php
index e1b6ac68..a2484aa3 100644
--- a/maintenance/refreshLinks.php
+++ b/maintenance/refreshLinks.php
@@ -327,13 +327,14 @@ class RefreshLinks extends Maintenance {
foreach ( $linksTables as $table => $field ) {
$this->output( " $table: 0" );
+ $tableStart = $start;
$counter = 0;
do {
$ids = $dbr->selectFieldValues(
$table,
$field,
array(
- self::intervalCond( $dbr, $field, $start, $end ),
+ self::intervalCond( $dbr, $field, $tableStart, $end ),
"$field NOT IN ({$dbr->selectSQLText( 'page', 'page_id' )})",
),
__METHOD__,
@@ -346,10 +347,10 @@ class RefreshLinks extends Maintenance {
wfWaitForSlaves();
$dbw->delete( $table, array( $field => $ids ), __METHOD__ );
$this->output( ", $counter" );
- $start = $ids[$numIds - 1] + 1;
+ $tableStart = $ids[$numIds - 1] + 1;
}
- } while ( $numIds >= $batchSize && ( $end === null || $start <= $end ) );
+ } while ( $numIds >= $batchSize && ( $end === null || $tableStart <= $end ) );
$this->output( " deleted.\n" );