Welcome Guest, Not a member yet? Register   Sign In
Code Igniter database transactions
#9

[eluser]gtech[/eluser]
The db_driver code does look as though it chucks the error out before rollback happens the display_error function has an exit; at the end suggesting it terminates the current script. however I turned db_debug on with the below test and it works using CI 1.61

Code:
//mysql [edit]my db defaults to innodb[/edit]
create table test(t varchar(20) unique);

//controller
$this->db->trans_start();
$this->db->insert('test',array('t' => 2));
$this->db->insert('test',array('t' => 2));
$this->db->trans_complete();
echo"?";
return

it will run all day long after a refresh I even change the insert values on the fly it works, and transactions are getting rolled back!, however I am sure I used to have problems with db_debug being on... honest guv.

questions
what version of CI are you using so I can test on the same platform?
does it lock with db_debug turned off?
if putting logging info in trans_complete() does it get to that function?

let me know how you get on as this effects my work as well, I would love to be able to replicate your error. hummph I wonder if we are experiencing a race condition.


Messages In This Thread
Code Igniter database transactions - by El Forum - 04-19-2008, 03:58 PM
Code Igniter database transactions - by El Forum - 04-19-2008, 07:48 PM
Code Igniter database transactions - by El Forum - 04-19-2008, 11:02 PM
Code Igniter database transactions - by El Forum - 04-20-2008, 03:15 PM
Code Igniter database transactions - by El Forum - 04-20-2008, 03:46 PM
Code Igniter database transactions - by El Forum - 04-20-2008, 04:07 PM
Code Igniter database transactions - by El Forum - 04-20-2008, 04:42 PM
Code Igniter database transactions - by El Forum - 04-20-2008, 06:07 PM
Code Igniter database transactions - by El Forum - 04-20-2008, 06:17 PM
Code Igniter database transactions - by El Forum - 04-20-2008, 07:20 PM
Code Igniter database transactions - by El Forum - 04-20-2008, 07:36 PM
Code Igniter database transactions - by El Forum - 04-20-2008, 08:27 PM
Code Igniter database transactions - by El Forum - 04-20-2008, 08:45 PM
Code Igniter database transactions - by El Forum - 04-20-2008, 09:00 PM
Code Igniter database transactions - by El Forum - 04-20-2008, 10:07 PM
Code Igniter database transactions - by El Forum - 04-20-2008, 10:12 PM
Code Igniter database transactions - by El Forum - 04-20-2008, 10:30 PM
Code Igniter database transactions - by El Forum - 04-21-2008, 12:36 PM
Code Igniter database transactions - by El Forum - 04-21-2008, 03:56 PM
Code Igniter database transactions - by El Forum - 04-21-2008, 03:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB