From b74f88967bf090af3df0efa45feada30f256978b Mon Sep 17 00:00:00 2001 From: tonythomas01 <01tonythomas@gmail.com> Date: Tue, 31 Dec 2013 12:37:57 +0530 Subject: [PATCH] Remove version check for mysql 4.1 from Maintenance scripts Removed version check for mysql from initEditCount.php and storage/fixBug20757.php. Mediawiki needs MYSQL Ver 5.0.2 or later, so the check is unnecessary. Removed white spaces Bug: 59126 Change-Id: I29e2ca8764fad8bf4d15bba307e80f3aacea1db7 --- maintenance/initEditCount.php | 2 +- maintenance/storage/fixBug20757.php | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/maintenance/initEditCount.php b/maintenance/initEditCount.php index 4b04683554..7c6e7d4fdd 100644 --- a/maintenance/initEditCount.php +++ b/maintenance/initEditCount.php @@ -47,7 +47,7 @@ in the load balancer, usually indicating a replication environment.' ); // Autodetect mode... $backgroundMode = wfGetLB()->getServerCount() > 1 || - ( $dbw instanceof DatabaseMysql && version_compare( $dbver, '4.1' ) < 0 ); + ( $dbw instanceof DatabaseMysql ); if ( $this->hasOption( 'background' ) ) { $backgroundMode = true; diff --git a/maintenance/storage/fixBug20757.php b/maintenance/storage/fixBug20757.php index e832b4e827..dd86619e75 100644 --- a/maintenance/storage/fixBug20757.php +++ b/maintenance/storage/fixBug20757.php @@ -57,14 +57,9 @@ class FixBug20757 extends Maintenance { $totalRevs = $dbr->selectField( 'text', 'MAX(old_id)', false, __METHOD__ ); - if ( $dbr->getType() == 'mysql' - && version_compare( $dbr->getServerVersion(), '4.1.0', '>=' ) - ) { + if ( $dbr->getType() == 'mysql' ) { // In MySQL 4.1+, the binary field old_text has a non-working LOWER() function $lowerLeft = 'LOWER(CONVERT(LEFT(old_text,22) USING latin1))'; - } else { - // No CONVERT() in MySQL 4.0 - $lowerLeft = 'LOWER(LEFT(old_text,22))'; } while ( true ) { -- 2.20.1