]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Convert dbcheck to use 64 bit DB IDs.
authorKern Sibbald <kern@sibbald.com>
Thu, 28 Dec 2006 17:14:00 +0000 (17:14 +0000)
committerKern Sibbald <kern@sibbald.com>
Thu, 28 Dec 2006 17:14:00 +0000 (17:14 +0000)
kes  Update projects
kes  Make rescue work.
kes  Clarify Volume migration error message.
kes  Look for Job keyword when opening DB in console.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3851 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/ChangeLog
bacula/kernstodo
bacula/projects
bacula/src/dird/migrate.c
bacula/src/dird/ua_cmds.c
bacula/src/gnome2-console/callbacks.c
bacula/src/tools/dbcheck.c
bacula/src/version.h
bacula/technotes-1.39

index 2d668a37a0c0a8840943c2bc87dd393d13b4484f..f8fea00d2f5f6431f68de6da148489a675e8f3a7 100644 (file)
@@ -1,6 +1,43 @@
               Technical notes on version 1.39  
 
 General:
+28Dec06
+kes  Update projects
+kes  Make rescue work.      
+kes  Clarify Volume migration error message.
+kes  Look for Job keyword when opening DB in console.
+23Dec06
+kes  Add code in catreq.c to reject volumes not marked Enabled.
+kes  Add a few more ACL access checks.
+kes  Add \n in gnome2-console restore command so that output prints 
+     nicer -- i.e. lines do not run together.
+kes  Fix autolabeling so that it will not mark a volume in error
+     if the volume was not actually opened. This should fix bugs
+     #737 and 738.
+kes  Require tape drive to be open before autolabeling.
+kes  Require explicit mount command on non-tapes before autolabeling.
+kes  Implement an open_client_db() that searches the keywords for
+     either a catolg or client, and opens the appropriate catalog.
+     This makes Bacula adjust better to multiple catalogs.
+kes  Use more name() methods for resources rather than hdr.name.
+22Dec06
+kes  Fix code to check for two resources of same name. It forgot
+     to check the last entry.  Fixes bug #734.
+kes  Apply scanvolume patch from Richard Mortimer that fixes bug
+     #738.
+kes  Apply Eric's patch for recycling the Scratch pool.
+kes  Note, for the tray-monitor (or almost any restricted console_
+     to work, in version 1.39.x you must add CatalogACL = catalog-name
+kes  Add appropriate new #undefs to autoconf/acconfig.h so that 
+     configure works correctly.
+kes  Implement configure code to allow the user to disable IPv6 with
+     --disable-ipv6 
+kes  Apply Richard Mortimer's patch to prevent seg fault if mount point
+     not specified -- SD refuses to start.
+kes  Add magic.bacula from bug #715 to the scripts directory along with
+     Arno's explanation of how to install it.
+kes  Convert a bunch of hdr.name into name() method calls.
+kes  Fix the code to remove .bsr files.  Fixes bug #736 -- Martin.
 
 Version 1.39.32 released: 
 20Dec06
index 1df1b05a4eee20cd3c7069517496954b8ecfd887..96a346b931efafe88c98cf9717e92d8e1ae7b147 100644 (file)
@@ -60,6 +60,27 @@ Priority:
 - bacula-1.38.2-ssl.patch
 - Bare-metal recovery Windows (todo)
 
+Projects:
+- GUI
+  - Admin
+  - Management reports
+  - Look at Webmin
+     http://www.orangecrate.com/modules.php?name=News&file=article&sid=501
+- Performance
+  - FD-SD quick disconnect
+  - Despool attributes in separate thread
+  - Database speedups
+  - Embedded MySQL
+- Features
+  - Better scheduling  
+  - Full at least once a month, ...
+  - Cancel Inc if Diff/Full running
+  - More intelligent re-run
+  - New/deleted file backup   
+  - FD plugins
+  - Incremental backup -- rsync, Stow
+
+
 
 
 For 1.39:
index 94c6047c4e3948a1d347b6b936f06286bfd0c5b4..cdafc7ee8316359a43629c7b3b2285f5a89f856f 100644 (file)
@@ -1072,9 +1072,27 @@ Item 1:  Cause daemons to use a specific IP address to source communications
          10.0.0.1 and zone transfers will always originate from
          10.0.0.2.
 
-Kern notes: I think this would add very little functionality, but a *lot* of
-          additional overhead to Bacula.
+Item n:   Multiple threads in file daemon for the same job
+  Date:   27 November 2005
+  Origin: Ove Risberg (Ove.Risberg at octocode dot com)
+  Status:
+
+  What:   I want the file daemon to start multiple threads for a backup
+          job so the fastest possible backup can be made.
+
+          The file daemon could parse the FileSet information and start
+          one thread for each File entry located on a separate
+          filesystem.
+
+          A confiuration option in the job section should be used to
+          enable or disable this feature. The confgutration option could
+          specify the maximum number of threads in the file daemon.
+
+          If the theads could spool the data to separate spool files
+          the restore process will not be much slower.
 
+  Why:    Multiple concurrent backups of a large fileserver with many
+          disks and controllers will be much faster.
 
 
 ============= Empty Feature Request form ===========
index 98689e86046b39128e050e96c3ccf22df2e3943e..11d497b54665447841e8a86076ce4efbc40ce2dd 100644 (file)
@@ -872,9 +872,10 @@ static bool find_mediaid_then_jobids(JCR *jcr, idpkt *ids, const char *query1,
    }
    if (ids->count == 0) {
       Jmsg(jcr, M_INFO, 0, _("No %ss found to migrate.\n"), type);
-   }
-   if (ids->count != 1) {
-      Jmsg(jcr, M_FATAL, 0, _("SQL logic error. Count should be 1 but is %d\n"), 
+      ok = true;         /* Not an error */
+      goto bail_out;
+   } else if (ids->count != 1) {
+      Jmsg(jcr, M_FATAL, 0, _("SQL error. Expected 1 MediaId got %d\n"), 
          ids->count);
       goto bail_out;
    }
index 24e6d2ad4df8f2f193367a374af7a6167d8e64fd..d5bf15931e1cc9a139d7b5d3431a23a6ceb61990 100644 (file)
@@ -1618,19 +1618,22 @@ static int version_cmd(UAContext *ua, const char *cmd)
  * This call explicitly checks for a catalog=xxx and
  *  if given, opens that catalog.  It also checks for
  *  client=xxx and if found, opens the catalog 
- *  corresponding to that client.
+ *  corresponding to that client. If we still don't 
+ *  have a catalog, look for a Job keyword and get the
+ *  catalog from its client record.
  */
 bool open_client_db(UAContext *ua)
 {
    int i;
    CAT *catalog;
    CLIENT *client;
+   JOB *job;
 
    /* Try for catalog keyword */
    i = find_arg_with_value(ua, NT_("catalog"));
    if (i >= 0) {
       if (!acl_access_ok(ua, Catalog_ACL, ua->argv[i])) {
-         bsendmsg(ua, _("No authorization for catalog \"%s\"\n"), ua->argv[i]);
+         bsendmsg(ua, _("No authorization for Catalog \"%s\"\n"), ua->argv[i]);
          return false;
       }
       catalog = (CAT *)GetResWithName(R_CATALOG, ua->argv[i]);
@@ -1646,25 +1649,51 @@ bool open_client_db(UAContext *ua)
    /* Try for client keyword */
    i = find_arg_with_value(ua, NT_("client"));
    if (i >= 0) {
-      if (!acl_access_ok(ua, Catalog_ACL, ua->argv[i])) {
-         bsendmsg(ua, _("No authorization for client \"%s\"\n"), ua->argv[i]);
+      if (!acl_access_ok(ua, Client_ACL, ua->argv[i])) {
+         bsendmsg(ua, _("No authorization for Client \"%s\"\n"), ua->argv[i]);
          return false;
       }
       client = (CLIENT *)GetResWithName(R_CLIENT, ua->argv[i]);
       if (client) {
-         if (ua->catalog && ua->catalog != client->catalog) {
+         catalog = client->catalog;
+         if (ua->catalog && ua->catalog != catalog) {
+            close_db(ua);
+         }
+         if (!acl_access_ok(ua, Catalog_ACL, catalog->name())) {
+            bsendmsg(ua, _("No authorization for Catalog \"%s\"\n"), catalog->name());
+            return false;
+         }
+         ua->catalog = catalog;
+         return open_db(ua);
+      }
+   }
+
+   /* Try for Job keyword */
+   i = find_arg_with_value(ua, NT_("job"));
+   if (i >= 0) {
+      if (!acl_access_ok(ua, Job_ACL, ua->argv[i])) {
+         bsendmsg(ua, _("No authorization for Job \"%s\"\n"), ua->argv[i]);
+         return false;
+      }
+      job = (JOB *)GetResWithName(R_JOB, ua->argv[i]);
+      if (job) {
+         catalog = job->client->catalog;
+         if (ua->catalog && ua->catalog != catalog) {
             close_db(ua);
          }
-         ua->catalog = client->catalog;
+         if (!acl_access_ok(ua, Catalog_ACL, catalog->name())) {
+            bsendmsg(ua, _("No authorization for Catalog \"%s\"\n"), catalog->name());
+            return false;
+         }
+         ua->catalog = catalog;
          return open_db(ua);
       }
    }
+
    return open_db(ua);
 }
 
 
-                 
-
 /*
  * Open the catalog database.
  */
index 9bd6cf0b68693a02d9caa033d47445dd54ad84da..d88f0c49fc637553ea39b6b67b9094f75a3af719 100644 (file)
@@ -434,7 +434,7 @@ on_run_ok_clicked(GtkButton *button, gpointer user_data)
 
    bsnprintf(cmd, sizeof(cmd),
              "run job=\"%s\" fileset=\"%s\" level=%s client=\"%s\" pool=\"%s\" "
-             "when=\"%s\" where=\"%s\" storage=\"%s\" priority=\"%s\"",
+             "when=\"%s\" where=\"%s\" storage=\"%s\" priority=\"%s\"\n",
              job, fileset, level, client, pool, when, where, storage, priority);
    write_director(cmd);
    set_text(cmd, strlen(cmd));
@@ -507,7 +507,7 @@ on_label_ok_clicked(GtkButton *button, gpointer user_data)
    }
 
    bsnprintf(cmd, sizeof(cmd),
-             "label volume=\"%s\" pool=\"%s\" storage=\"%s\" slot=%s",
+             "label volume=\"%s\" pool=\"%s\" storage=\"%s\" slot=%s\n", 
              volume, pool, storage, slot);
    write_director(cmd);
    set_text(cmd, strlen(cmd));
index 15458084c3a42aac53a06133e78754ec474e6c0c..10daeabc6d6b26cdd3e5eff2393cdbac67b78c19 100644 (file)
@@ -46,7 +46,7 @@ int generate_daemon_event(JCR *jcr, const char *event)
    { return 1; }
 
 typedef struct s_id_ctx {
-   uint32_t *Id;                      /* ids to be modified */
+   int64_t *Id;                       /* ids to be modified */
    int num_ids;                       /* ids stored */
    int max_ids;                       /* size of array */
    int num_del;                       /* number deleted */
@@ -482,13 +482,13 @@ static int id_list_handler(void *ctx, int num_fields, char **row)
    if (lst->num_ids == lst->max_ids) {
       if (lst->max_ids == 0) {
          lst->max_ids = 10000;
-         lst->Id = (uint32_t *)bmalloc(sizeof(uint32_t) * lst->max_ids);
+         lst->Id = (int64_t *)bmalloc(sizeof(int64_t) * lst->max_ids);
       } else {
          lst->max_ids = (lst->max_ids * 3) / 2;
-         lst->Id = (uint32_t *)brealloc(lst->Id, sizeof(uint32_t) * lst->max_ids);
+         lst->Id = (int64_t *)brealloc(lst->Id, sizeof(int64_t) * lst->max_ids);
       }
    }
-   lst->Id[lst->num_ids++] = (uint32_t)strtod(row[0], NULL);
+   lst->Id[lst->num_ids++] = str_to_int64(row[0]);
    return 0;
 }
 
@@ -623,14 +623,15 @@ static void eliminate_duplicate_filenames()
          }
          /* Force all records to use the first id then delete the other ids */
          for (int j=1; j<id_list.num_ids; j++) {
-            bsnprintf(buf, sizeof(buf), "UPDATE File SET FilenameId=%u WHERE FilenameId=%u",
-               id_list.Id[0], id_list.Id[j]);
+            char ed1[50], ed2[50];
+            bsnprintf(buf, sizeof(buf), "UPDATE File SET FilenameId=%s WHERE FilenameId=%s",
+               edit_int64(id_list.Id[0], ed1), edit_int64(id_list.Id[j], ed2));
             if (verbose > 1) {
                printf("%s\n", buf);
             }
             db_sql_query(db, buf, NULL, NULL);
-            bsnprintf(buf, sizeof(buf), "DELETE FROM Filename WHERE FilenameId=%u",
-               id_list.Id[j]);
+            bsnprintf(buf, sizeof(buf), "DELETE FROM Filename WHERE FilenameId=%s",
+               ed2);
             if (verbose > 2) {
                printf("%s\n", buf);
             }
@@ -680,14 +681,14 @@ static void eliminate_duplicate_paths()
          }
          /* Force all records to use the first id then delete the other ids */
          for (int j=1; j<id_list.num_ids; j++) {
-            bsnprintf(buf, sizeof(buf), "UPDATE File SET PathId=%u WHERE PathId=%u",
-               id_list.Id[0], id_list.Id[j]);
+            char ed1[50], ed2[50];
+            bsnprintf(buf, sizeof(buf), "UPDATE File SET PathId=%s WHERE PathId=%s",
+               edit_int64(id_list.Id[0], ed1), edit_int64(id_list.Id[j], ed2));
             if (verbose > 1) {
                printf("%s\n", buf);
             }
             db_sql_query(db, buf, NULL, NULL);
-            bsnprintf(buf, sizeof(buf), "DELETE FROM Path WHERE PathId=%u",
-               id_list.Id[j]);
+            bsnprintf(buf, sizeof(buf), "DELETE FROM Path WHERE PathId=%s", ed2);
             if (verbose > 2) {
                printf("%s\n", buf);
             }
@@ -712,9 +713,11 @@ static void eliminate_orphaned_jobmedia_records()
    printf(_("Found %d orphaned JobMedia records.\n"), id_list.num_ids);
    if (id_list.num_ids && verbose && yes_no(_("Print them? (yes/no): "))) {
       for (int i=0; i < id_list.num_ids; i++) {
+         char ed1[50];
          bsnprintf(buf, sizeof(buf),
 "SELECT JobMedia.JobMediaId,JobMedia.JobId,Media.VolumeName FROM JobMedia,Media "
-"WHERE JobMedia.JobMediaId=%u AND Media.MediaId=JobMedia.MediaId", id_list.Id[i]);
+"WHERE JobMedia.JobMediaId=%s AND Media.MediaId=JobMedia.MediaId", 
+            edit_int64(id_list.Id[i], ed1));
          if (!db_sql_query(db, buf, print_jobmedia_handler, NULL)) {
             printf("%s\n", db_strerror(db));
          }
@@ -726,7 +729,7 @@ static void eliminate_orphaned_jobmedia_records()
 
    if (fix && id_list.num_ids > 0) {
       printf(_("Deleting %d orphaned JobMedia records.\n"), id_list.num_ids);
-      delete_id_list("DELETE FROM JobMedia WHERE JobMediaId=%u", &id_list);
+      delete_id_list("DELETE FROM JobMedia WHERE JobMediaId=%s", &id_list);
    }
 }
 
@@ -747,9 +750,11 @@ static void eliminate_orphaned_file_records()
    printf(_("Found %d orphaned File records.\n"), id_list.num_ids);
    if (name_list.num_ids && verbose && yes_no(_("Print them? (yes/no): "))) {
       for (int i=0; i < id_list.num_ids; i++) {
+         char ed1[50];
          bsnprintf(buf, sizeof(buf),
 "SELECT File.FileId,File.JobId,Filename.Name FROM File,Filename "
-"WHERE File.FileId=%u AND File.FilenameId=Filename.FilenameId", id_list.Id[i]);
+"WHERE File.FileId=%s AND File.FilenameId=Filename.FilenameId", 
+            edit_int64(id_list.Id[i], ed1));
          if (!db_sql_query(db, buf, print_file_handler, NULL)) {
             printf("%s\n", db_strerror(db));
          }
@@ -760,7 +765,7 @@ static void eliminate_orphaned_file_records()
    }
    if (fix && id_list.num_ids > 0) {
       printf(_("Deleting %d orphaned File records.\n"), id_list.num_ids);
-      delete_id_list("DELETE FROM File WHERE FileId=%u", &id_list);
+      delete_id_list("DELETE FROM File WHERE FileId=%s", &id_list);
    }
 }
 
@@ -781,7 +786,9 @@ static void eliminate_orphaned_path_records()
    printf(_("Found %d orphaned Path records.\n"), id_list.num_ids);
    if (id_list.num_ids && verbose && yes_no(_("Print them? (yes/no): "))) {
       for (int i=0; i < id_list.num_ids; i++) {
-         bsnprintf(buf, sizeof(buf), "SELECT Path FROM Path WHERE PathId=%u", id_list.Id[i]);
+         char ed1[50];
+         bsnprintf(buf, sizeof(buf), "SELECT Path FROM Path WHERE PathId=%s", 
+            edit_int64(id_list.Id[i], ed1));
          db_sql_query(db, buf, print_name_handler, NULL);
       }
    }
@@ -790,7 +797,7 @@ static void eliminate_orphaned_path_records()
    }
    if (fix && id_list.num_ids > 0) {
       printf(_("Deleting %d orphaned Path records.\n"), id_list.num_ids);
-      delete_id_list("DELETE FROM Path WHERE PathId=%u", &id_list);
+      delete_id_list("DELETE FROM Path WHERE PathId=%s", &id_list);
    }
 }
 
@@ -811,7 +818,9 @@ static void eliminate_orphaned_filename_records()
    printf(_("Found %d orphaned Filename records.\n"), id_list.num_ids);
    if (id_list.num_ids && verbose && yes_no(_("Print them? (yes/no): "))) {
       for (int i=0; i < id_list.num_ids; i++) {
-         bsnprintf(buf, sizeof(buf), "SELECT Name FROM Filename WHERE FilenameId=%u", id_list.Id[i]);
+         char ed1[50];
+         bsnprintf(buf, sizeof(buf), "SELECT Name FROM Filename WHERE FilenameId=%s", 
+            edit_int64(id_list.Id[i], ed1));
          db_sql_query(db, buf, print_name_handler, NULL);
       }
    }
@@ -820,7 +829,7 @@ static void eliminate_orphaned_filename_records()
    }
    if (fix && id_list.num_ids > 0) {
       printf(_("Deleting %d orphaned Filename records.\n"), id_list.num_ids);
-      delete_id_list("DELETE FROM Filename WHERE FilenameId=%u", &id_list);
+      delete_id_list("DELETE FROM Filename WHERE FilenameId=%s", &id_list);
    }
 }
 
