• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI 2.0 transaction testmode bug

#2
[eluser]WanWizard[/eluser]
That is not the issue.

In the drivers, $this->_trans_failure is used to force a failure of the transaction, and therefore a rollback. This rollback is performed in DB_driver.php:
Code:
// The query() function will set this flag to FALSE in the event that a query failed
if ($this->_trans_status === FALSE)
{
    $this->trans_rollback();

    // If we are NOT running in strict mode, we will reset
    // the _trans_status flag so that subsequent groups of transactions
    // will be permitted.
    if ($this->trans_strict === FALSE)
    {
        $this->_trans_status = TRUE;
    }

    log_message('debug', 'DB Transaction Failure');
    return FALSE;
}

This should be:

Code:
// The query() function will set this flag to FALSE in the event that a query failed
// Also do a rollback if the transaction failure flag was set
if ($this->_trans_status === FALSE  OR $this->_trans_failure === TRUE)


Messages In This Thread
CI 2.0 transaction testmode bug - by El Forum - 07-28-2010, 02:30 PM
CI 2.0 transaction testmode bug - by El Forum - 08-02-2010, 01:51 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.