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

[eluser]gtech[/eluser]
With db_debug on it does stop the rest of the code in the request from working, thats why I tend to turn it off and log any errors manually.

I have tested a fail case with 1.6 with db_debug on and the rollback appears to work OK, so apologies even though the code halted after the commit subsequent requests still used the database ok.

[edit] this has later been proven just to be the case on my machine, on other os's it fails to complete the transaction when db_debug is set to TRUE[/edit]

[strike]
Are you using mysql tables that support rollback? *my tables use the innodb engine*

eg:
Code:
Create table sections(<whatever columns you have>) ENGINE = InnoDB;

have you tried inputting the sql statements manually into mysql within a transaction and see if the lock still happens?
Code:
START TRANSACTION;
insert ...
insert ... the duplicate key
ROLLBACK;
[/strike]


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