@@ -841,8 +850,9 @@ static void eliminate_orphaned_fileset_records()
    printf(_("Found %d orphaned FileSet records.\n"), id_list.num_ids);
    if (id_list.num_ids && verbose && yes_no(_("Print them? (yes/no): "))) {
       for (int i=0; i < id_list.num_ids; i++) {
+         char ed1[50];
          bsnprintf(buf, sizeof(buf), "SELECT FileSetId,FileSet,MD5 FROM FileSet "
-                      "WHERE FileSetId=%u", id_list.Id[i]);
+                      "WHERE FileSetId=%s", edit_int64(id_list.Id[i], ed1));
          if (!db_sql_query(db, buf, print_fileset_handler, NULL)) {
             printf("%s\n", db_strerror(db));
          }
@@ -853,7 +863,7 @@ static void eliminate_orphaned_fileset_records()
    }
    if (fix && id_list.num_ids > 0) {
       printf(_("Deleting %d orphaned FileSet records.\n"), id_list.num_ids);
-      delete_id_list("DELETE FROM FileSet WHERE FileSetId=%u", &id_list);
+      delete_id_list("DELETE FROM FileSet WHERE FileSetId=%s", &id_list);
    }
 }
 
@@ -881,8 +891,9 @@ static void eliminate_orphaned_client_records()
    printf(_("Found %d orphaned Client records.\n"), id_list.num_ids);
    if (id_list.num_ids && verbose && yes_no(_("Print them? (yes/no): "))) {
       for (int i=0; i < id_list.num_ids; i++) {
+         char ed1[50];
          bsnprintf(buf, sizeof(buf), "SELECT ClientId,Name FROM Client "
-                      "WHERE ClientId=%u", id_list.Id[i]);
+                      "WHERE ClientId=%s", edit_int64(id_list.Id[i], ed1));
          if (!db_sql_query(db, buf, print_client_handler, NULL)) {
             printf("%s\n", db_strerror(db));
          }
@@ -893,7 +904,7 @@ static void eliminate_orphaned_client_records()
    }
    if (fix && id_list.num_ids > 0) {
       printf(_("Deleting %d orphaned Client records.\n"), id_list.num_ids);
-      delete_id_list("DELETE FROM Client WHERE ClientId=%u", &id_list);
+      delete_id_list("DELETE FROM Client WHERE ClientId=%s", &id_list);
    }
 }
 
