Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368517 )

Change subject: WIP teach PEAR about deadlock errors
......................................................................

WIP teach PEAR about deadlock errors

Sorta-hopeless effort to pass more db error info up the chain

Bug: T118487
Change-Id: Iddf380d6db9e9e42e6d5703e26da71f7fe3e498a
---
M packages/DB.php
M packages/DB/mysqli.php
2 files changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/17/368517/1

diff --git a/packages/DB.php b/packages/DB.php
index 2a06764..a49c868 100644
--- a/packages/DB.php
+++ b/packages/DB.php
@@ -183,6 +183,9 @@
  */
 define('DB_ERROR_CONSTRAINT_NOT_NULL',-29);
 
+define('DB_ERROR_LOCK_TIMEOUT', -30);
+
+define('DB_ERROR_DEADLOCK', -31);
 /**
  * Invalid view or no permissions
  */
diff --git a/packages/DB/mysqli.php b/packages/DB/mysqli.php
index 371cfb0..a12ee17 100644
--- a/packages/DB/mysqli.php
+++ b/packages/DB/mysqli.php
@@ -112,6 +112,8 @@
         1136 => DB_ERROR_VALUE_COUNT_ON_ROW,
         1142 => DB_ERROR_ACCESS_VIOLATION,
         1146 => DB_ERROR_NOSUCHTABLE,
+        1205 => DB_ERROR_LOCK_TIMEOUT,
+        1213 => DB_ERROR_DEADLOCK,
         1216 => DB_ERROR_CONSTRAINT,
         1217 => DB_ERROR_CONSTRAINT,
         1356 => DB_ERROR_INVALID_VIEW,

-- 
To view, visit https://gerrit.wikimedia.org/r/368517
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iddf380d6db9e9e42e6d5703e26da71f7fe3e498a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <ej...@ejegg.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to