summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2013-10-21 12:58:15 +0200
committerAndrey Andreev <narf@devilix.net>2013-10-21 12:58:15 +0200
commit6c85442746c46009cdf3fe517465e174a91cc4c5 (patch)
treea92a67bbc2920fff3e4cc7cf8955bd34681b1b5c
parente08411d72226ba5b2f97b519051f78d978747e18 (diff)
Fix #2691
-rw-r--r--system/database/DB_driver.php9
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 9 insertions, 1 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 618f3660c..9aa6c5de5 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -624,7 +624,14 @@ abstract class CI_DB_driver {
// if transactions are enabled. If we don't call this here
// the error message will trigger an exit, causing the
// transactions to remain in limbo.
- $this->_trans_depth > 0 && $this->trans_complete();
+ if ($this->_trans_depth !== 0)
+ {
+ do
+ {
+ $this->trans_complete();
+ }
+ while ($this->_trans_depth !== 0);
+ }
// Display errors
return $this->display_error(array('Error Number: '.$error['code'], $error['message'], $sql));
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 8c992a575..9f6feb744 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -619,6 +619,7 @@ Bug fixes for 3.0
- Fixed a bug in the 'postgre' :doc:`database <database/index>` driver where the connection ID wasn't passed to ``pg_escape_string()``.
- Fixed a bug (#33) - Script execution was terminated when an invalid cookie key was encountered.
- Fixed a bug (#2681) - ``CI_Security::entity_decode()`` used the `PREG_REPLACE_EVAL` flag, which is deprecated since PHP 5.5.
+- Fixed a bug (#2691) - nested transactions could end in a deadlock when an error is encountered with *db_debug* set to TRUE.
Version 2.1.4
=============