@@ -921,8 +932,9 @@ static void eliminate_orphaned_job_records()
    printf(_("Found %d orphaned Job records.\n"), id_list.num_ids);
    if (id_list.num_ids && verbose && yes_no(_("Print them? (yes/no): "))) {
       for (int i=0; i < id_list.num_ids; i++) {
+         char ed1[50];
          bsnprintf(buf, sizeof(buf), "SELECT JobId,Name,StartTime FROM Job "
-                      "WHERE JobId=%u", id_list.Id[i]);
+                      "WHERE JobId=%s", edit_int64(id_list.Id[i], ed1));
          if (!db_sql_query(db, buf, print_job_handler, NULL)) {
             printf("%s\n", db_strerror(db));
          }
@@ -933,11 +945,11 @@ static void eliminate_orphaned_job_records()
    }
    if (fix && id_list.num_ids > 0) {
       printf(_("Deleting %d orphaned Job records.\n"), id_list.num_ids);
-      delete_id_list("DELETE FROM Job WHERE JobId=%u", &id_list);
+      delete_id_list("DELETE FROM Job WHERE JobId=%s", &id_list);
       printf(_("Deleting JobMedia records of orphaned Job records.\n"));
-      delete_id_list("DELETE FROM JobMedia WHERE JobId=%u", &id_list);
+      delete_id_list("DELETE FROM JobMedia WHERE JobId=%s", &id_list);
       printf(_("Deleting Log records of orphaned Job records.\n"));
-      delete_id_list("DELETE FROM Log WHERE JobId=%u", &id_list);
+      delete_id_list("DELETE FROM Log WHERE JobId=%s", &id_list);
    }
 }
 
