(bug 32787) Add DB name to debug output. Based on patch by Solitarius