[eluser]marmida[/eluser]
Long story short: I don't see an easy way to add something like logging without going outside application/.
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.
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?