summaryrefslogtreecommitdiff
path: root/includes/database/mysql
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-07-04 21:48:58 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2011-07-04 21:48:58 -0700
commit7fd0fe2495364e4bc6cb668f954ff350619c16cf (patch)
treecc97c54aa8309218d049bfb965e5b4c753790333 /includes/database/mysql
parentb0af4490479b4090c51a9201017b31a4929fe9c5 (diff)
downloadbrdo-7fd0fe2495364e4bc6cb668f954ff350619c16cf.tar.gz
brdo-7fd0fe2495364e4bc6cb668f954ff350619c16cf.tar.bz2
Issue #1007830 follow-up by bfroehle: Better fix for nested transactions throw exceptions on ddl changes in MySQL.
Diffstat (limited to 'includes/database/mysql')
-rw-r--r--includes/database/mysql/database.inc6
1 files changed, 2 insertions, 4 deletions
diff --git a/includes/database/mysql/database.inc b/includes/database/mysql/database.inc
index bc31feaaf..157cbfa56 100644
--- a/includes/database/mysql/database.inc
+++ b/includes/database/mysql/database.inc
@@ -169,10 +169,8 @@ class DatabaseConnection_mysql extends DatabaseConnection {
// savepoints which no longer exist.
//
// To avoid exceptions when no actual error has occurred, we silently
- // succeed for PDOExceptions with SQLSTATE 42000 ("Syntax error or
- // access rule violation") and MySQL error code 1305 ("SAVEPOINT does
- // not exist").
- if ($e->getCode() == '42000' && $e->errorInfo[1] == '1305') {
+ // succeed for MySQL error code 1305 ("SAVEPOINT does not exist").
+ if ($e->errorInfo[1] == '1305') {
// If one SAVEPOINT was released automatically, then all were.
// Therefore, we keep just the topmost transaction.
$this->transactionLayers = array('drupal_transaction');