]> 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>
Wed, 21 Apr 2010 08:16:49 +0000 (10:16 +0200)
bacula/src/cats/mysql.c
bacula/src/dird/dird.c

index 5f950fb5c1c835426eeef97daa4c993baf5992b8..3d635f02330c68a09a6d4a4979970c89a784db36 100644 (file)
@@ -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));
index a34fe4a933099abc954a11211bb63881864a03f4..38c20c8dd1e41447ff826875ca557c4009c5dfeb 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+1)) {
          Pmsg1(000, "Warning, settings problem for Catalog=%s\n", catalog->name());