[patch] Log DB queries for failed actions, too
|Reported by:||Owned by:||Adrian Holovaty|
|Component:||Database layer (models, ORM)||Version:||magic-removal|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
DB queries are only logged for statements that succeed. It would be nice to be able to, for example, get the last SQL of a failed model operation, but such queries are not recorded. Patch forthcoming...