From 4775bdca95c844e5be24941806929ecaebb26ec5 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 5f950fb5c1..3d635f0233 100644 --- a/bacula/src/cats/mysql.c +++ b/bacula/src/cats/mysql.c @@ -97,7 +97,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 a34fe4a933..38c20c8dd1 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+1)) { Pmsg1(000, "Warning, settings problem for Catalog=%s\n", catalog->name()); -- 2.39.2