]> git.sur5r.net Git - bacula/bacula/commitdiff
Check if sql backend is thread-safe
authorEric Bollengier <eric@eb.homelinux.org>
Mon, 19 Apr 2010 14:22:48 +0000 (16:22 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 2 Aug 2010 14:53:42 +0000 (16:53 +0200)
bacula/src/cats/mysql.c
bacula/src/dird/dird.c

index c8dce1e9ebb8f0f76eb4b93835c87750aaf3543f..9e34826b3a7af96631068db8f159225f8dc57c85 100644 (file)
@@ -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));
index f720d8befd207bcd7daa0410a5344b204df3e55d..a3b01e1499cf7143e25bd7b5d12dbf3a98f17224 100644 (file)
@@ -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());