diff --git a/common/framework/db.php b/common/framework/db.php index 4002c4fc5..6666756fd 100644 --- a/common/framework/db.php +++ b/common/framework/db.php @@ -572,6 +572,10 @@ class DB Debug::addQuery($this->getQueryLog('START TRANSACTION', 0)); } } + else + { + $this->_handle->exec(sprintf('SAVEPOINT `%s%s%d`', $this->_prefix, 'savepoint', $this->_transaction_level)); + } $this->_transaction_level++; return $this->_transaction_level; } @@ -600,6 +604,10 @@ class DB Debug::addQuery($this->getQueryLog('ROLLBACK', 0)); } } + else + { + $this->_handle->exec(sprintf('ROLLBACK TO SAVEPOINT `%s%s%d`', $this->_prefix, 'savepoint', $this->_transaction_level - 1)); + } $this->_transaction_level--; return $this->_transaction_level; } @@ -628,6 +636,13 @@ class DB Debug::addQuery($this->getQueryLog('COMMIT', 0)); } } + else + { + if (Debug::isEnabledForCurrentUser()) + { + Debug::addQuery($this->getQueryLog('NESTED COMMIT IGNORED BY RHYMIX', 0)); + } + } $this->_transaction_level--; return $this->_transaction_level; }