This patch series switch to thread-safe interface of libdbi (correspondingly introducing version requirement for libdbi >= 0.9.0). In addition SQL-specific debug facility is added alongside with couple of inefficiencies catch.
Essentially it's groundwork for possible future refactoring which allows for things like gprs authentication or prepared statements to be implemented.