@@ -958,8 +970,9 @@ static void eliminate_admin_records()
    printf(_("Found %d Admin Job records.\n"), id_list.num_ids);
    if (id_list.num_ids && verbose && yes_no(_("Print them? (yes/no): "))) {
       for (int i=0; i < id_list.num_ids; i++) {
+         char ed1[50];
          bsnprintf(buf, sizeof(buf), "SELECT JobId,Name,StartTime FROM Job "
-                      "WHERE JobId=%u", id_list.Id[i]);
+                      "WHERE JobId=%s", edit_int64(id_list.Id[i], ed1));
          if (!db_sql_query(db, buf, print_job_handler, NULL)) {
             printf("%s\n", db_strerror(db));
          }
@@ -970,7 +983,7 @@ static void eliminate_admin_records()
    }
    if (fix && id_list.num_ids > 0) {
       printf(_("Deleting %d Admin Job records.\n"), id_list.num_ids);
-      delete_id_list("DELETE FROM Job WHERE JobId=%u", &id_list);
+      delete_id_list("DELETE FROM Job WHERE JobId=%s", &id_list);
    }
 }
 
@@ -990,8 +1003,9 @@ static void eliminate_restore_records()
    printf(_("Found %d Restore Job records.\n"), id_list.num_ids);
    if (id_list.num_ids && verbose && yes_no(_("Print them? (yes/no): "))) {
       for (int i=0; i < id_list.num_ids; i++) {
+         char ed1[50];
          bsnprintf(buf, sizeof(buf), "SELECT JobId,Name,StartTime FROM Job "
-                      "WHERE JobId=%u", id_list.Id[i]);
+                      "WHERE JobId=%s", edit_int64(id_list.Id[i], ed1));
          if (!db_sql_query(db, buf, print_job_handler, NULL)) {
             printf("%s\n", db_strerror(db));
          }
@@ -1002,7 +1016,7 @@ static void eliminate_restore_records()
    }
    if (fix && id_list.num_ids > 0) {
       printf(_("Deleting %d Restore Job records.\n"), id_list.num_ids);
-      delete_id_list("DELETE FROM Job WHERE JobId=%u", &id_list);
+      delete_id_list("DELETE FROM Job WHERE JobId=%s", &id_list);
    }
 }
 
