]> git.sur5r.net Git - bacula/bacula/commitdiff
Sort JobIds returned from db_accurate_get_jobids() to fix Virtual
authorKern Sibbald <kern@sibbald.com>
Wed, 8 Oct 2008 13:26:36 +0000 (13:26 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 8 Oct 2008 13:26:36 +0000 (13:26 +0000)
     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
bacula/src/dird/vbackup.c
bacula/technotes-2.5

index 30f25f5c352156281c4b319f3463b822a55c8f13..a50fb336aaf322906db9ec227e8b3512c21f3ea4 100644 (file)
@@ -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;
index 389c862d79b033c3a7a6270a19e9ad7a8d183045..df556d11a5162637c41c94d30ec5453a7c1636fc 100644 (file)
@@ -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));
index 2b9f64e00d8e410f93ef0caa6400a737e58cc909..d92ca5215ecbb57ba8ad87595693aeb448f3e61a 100644 (file)
@@ -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