Avoid starting sql transactions when we don't need to.
Authored by: jonas 2004-02-18
Parent: [r157]
Child: [r159]