]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/mysql.c
Tweak mutex order for SD
[bacula/bacula] / bacula / src / cats / mysql.c
index e6f7dd7bd03257f9b0fada0bef9710a7a2b2cf62..d5cd64d873d2dabafa3e28a83c6f1065b60fccd8 100644 (file)
@@ -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;
    }