Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated trans_start() and trans_complete() so _trans_depth increments #691

Merged
merged 2 commits into from
Nov 23, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions system/database/DB_driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ function trans_start($test_mode = FALSE)
}

$this->trans_begin($test_mode);
$this->_trans_depth += 1;
}

// --------------------------------------------------------------------
Expand All @@ -545,6 +546,10 @@ function trans_complete()
$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)
Expand Down
1 change: 1 addition & 0 deletions user_guide_src/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Bug fixes for 3.0
- Unlink raised an error if cache file did not exist when you try to delete it.
- Fixed a bug (#181) where a mis-spelling was in the form validation
language file.
- Fixed a bug (#159, #163) that mishandled Active Record nested transactions because _trans_depth was not getting incremented.


Version 2.1.0
Expand Down