From a4259b0e4d4fd322764d381081fb6eaa0e327e6d Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 8 Oct 2008 13:26:36 +0000 Subject: [PATCH] Sort JobIds returned from db_accurate_get_jobids() to fix Virtual backup start time bug reported by Graham Keeling. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7732 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/cats/sql_get.c | 2 +- bacula/src/dird/vbackup.c | 1 + bacula/technotes-2.5 | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bacula/src/cats/sql_get.c b/bacula/src/cats/sql_get.c index 30f25f5c35..a50fb336aa 100644 --- a/bacula/src/cats/sql_get.c +++ b/bacula/src/cats/sql_get.c @@ -1138,7 +1138,7 @@ bool db_accurate_get_jobids(JCR *jcr, B_DB *mdb, } /* build a jobid list ie: 1,2,3,4 */ - Mmsg(query, "SELECT JobId FROM btemp3%s", jobid); + Mmsg(query, "SELECT JobId FROM btemp3%s ORDER by JobTDate", jobid); db_sql_query(mdb, query.c_str(), db_get_int_handler, jobids); Dmsg1(1, "db_accurate_get_jobids=%s\n", jobids); ret = true; diff --git a/bacula/src/dird/vbackup.c b/bacula/src/dird/vbackup.c index 389c862d79..df556d11a5 100644 --- a/bacula/src/dird/vbackup.c +++ b/bacula/src/dird/vbackup.c @@ -126,6 +126,7 @@ bool do_vbackup_init(JCR *jcr) } memset(&jcr->previous_jr, 0, sizeof(jcr->previous_jr)); jcr->previous_jr.JobId = str_to_int64(p); + Dmsg1(10, "Previous JobId=%s\n", p); if (!db_get_job_record(jcr, jcr->db, &jcr->previous_jr)) { Jmsg(jcr, M_FATAL, 0, _("Error getting Job record for previous Job: ERR=%s"), db_strerror(jcr->db)); diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 2b9f64e00d..d92ca5215e 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -18,6 +18,9 @@ remove reader/writer in FOPTS???? General: 08Oct08 +kes Sort JobIds returned from db_accurate_get_jobids() to fix Virtual + backup start time bug reported by Graham Keeling. +08Oct08 ebl Fix possible bug in cancel_job() with job that are not yet created. 07Oct08 -- 2.39.5