To disable database transactions at run-time you can call
Maybe I am missing something but I don't see any way to reverse this call to allow transaction processing.
The abstract class DB_driver defines trans_off() with this code.
The property $trans_enabled is used throughout the class to allow (or not) class methods to proceed. For instance
The "issue", if there is one, is that the documentation at Enabling Transactions implies that calling $this->db->trans_start(); will re-start transaction processing after a call to $this->db->trans_off(); But that is not the case as the code snippet above clearly illustrates.
PHP Code:
$this->db->trans_off();
Maybe I am missing something but I don't see any way to reverse this call to allow transaction processing.
The abstract class DB_driver defines trans_off() with this code.
PHP Code:
public function trans_off()
{
$this->trans_enabled = FALSE;
}
The property $trans_enabled is used throughout the class to allow (or not) class methods to proceed. For instance
PHP Code:
public function trans_start($test_mode = FALSE)
{
if ( ! $this->trans_enabled)
{
return FALSE;
}
return $this->trans_begin($test_mode);
}
The "issue", if there is one, is that the documentation at Enabling Transactions implies that calling $this->db->trans_start(); will re-start transaction processing after a call to $this->db->trans_off(); But that is not the case as the code snippet above clearly illustrates.