Welcome Guest, Not a member yet? Register   Sign In
Bad problem with transactions freezing entire app
#2

[eluser]kirilisa[/eluser]
Maybe in DB_driver.php query() method as soon as it hits a bad query (i.e. where it sets $this->_trans_status = FALSE) it should do a rollback?

Code:
/** part of DB-driver.php -> query() at line 297 **/
// Run the Query
if (FALSE === ($this->result_id = $this->simple_query($sql)))
{
  // This will trigger a rollback if transactions are being used
  $this->_trans_status = FALSE;
  $this->trans_rollback(); //@@@ added by kirilisa
  
  if ($this->db_debug)
  {
    log_message('error', 'Query error: '.$this->_error_message());
    return $this->display_error(array('Error Number: '.$this->_error_number(),
                      $this->_error_message(),
                      $sql));
  }
  
  return FALSE;
}

I just stuck that in and it seemed to fix it, but the whole DB thing is so complicated, I don't know what repercussions it may have!

Arg. I don't know. Please advise.....


Messages In This Thread
Bad problem with transactions freezing entire app - by El Forum - 04-10-2008, 11:33 PM
Bad problem with transactions freezing entire app - by El Forum - 04-10-2008, 11:46 PM
Bad problem with transactions freezing entire app - by El Forum - 05-24-2012, 04:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB