[eluser]Unknown[/eluser]
In DB_driver.php:
Code:
function trans_start($test_mode = FALSE)
{
if ( ! $this->trans_enabled)
{
return FALSE;
}
// When transactions are nested we only begin/commit/rollback the outermost ones
if ($this->_trans_depth > 0)
{
$this->_trans_depth += 1;
return;
}
$this->trans_begin($test_mode);
}
Since $this->_trans_depth is initialized to 0, it will never pass the > 0 test and be incremented. This means trans_begin() will always be called. It should be changed to:
Code:
$this->_trans_depth += 1;
if ($this->_trans_depth > 1)
{
return;
}
Each of the *_driver.php files for the different databases need an edit to the trans_begin() function to change so the first transaction will be allowed to start.
From:
Code:
if ($this->_trans_depth > 0)
{
return TRUE;
}
To:
Code:
if ($this->_trans_depth > 1)
{
return TRUE;
}
I've attached a unified diff with these changes.
--EDIT--
There's a change in trans_complete() too, which I've put into the diff.