]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix accurate query issue introduced by "Update db_get_accurate_jobids() to deal with...
authorEric Bollengier <eric@baculasystems.com>
Wed, 1 Jun 2022 07:20:56 +0000 (09:20 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:58 +0000 (13:56 +0200)
The db_get_accurate_jobids() can return a jobid list that doesn't include
the jobid that was requested. For backup, it's not really a problem, however
for things like restoring an Object, it doesn't work. To be fixed later on.

bacula/src/cats/sql_get.c

index a8caf02d9fbf7613db9f937df7132a08e4b1f690..c796c59416f7d013b085a457a6b09b9799d0b184 100644 (file)
@@ -1681,15 +1681,10 @@ bool BDB::bdb_get_accurate_jobids(JCR *jcr,
       goto bail_out;
    }
 
-   /* If we call the function with one jobid, we can take it
+   /* FIXME: When we come with a copy (or VF), the list can return
+    * a JobId list that doesn't include the one that was provided.
     * if the result is also one jobid. It is useful when
-    * we deal with multiple VF or copies having the same JobTDate.
-    * TODO: Adjust if we have a list and we don't have the id resquested
     */
-   if (is_a_number(jobids->list)) {
-      jobids->reset();
-      jobids->add(edit_uint64(from_jobid, esc));
-   }
 
    Dmsg1(1, "db_get_accurate_jobids=%s\n", jobids->list);
    ret = true;