Since:

a) I am not using Base jobs
b) I am currently stuck with using MySQL
c) There is not a 'proper' fix yet

I am going to use the attached patch as a temporary solution to the problem.
Index: src/cats/sql_cmds.c
===================================================================
RCS file: /cvs/netpilot/GPL/bacula-5.0.1/WORK/src/cats/sql_cmds.c,v
retrieving revision 1.2
diff -u -r1.2 sql_cmds.c
--- src/cats/sql_cmds.c	26 Mar 2010 10:36:03 -0000	1.2
+++ src/cats/sql_cmds.c	7 Apr 2010 13:56:10 -0000
@@ -481,9 +481,7 @@
          "WHERE BaseFiles.JobId IN (%s) "        /* Use Max(JobTDate) to find */
        ") AS tmp GROUP BY PathId, FilenameId "   /* the latest file version */
     ") AS T1 "
-"WHERE (Job.JobId IN ( "  /* Security, we force JobId to be valid */
-        "SELECT DISTINCT BaseJobId FROM BaseFiles WHERE JobId IN (%s)) "
-        "OR Job.JobId IN (%s)) "
+"WHERE Job.JobId IN (%s) "
   "AND T1.JobTDate = Job.JobTDate " /* Join on JobTDate to get the orginal */
   "AND Job.JobId = File.JobId "     /* Job/File record */
   "AND T1.PathId = File.PathId "
Index: src/cats/sql_get.c
===================================================================
RCS file: /cvs/netpilot/GPL/bacula-5.0.1/WORK/src/cats/sql_get.c,v
retrieving revision 1.1
diff -u -r1.1 sql_get.c
--- src/cats/sql_get.c	26 Mar 2010 10:20:41 -0000	1.1
+++ src/cats/sql_get.c	7 Apr 2010 13:56:10 -0000
@@ -1111,7 +1111,7 @@
 #ifdef new_db_get_file_list
    POOL_MEM buf2(PM_MESSAGE);
    Mmsg(buf2, select_recent_version_with_basejob[db_type], 
-        jobids, jobids, jobids, jobids);
+        jobids, jobids, jobids);
    Mmsg(buf,
 "SELECT Path.Path, Filename.Name, Temp.FileIndex, Temp.JobId, LStat, MD5 "
  "FROM ( %s ) AS Temp "
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to