From: Eric Bollengier Date: Wed, 16 Sep 2009 20:07:03 +0000 (+0200) Subject: Fix sql query X-Git-Tag: Release-5.0.0~312 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1a7687fd000c83272b6358ba92a47967bc90d6e5;p=bacula%2Fbacula Fix sql query --- diff --git a/bacula/src/cats/sql_cmds.c b/bacula/src/cats/sql_cmds.c index 2556ab6c34..6ac1b4bb12 100644 --- a/bacula/src/cats/sql_cmds.c +++ b/bacula/src/cats/sql_cmds.c @@ -457,7 +457,7 @@ const char *select_recent_version_with_basejob[4] = { "FROM " "(SELECT FileId, JobId, PathId, FilenameId, FileIndex, LStat, MD5 FROM File WHERE JobId IN (%s) " "UNION ALL " - "SELECT File.FileId, BaseFiles.JobId, PathId, FilenameId, File.FileIndex, LStat, MD5 " + "SELECT File.FileId, File.JobId, PathId, FilenameId, File.FileIndex, LStat, MD5 " "FROM BaseFiles JOIN File USING (FileId) " "WHERE BaseFiles.JobId IN (%s) " ") AS T JOIN Job USING (JobId) " @@ -469,7 +469,7 @@ const char *select_recent_version_with_basejob[4] = { "FROM " "(SELECT FileId, JobId, PathId, FilenameId, FileIndex, LStat, MD5 FROM File WHERE JobId IN (%s) " "UNION ALL " - "SELECT File.FileId, BaseFiles.JobId, PathId, FilenameId, File.FileIndex, LStat, MD5 " + "SELECT File.FileId, File.JobId, PathId, FilenameId, File.FileIndex, LStat, MD5 " "FROM BaseFiles JOIN File USING (FileId) " "WHERE BaseFiles.JobId IN (%s) " ") AS T JOIN Job USING (JobId) " @@ -480,7 +480,7 @@ const char *select_recent_version_with_basejob[4] = { "FROM " "(SELECT FileId, JobId, PathId, FilenameId, FileIndex, LStat, MD5 FROM File WHERE JobId IN (%s) " "UNION ALL " - "SELECT File.FileId, BaseFiles.JobId, PathId, FilenameId, File.FileIndex, LStat, MD5 " + "SELECT File.FileId, File.JobId, PathId, FilenameId, File.FileIndex, LStat, MD5 " "FROM BaseFiles JOIN File USING (FileId) " "WHERE BaseFiles.JobId IN (%s) " ") AS T JOIN Job USING (JobId) " @@ -491,7 +491,7 @@ const char *select_recent_version_with_basejob[4] = { "FROM " "(SELECT FileId, JobId, PathId, FilenameId, FileIndex, LStat, MD5 FROM File WHERE JobId IN (%s) " "UNION ALL " - "SELECT File.FileId, BaseFiles.JobId, PathId, FilenameId, File.FileIndex, LStat, MD5 " + "SELECT File.FileId, File.JobId, PathId, FilenameId, File.FileIndex, LStat, MD5 " "FROM BaseFiles JOIN File USING (FileId) " "WHERE BaseFiles.JobId IN (%s) " ") AS T JOIN Job USING (JobId) "