@@ -1026,8 +1040,10 @@ static void repair_bad_filenames()
    printf(_("Found %d bad Filename records.\n"), id_list.num_ids);
    if (id_list.num_ids && verbose && yes_no(_("Print them? (yes/no): "))) {
       for (i=0; i < id_list.num_ids; i++) {
+         char ed1[50];
          bsnprintf(buf, sizeof(buf),
-            "SELECT Name FROM Filename WHERE FilenameId=%u", id_list.Id[i]);
+            "SELECT Name FROM Filename WHERE FilenameId=%s", 
+                edit_int64(id_list.Id[i], ed1));
          if (!db_sql_query(db, buf, print_name_handler, NULL)) {
             printf("%s\n", db_strerror(db));
          }
@@ -1042,8 +1058,10 @@ static void repair_bad_filenames()
       printf(_("Reparing %d bad Filename records.\n"), id_list.num_ids);
       for (i=0; i < id_list.num_ids; i++) {
          int len;
+         char ed1[50];
          bsnprintf(buf, sizeof(buf),
-            "SELECT Name FROM Filename WHERE FilenameId=%u", id_list.Id[i]);
+            "SELECT Name FROM Filename WHERE FilenameId=%s", 
+               edit_int64(id_list.Id[i], ed1));
          if (!db_sql_query(db, buf, get_name_handler, name)) {
             printf("%s\n", db_strerror(db));
          }
@@ -1059,8 +1077,8 @@ static void repair_bad_filenames()
             db_escape_string(esc_name, name, len);
          }
          bsnprintf(buf, sizeof(buf),
-            "UPDATE Filename SET Name='%s' WHERE FilenameId=%u",
-            esc_name, id_list.Id[i]);
+            "UPDATE Filename SET Name='%s' WHERE FilenameId=%s",
+            esc_name, edit_int64(id_list.Id[i], ed1));
          if (verbose > 1) {
             printf("%s\n", buf);
          }
