From c1bf1f369eed8ab7532f061172f2a605fc97dd42 Mon Sep 17 00:00:00 2001 From: Kaldari Date: Mon, 29 Aug 2016 16:29:24 -0700 Subject: [PATCH] Fixing dry-run logic in updateCollation.php Currently if you run updateCollation.php in dry-run mode, it ignores the other parameters and doesn't give you a row estimate. Now it will behave the same as an actual run (just without making any changes to the database). Change-Id: I25a9751d8ab7554e7975e5f08122dd1ddaaf40a7 --- maintenance/updateCollation.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/maintenance/updateCollation.php b/maintenance/updateCollation.php index 922cc87213..930f533f95 100644 --- a/maintenance/updateCollation.php +++ b/maintenance/updateCollation.php @@ -101,7 +101,7 @@ TEXT 'STRAIGHT_JOIN' // per T58041 ]; - if ( $force || $dryRun ) { + if ( $force ) { $collationConds = []; } else { if ( $this->hasOption( 'previous-collation' ) ) { @@ -132,7 +132,11 @@ TEXT return; } - $this->output( "Fixing collation for $count rows.\n" ); + if ( $dryRun ) { + $this->output( "$count rows would be updated.\n" ); + } else { + $this->output( "Fixing collation for $count rows.\n" ); + } wfWaitForSlaves(); } $count = 0; -- 2.20.1