From 9203b6bb0939a26a69ab4eb36429182858154ba1 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 19 Apr 2010 16:22:48 +0200 Subject: [PATCH] Check if sql backend is thread-safe --- bacula/src/cats/mysql.c | 1 - bacula/src/dird/dird.c | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bacula/src/cats/mysql.c b/bacula/src/cats/mysql.c index c8dce1e9eb..9e34826b3a 100644 --- a/bacula/src/cats/mysql.c +++ b/bacula/src/cats/mysql.c @@ -100,7 +100,6 @@ db_init_database(JCR *jcr, const char *db_name, const char *db_user, const char } } } - db_check_backend_thread_safe(); Dmsg0(100, "db_open first time\n"); mdb = (B_DB *)malloc(sizeof(B_DB)); memset(mdb, 0, sizeof(B_DB)); diff --git a/bacula/src/dird/dird.c b/bacula/src/dird/dird.c index f720d8befd..a3b01e1499 100644 --- a/bacula/src/dird/dird.c +++ b/bacula/src/dird/dird.c @@ -958,7 +958,10 @@ static bool check_catalog(cat_op mode) OK = false; continue; } - + + /* Check if the SQL library is thread-safe */ + db_check_backend_thread_safe(); + /* Display a message if the db max_connections is too low */ if (!db_check_max_connections(NULL, db, director->MaxConcurrentJobs)) { Pmsg1(000, "Warning, settings problem for Catalog=%s\n", catalog->name()); -- 2.39.5