From 9924b700593618b67d757160308b78d1644ba2cd Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Thu, 9 Jul 2009 00:14:43 +0000 Subject: [PATCH] (bug 19591) Move setBigSelects() to DatabaseMysql --- includes/db/Database.php | 13 +------------ includes/db/DatabaseMysql.php | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/includes/db/Database.php b/includes/db/Database.php index d6789c17cf..25a340c2f7 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -2235,18 +2235,7 @@ abstract class DatabaseBase { * @param mixed $value true for allow, false for deny, or "default" to restore the initial value */ public function setBigSelects( $value = true ) { - if ( $value === 'default' ) { - if ( $this->mDefaultBigSelects === null ) { - # Function hasn't been called before so it must already be set to the default - return; - } else { - $value = $this->mDefaultBigSelects; - } - } elseif ( $this->mDefaultBigSelects === null ) { - $this->mDefaultBigSelects = (bool)$this->selectField( false, '@@sql_big_selects' ); - } - $encValue = $value ? '1' : '0'; - $this->query( "SET sql_big_selects=$encValue", __METHOD__ ); + // no-op } } diff --git a/includes/db/DatabaseMysql.php b/includes/db/DatabaseMysql.php index ecd3485c37..83a7bc5401 100644 --- a/includes/db/DatabaseMysql.php +++ b/includes/db/DatabaseMysql.php @@ -331,6 +331,21 @@ class DatabaseMysql extends DatabaseBase { public function unlockTables( $method ) { $this->query( "UNLOCK TABLES", $method ); } + + public function setBigSelects( $value = true ) { + if ( $value === 'default' ) { + if ( $this->mDefaultBigSelects === null ) { + # Function hasn't been called before so it must already be set to the default + return; + } else { + $value = $this->mDefaultBigSelects; + } + } elseif ( $this->mDefaultBigSelects === null ) { + $this->mDefaultBigSelects = (bool)$this->selectField( false, '@@sql_big_selects' ); + } + $encValue = $value ? '1' : '0'; + $this->query( "SET sql_big_selects=$encValue", __METHOD__ ); + } } /** -- 2.20.1