r45592 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45591‎ | r45592 | r45593 >
Date:03:53, 9 January 2009
Author:tstarling
Status:ok
Tags:
Comment:
* In selectField(), use reset($row) instead of $row[0] for compatibility with SQLite
* Non-broken (no-op) implementation of DatabaseSqlite::deadlockLoop(). Fixes bug 16123: total breakage of Special:Import on SQLite.
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseSqlite.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/Database.php
@@ -922,7 +922,7 @@
923923 $row = $this->fetchRow( $res );
924924 if ( $row !== false ) {
925925 $this->freeResult( $res );
926 - return $row[0];
 926+ return reset( $row );
927927 } else {
928928 return false;
929929 }
Index: trunk/phase3/includes/db/DatabaseSqlite.php
@@ -410,6 +410,14 @@
411411 return "SearchEngineDummy";
412412 }
413413
 414+ /**
 415+ * No-op version of deadlockLoop
 416+ */
 417+ public function deadlockLoop( /*...*/ ) {
 418+ $args = func_get_args();
 419+ $function = array_shift( $args );
 420+ return call_user_func_array( $function, $args );
 421+ }
414422 }
415423
416424 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r45629* Tweaked docs...tstarling02:30, 10 January 2009

Status & tagging log