From: Eric Bollengier Date: Wed, 1 Jun 2022 07:20:56 +0000 (+0200) Subject: Fix accurate query issue introduced by "Update db_get_accurate_jobids() to deal with... X-Git-Tag: Beta-15.0.0~564 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b12a513f5ce8a704d12935e4f51e617854e4a0ad;p=thirdparty%2Fbacula.git Fix accurate query issue introduced by "Update db_get_accurate_jobids() to deal with one single JobId" 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. --- diff --git a/bacula/src/cats/sql_get.c b/bacula/src/cats/sql_get.c index a8caf02d9..c796c5941 100644 --- a/bacula/src/cats/sql_get.c +++ b/bacula/src/cats/sql_get.c @@ -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;