Commit b8b42794 authored by webchick's avatar webchick

Issue #1007830 follow-up by bfroehle: Better fix for nested transactions throw...

Issue #1007830 follow-up by bfroehle: Better fix for nested transactions throw exceptions on ddl changes in MySQL.
parent 7fd45b6c
......@@ -169,10 +169,8 @@ public function popTransaction($name) {
// 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');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment