Welcome Guest, Not a member yet? Register   Sign In
DB Errors log
#3

[eluser]gon[/eluser]
Quote:Long story long: I myself just looked into the CI internals to figure out more about how to build a separate log for all queries and make it configurable. It’s not all that easy, since by the time the query is fully expanded with all driver-specific bindings in it, you’re all the way down into the driver class’s _execute method. Because of the active record / regular and driver distinctions, there’s a special bit of macro-esque magic used to dynamically define an adapter class in DB.php; because of these special considerations, the basic load_class() function isn’t used, and because of that, it doesn’t look inside application/ for anything to do with database drivers for subclassing.

To avoid getting inside specific DB drivers, I'm modifying only DB_driver.php.

Quote:You mentioned database locking when transactions are enabled; I’m encountering weird problems with innodb that sound like they may be related. I can’t find anything that suggests actual locks being run into mysql. Did you find anything that explicitly mentions database-side locking?

Locking occurs when execution is halted and a transaction has started (as always).
So if you turn DB debugging on, the error is displayed and you can't perform a rollback. This is in commented in CI docs.


Doing what I proposed in my post, and turning DB debugging off, is what I'm doing for the moment. This way I have no problems with deadlocks.
I'll try to enhance this method, as a lot of not so critical errors are also shown on the log files.


I'm afraid that I'll have to get inside MySQL driver files, as you said, but I'll post any advance I make.


Regards.


Messages In This Thread
DB Errors log - by El Forum - 02-25-2008, 08:40 AM
DB Errors log - by El Forum - 02-27-2008, 06:28 PM
DB Errors log - by El Forum - 02-29-2008, 06:37 AM
DB Errors log - by El Forum - 02-29-2008, 06:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB