From 72ebc256c4fb30e5b96f0103d80aece4761d32c0 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 16 Apr 2009 17:07:21 +0000 Subject: [PATCH] Add additional mysql connection debug code git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8739 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/cats/mysql.c | 10 +++++++++- bacula/technotes | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/bacula/src/cats/mysql.c b/bacula/src/cats/mysql.c index e6f7dd7bd0..d5cd64d873 100644 --- a/bacula/src/cats/mysql.c +++ b/bacula/src/cats/mysql.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2007 Free Software Foundation Europe e.V. + Copyright (C) 2000-2008 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -193,6 +193,14 @@ db_open_database(JCR *jcr, B_DB *mdb) "Database=%s User=%s\n" "MySQL connect failed either server not running or your authorization is incorrect.\n"), mdb->db_name, mdb->db_user); +#if MYSQL_VERSION_ID >= 40101 + Dmsg3(50, "Error %u (%s): %s\n", + mysql_errno(&(mdb->mysql)), mysql_sqlstate(&(mdb->mysql)), + mysql_error(&(mdb->mysql))); +#else + Dmsg2(50, "Error %u: %s\n", + mysql_errno(&(mdb->mysql)), mysql_error(&(mdb->mysql))); +#endif V(mutex); return 0; } diff --git a/bacula/technotes b/bacula/technotes index 9594ff90cf..933db1dda7 100644 --- a/bacula/technotes +++ b/bacula/technotes @@ -2,6 +2,9 @@ General: +16Apr09 +kes Add additional mysql connection debug code submitted by: + "Chandranshu ." 14Apr09 kes Fix bug #1246 Sometimes access denied with VSS enabled. UCS conversion cache was not properly flushed at the end of a Job. -- 2.39.5