Welcome Guest, Not a member yet? Register   Sign In
Setting _trans_status
#1

Every failed query sets _trans_status to false. Therefore, any subsequent transaction (using trans_start() or trans_begin)) will also fail because _trans_status is not reset at the start. Shouldn't _trans_status be set to true in trans_begin() where 'START TRANSACTION' is done. Queries that fail outside a transaction should not effect a transaction.

The strange thing is that there is a _trans_failure flag set there and it is never accessed anywhere. 
$this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE;

Shouldn't that be 
$this->_trans_status = ($test_mode === TRUE) ? TRUE : FALSE;

If that change is made all transactions will start with a clean slate.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB