diff options
author | Jacob Terry <jsterry@gmail.com> | 2011-11-22 17:21:36 +0100 |
---|---|---|
committer | Jacob Terry <jsterry@gmail.com> | 2011-11-22 17:21:36 +0100 |
commit | 07fcedf8b990633179a62ce105d84a045dacada9 (patch) | |
tree | 9dd8abcecbae1bb88102e1105194394c9615a351 /system/database/DB_driver.php | |
parent | e9307ce66afa48398f4685d4bd5bb2c93a8d8238 (diff) |
Updated trans_start() and trans_complete() so that _trans_depth increments correctly
Fix for issue #159 and #163.
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r-- | system/database/DB_driver.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index dd1b5677a..cc40ba48a 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -522,6 +522,7 @@ class CI_DB_driver { } $this->trans_begin($test_mode); + $this->_trans_depth += 1; } // -------------------------------------------------------------------- @@ -545,6 +546,10 @@ class CI_DB_driver { $this->_trans_depth -= 1; return TRUE; } + else + { + $this->_trans_depth = 0; + } // The query() function will set this flag to FALSE in the event that a query failed if ($this->_trans_status === FALSE) |