X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FmigrateComments.php;h=c0008719500c4651e2276b6a1a5101899a8ac13a;hb=255d76f2a13a8378ded9f0cf1c2bb172f7f07a5b;hp=01ee9f84fda7f49bcbfef5b877d70a9fdc4553aa;hpb=9b83841b9b44457b498770b847ac72f53031c34d;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/migrateComments.php b/maintenance/migrateComments.php index 01ee9f84fd..c000871950 100644 --- a/maintenance/migrateComments.php +++ b/maintenance/migrateComments.php @@ -144,6 +144,7 @@ class MigrateComments extends LoggedUpdateMaintenance { $primaryKey = (array)$primaryKey; $pkFilter = array_flip( $primaryKey ); $this->output( "Beginning migration of $table.$oldField to $table.$newField\n" ); + wfWaitForSlaves(); $dbw = $this->getDB( DB_MASTER ); $next = '1=1'; @@ -206,6 +207,7 @@ class MigrateComments extends LoggedUpdateMaintenance { } $prompt = join( ' ', array_reverse( $prompt ) ); $this->output( "... $prompt\n" ); + wfWaitForSlaves(); } $this->output( @@ -231,6 +233,7 @@ class MigrateComments extends LoggedUpdateMaintenance { protected function migrateToTemp( $table, $primaryKey, $oldField, $newPrimaryKey, $newField ) { $newTable = $table . '_comment_temp'; $this->output( "Beginning migration of $table.$oldField to $newTable.$newField\n" ); + wfWaitForSlaves(); $dbw = $this->getDB( DB_MASTER ); $next = []; @@ -279,6 +282,7 @@ class MigrateComments extends LoggedUpdateMaintenance { // Calculate the "next" condition $next = [ $primaryKey . ' > ' . $dbw->addQuotes( $row->$primaryKey ) ]; $this->output( "... {$row->$primaryKey}\n" ); + wfWaitForSlaves(); } $this->output(