summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mssql/mssql_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-10-19 13:39:44 +0200
committerAndrey Andreev <narf@devilix.net>2015-10-19 13:39:44 +0200
commita7d4abaedc27497d570ae06ddc9cdde05930ec15 (patch)
tree4c195859b4b23ef60174266a840a8a963ac1c53e /system/database/drivers/mssql/mssql_driver.php
parent95f815745855a5ac365595eb44abbda11766cfe5 (diff)
Fix #4171 and a number of other transaction bugs
Diffstat (limited to 'system/database/drivers/mssql/mssql_driver.php')
-rw-r--r--system/database/drivers/mssql/mssql_driver.php30
1 files changed, 3 insertions, 27 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php
index 05e5418c3..883973ae1 100644
--- a/system/database/drivers/mssql/mssql_driver.php
+++ b/system/database/drivers/mssql/mssql_driver.php
@@ -182,22 +182,10 @@ class CI_DB_mssql_driver extends CI_DB {
/**
* Begin Transaction
*
- * @param bool $test_mode
* @return bool
*/
- public function trans_begin($test_mode = FALSE)
+ protected function _trans_begin()
{
- // When transactions are nested we only begin/commit/rollback the outermost ones
- if ( ! $this->trans_enabled OR $this->_trans_depth > 0)
- {
- return TRUE;
- }
-
- // Reset the transaction failure flag.
- // If the $test_mode flag is set to TRUE transactions will be rolled back
- // even if the queries produce a successful result.
- $this->_trans_failure = ($test_mode === TRUE);
-
return $this->simple_query('BEGIN TRAN');
}
@@ -208,14 +196,8 @@ class CI_DB_mssql_driver extends CI_DB {
*
* @return bool
*/
- public function trans_commit()
+ protected function _trans_commit()
{
- // When transactions are nested we only begin/commit/rollback the outermost ones
- if ( ! $this->trans_enabled OR $this->_trans_depth > 0)
- {
- return TRUE;
- }
-
return $this->simple_query('COMMIT TRAN');
}
@@ -226,14 +208,8 @@ class CI_DB_mssql_driver extends CI_DB {
*
* @return bool
*/
- public function trans_rollback()
+ protected function _trans_rollback()
{
- // When transactions are nested we only begin/commit/rollback the outermost ones
- if ( ! $this->trans_enabled OR $this->_trans_depth > 0)
- {
- return TRUE;
- }
-
return $this->simple_query('ROLLBACK TRAN');
}