]> git.sur5r.net Git - bacula/bacula/commitdiff
Add missing MarkId in mysql accurate query
authorEric Bollengier <eric@eb.homelinux.org>
Sun, 21 Nov 2010 11:35:13 +0000 (12:35 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 25 Nov 2010 13:59:32 +0000 (14:59 +0100)
bacula/src/cats/sql_cmds.c

index 9dac77f7f7c281bfaa022bbf5afb5acfea5ee835..7549452d3b23f61ab7bc5bf7fa969ab43c542e73 100644 (file)
@@ -367,12 +367,12 @@ const char *select_recent_version_with_basejob_and_delta_default =
 "FROM Job, File, ( "
     "SELECT MAX(JobTDate) AS JobTDate, PathId, FilenameId, MarkId "
       "FROM ( "
-        "SELECT JobTDate, PathId, FilenameId "   /* Get all normal files */
-          "FROM File JOIN Job USING (JobId) "    /* from selected backup */
+        "SELECT JobTDate, PathId, FilenameId, MarkId " /* Get all normal files */
+          "FROM File JOIN Job USING (JobId) "          /* from selected backup */
          "WHERE File.JobId IN (%s) "
           "UNION ALL "
-        "SELECT JobTDate, PathId, FilenameId "   /* Get all files from */ 
-          "FROM BaseFiles "                      /* BaseJob */
+        "SELECT JobTDate, PathId, FilenameId, MarkId " /* Get all files from */ 
+          "FROM BaseFiles "                            /* BaseJob */
                "JOIN File USING (FileId) "
                "JOIN Job  ON    (BaseJobId = Job.JobId) "
          "WHERE BaseFiles.JobId IN (%s) "        /* Use Max(JobTDate) to find */