]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/tools/bbatch.c
Change to inner joins. The outer joins don't get us any more resulting records
[bacula/bacula] / bacula / src / tools / bbatch.c
index 0e0ab6f909d267f1eca52740b13935ed5cda5f12..b42ce0c8f35406b1178fc5f0922c9c337fbea58a 100644 (file)
@@ -16,8 +16,8 @@
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
    modify it under the terms of version two of the GNU General Public
-   License as published by the Free Software Foundation plus additions
-   that are listed in the file LICENSE.
+   License as published by the Free Software Foundation and included
+   in the file LICENSE.
 
    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -69,7 +69,7 @@ static const char *db_user = "bacula";
 static const char *db_password = "";
 static const char *db_host = NULL;
 
-char *datafile=NULL;
+static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
 
 static void usage()
 {
@@ -275,12 +275,14 @@ static void *do_batch(void *jcr)
    db_write_batch_file_records(bjcr);
    btime_t end = get_current_btime();
    
+   P(mutex);
    char ed1[200], ed2[200];
    printf("\rbegin = %s, end = %s\n", edit_int64(begin, ed1),edit_int64(end, ed2));
    printf("Insert time = %llims\n", (end - begin) / 10000);
    printf("Create %u files at %.2f/s\n", lineno, 
          (lineno / ((float)((end - begin) / 1000000))));
    nb--;
+   V(mutex);
    pthread_exit(NULL);
    return NULL;
 }