r104109 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104108‎ | r104109 | r104110 >
Date:23:46, 23 November 2011
Author:aaron
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/FileBackend/phase3/includes/db/Database.php (modified) (history)
  • /branches/FileBackend/phase3/includes/db/DatabaseMysql.php (modified) (history)

Diff [purge]

Index: branches/FileBackend/phase3/includes/db/DatabaseMysql.php
@@ -712,6 +712,15 @@
713713 }
714714
715715 /**
 716+ * Determines if the last failure was due to a lock timeout
 717+ *
 718+ * @return bool
 719+ */
 720+ function wasLockTimeout() {
 721+ return $this->lastErrno() == 1205;
 722+ }
 723+
 724+ /**
716725 * Determines if the last query error was something that should be dealt
717726 * with by pinging the connection and reissuing the query
718727 *
Index: branches/FileBackend/phase3/includes/db/Database.php
@@ -2650,6 +2650,16 @@
26512651 }
26522652
26532653 /**
 2654+ * Determines if the last failure was due to a lock timeout
 2655+ * STUB
 2656+ *
 2657+ * @return bool
 2658+ */
 2659+ function wasLockTimeout() {
 2660+ return false;
 2661+ }
 2662+
 2663+ /**
26542664 * Determines if the last query error was something that should be dealt
26552665 * with by pinging the connection and reissuing the query.
26562666 * STUB

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r104108Added wasLockTimeout() DB function. All our DBMS can implement this accept fo...aaron23:45, 23 November 2011

Status & tagging log