r52951 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52950‎ | r52951 | r52952 >
Date:00:14, 9 July 2009
Author:demon
Status:ok
Tags:
Comment:
(bug 19591) Move setBigSelects() to DatabaseMysql
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseMysql.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseMysql.php
@@ -331,6 +331,21 @@
332332 public function unlockTables( $method ) {
333333 $this->query( "UNLOCK TABLES", $method );
334334 }
 335+
 336+ public function setBigSelects( $value = true ) {
 337+ if ( $value === 'default' ) {
 338+ if ( $this->mDefaultBigSelects === null ) {
 339+ # Function hasn't been called before so it must already be set to the default
 340+ return;
 341+ } else {
 342+ $value = $this->mDefaultBigSelects;
 343+ }
 344+ } elseif ( $this->mDefaultBigSelects === null ) {
 345+ $this->mDefaultBigSelects = (bool)$this->selectField( false, '@@sql_big_selects' );
 346+ }
 347+ $encValue = $value ? '1' : '0';
 348+ $this->query( "SET sql_big_selects=$encValue", __METHOD__ );
 349+ }
335350 }
336351
337352 /**
Index: trunk/phase3/includes/db/Database.php
@@ -2235,18 +2235,7 @@
22362236 * @param mixed $value true for allow, false for deny, or "default" to restore the initial value
22372237 */
22382238 public function setBigSelects( $value = true ) {
2239 - if ( $value === 'default' ) {
2240 - if ( $this->mDefaultBigSelects === null ) {
2241 - # Function hasn't been called before so it must already be set to the default
2242 - return;
2243 - } else {
2244 - $value = $this->mDefaultBigSelects;
2245 - }
2246 - } elseif ( $this->mDefaultBigSelects === null ) {
2247 - $this->mDefaultBigSelects = (bool)$this->selectField( false, '@@sql_big_selects' );
2248 - }
2249 - $encValue = $value ? '1' : '0';
2250 - $this->query( "SET sql_big_selects=$encValue", __METHOD__ );
 2239+ // no-op
22512240 }
22522241 }
22532242

Follow-up revisions

RevisionCommit summaryAuthorDate
r52956Remove redundant no-op implementations...simetrical01:04, 9 July 2009

Status & tagging log