diff options
Diffstat (limited to 'system/drivers/DB_mssql.php')
-rw-r--r-- | system/drivers/DB_mssql.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/system/drivers/DB_mssql.php b/system/drivers/DB_mssql.php index 3fbfa6a3f..32c0537c3 100644 --- a/system/drivers/DB_mssql.php +++ b/system/drivers/DB_mssql.php @@ -106,7 +106,7 @@ class CI_DB_mssql extends CI_DB { * @access public * @return bool */ - function trans_begin() + function trans_begin($test_mode = FALSE) { if ( ! $this->trans_enabled) { @@ -119,6 +119,11 @@ class CI_DB_mssql extends CI_DB { 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) ? TRUE : FALSE; + $this->simple_query('BEGIN TRAN'); return TRUE; } |