diff options
author | Andrey Andreev <narf@devilix.net> | 2015-08-05 13:32:03 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2015-08-05 13:32:03 +0200 |
commit | 4e5ff1f7f8c1897526e9362fdcf7b574c1b3cdf9 (patch) | |
tree | d021b476c69ffe0881939f8d50c8cb4c1b0e6d2d | |
parent | 3373598673d2d31ccd9c7e97e90a1ae196e97aae (diff) |
Fix #4026
-rw-r--r-- | system/database/DB_driver.php | 5 | ||||
-rw-r--r-- | user_guide_src/source/changelog.rst | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index e58496de9..659664db9 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -647,7 +647,10 @@ abstract class CI_DB_driver { } // This will trigger a rollback if transactions are being used - $this->_trans_status = FALSE; + if ($this->_trans_depth !== 0) + { + $this->_trans_status = FALSE; + } // Grab the error now, as we might run some additional queries before displaying the error $error = $this->error(); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1b044cc5f..cfa0f69a5 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -77,6 +77,7 @@ Bug fixes for 3.0.1 - Fixed a bug (#4012) - :doc:`Query Builder <database/query_builder>` methods ``where_in()``, ``or_where_in()``, ``where_not_in()``, ``or_where_not_in()`` didn't take into account previously cached WHERE conditions when query cache is in use. - Fixed a bug (#4015) - :doc:`Email Library <libraries/email>` method ``set_header()`` didn't support method chaining, although it was advertised. - Fixed a bug (#4027) - :doc:`Routing <general/routing>` with HTTP verbs only worked if the route request method was declared in all-lowercase letters. +- Fixed a bug (#4026) - :doc:`Database Transactions <database/transactions>` always rollback if any previous ``query()`` call fails. Version 3.0.0 ============= |