CodeIgniter icon indicating copy to clipboard operation
CodeIgniter copied to clipboard

#77 Transaction Test Mode is not working (all drivers)

Open bitbucket-import opened this issue 15 years ago • 3 comments

Quote from [[https://bitbucket.org/ellislab/codeigniter/issue/77/transaction-test-mode-is-not-working-all|"https://bitbucket.org/ellislab/codeigniter/issue/77/transaction-test-mode-is-not-working-all"]]

The documentation specifies a capability of rolling back any transaction regardless of the success of the queries for testing purposes (see user guide under Database Library > Transactions > Test Mode).

This feature however is broken. See below for the resolution.

Affected files (system/database/drivers/_/__driver.php):

* http://bitbucket.org/ellislab/codeigniter/src/tip/system/database/drivers/mysql/mysql_driver.php#cl-216
* http://bitbucket.org/ellislab/codeigniter/src/tip/system/database/drivers/mysqli/mysqli_driver.php#cl-217
* http://bitbucket.org/ellislab/codeigniter/src/tip/system/database/drivers/oci8/oci8_driver.php#cl-326
* http://bitbucket.org/ellislab/codeigniter/src/tip/system/database/drivers/odbc/odbc_driver.php#cl-196
* http://bitbucket.org/ellislab/codeigniter/src/tip/system/database/drivers/postgre/postgre_driver.php#cl-219
* http://bitbucket.org/ellislab/codeigniter/src/tip/system/database/drivers/sqlite/sqlite_driver.php#cl-213 

The following line uses _trans_failure which is not defined elsewhere:

$this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE;

Replace the above with:

$this->_trans_status = ($test_mode === TRUE) ? FALSE : $this->_trans_status;

bitbucket-import avatar Aug 19 '11 14:08 bitbucket-import

This should be closed.

narfbg avatar Jan 05 '12 20:01 narfbg

There is no point having this opened.

Razican avatar Feb 14 '12 09:02 Razican

Re-opened with new ticket to get this merged with current develop branch. https://github.com/EllisLab/CodeIgniter/issues/1835

frypan-handler avatar Sep 29 '12 04:09 frypan-handler