@@ -1086,8 +1104,9 @@ static void repair_bad_paths()
    printf(_("Found %d bad Path records.\n"), id_list.num_ids);
    if (id_list.num_ids && verbose && yes_no(_("Print them? (yes/no): "))) {
       for (i=0; i < id_list.num_ids; i++) {
+         char ed1[50];
          bsnprintf(buf, sizeof(buf),
-            "SELECT Path FROM Path WHERE PathId=%u", id_list.Id[i]);
+            "SELECT Path FROM Path WHERE PathId=%s", edit_int64(id_list.Id[i], ed1));
          if (!db_sql_query(db, buf, print_name_handler, NULL)) {
             printf("%s\n", db_strerror(db));
          }
@@ -1102,8 +1121,9 @@ static void repair_bad_paths()
       printf(_("Reparing %d bad Filename records.\n"), id_list.num_ids);
       for (i=0; i < id_list.num_ids; i++) {
          int len;
+         char ed1[50];
          bsnprintf(buf, sizeof(buf),
-            "SELECT Path FROM Path WHERE PathId=%u", id_list.Id[i]);
+            "SELECT Path FROM Path WHERE PathId=%s", edit_int64(id_list.Id[i], ed1));
          if (!db_sql_query(db, buf, get_name_handler, name)) {
             printf("%s\n", db_strerror(db));
          }
@@ -1114,8 +1134,8 @@ static void repair_bad_paths()
          /* Add trailing slash */
          len = pm_strcat(&name, "/");
          db_escape_string(esc_name, name, len);
-         bsnprintf(buf, sizeof(buf), "UPDATE Path SET Path='%s' WHERE PathId=%u",
-            esc_name, id_list.Id[i]);
+         bsnprintf(buf, sizeof(buf), "UPDATE Path SET Path='%s' WHERE PathId=%s",
+            esc_name, edit_int64(id_list.Id[i], ed1));
          if (verbose > 1) {
             printf("%s\n", buf);
          }
index 4c7a6fb8b83ee0a7af414be44373c15ec3ddc585..162db16d160a891ca5a27f91310b7ca13281f310 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "1.39.33"
-#define BDATE   "23 December 2006"
-#define LSMDATE "23Dec06"
+#define BDATE   "28 December 2006"
+#define LSMDATE "28Dec06"
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2006 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2006"       /* year for copyright messages in progs */
index aced4539110b31bf456c50e1b5e2e39e1f1ea1f1..0c5c16db6afc3360fd1479f94a92c6f72abcdac4 100644 (file)
@@ -1,6 +1,12 @@
               Technical notes on version 1.39  
 
 General:
+28Dec06
+kes  Convert dbcheck to use 64 bit DB IDs.
+kes  Update projects
+kes  Make rescue work.      
+kes  Clarify Volume migration error message.
+kes  Look for Job keyword when opening DB in console.
 23Dec06
 kes  Add code in catreq.c to reject volumes not marked Enabled.
 kes  Add a few more ACL access checks.