r104108 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104107‎ | r104108 | r104109 >
Date:23:45, 23 November 2011
Author:aaron
Status:ok
Tags:
Comment:
Added wasLockTimeout() DB function. All our DBMS can implement this accept for PG.
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
@@ -707,6 +707,15 @@
708708 }
709709
710710 /**
 711+ * Determines if the last failure was due to a lock timeout
 712+ *
 713+ * @return bool
 714+ */
 715+ function wasLockTimeout() {
 716+ return $this->lastErrno() == 1205;
 717+ }
 718+
 719+ /**
711720 * Determines if the last query error was something that should be dealt
712721 * with by pinging the connection and reissuing the query
713722 *
Index: trunk/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

Follow-up revisions

RevisionCommit summaryAuthorDate
r104109MFT r104108aaron23:46, 23 November 2011

Status & tagging log