From dd280ea6337610169acd4d08bdf38ae0ae8e407d Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Fri, 17 Jul 2009 08:22:59 +0000 Subject: [PATCH] Fix sql query for sqlite on suse10 on copy job git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@9045 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/cats/sql_list.c | 14 +++++++------- bacula/technotes | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/bacula/src/cats/sql_list.c b/bacula/src/cats/sql_list.c index 5b56f86b06..fb228ccdd1 100644 --- a/bacula/src/cats/sql_list.c +++ b/bacula/src/cats/sql_list.c @@ -253,18 +253,18 @@ void db_list_copies_records(JCR *jcr, B_DB *mdb, uint32_t limit, char *JobIds, } if (JobIds && JobIds[0]) { - Mmsg(str_jobids, " AND (C.PriorJobId IN (%s) OR C.JobId IN (%s)) ", + Mmsg(str_jobids, " AND (Job.PriorJobId IN (%s) OR Job.JobId IN (%s)) ", JobIds, JobIds); } db_lock(mdb); Mmsg(mdb->cmd, - "SELECT DISTINCT C.PriorJobId AS JobId, C.Job, " - "C.JobId AS CopyJobId, M.MediaType " - "FROM Job AS C " - "JOIN JobMedia USING (JobId) " - "JOIN Media AS M USING (MediaId) " - "WHERE C.Type = '%c' %s ORDER BY C.PriorJobId DESC %s", + "SELECT DISTINCT Job.PriorJobId AS JobId, Job.Job, " + "Job.JobId AS CopyJobId, Media.MediaType " + "FROM Job " + "JOIN JobMedia USING (JobId) " + "JOIN Media USING (MediaId) " + "WHERE Job.Type = '%c' %s ORDER BY Job.PriorJobId DESC %s", (char) JT_JOB_COPY, str_jobids.c_str(), str_limit.c_str()); if (!QUERY_DB(jcr, mdb, mdb->cmd)) { diff --git a/bacula/technotes b/bacula/technotes index 39df901193..fbb0cf57c5 100644 --- a/bacula/technotes +++ b/bacula/technotes @@ -2,6 +2,8 @@ General: +17Jul09 +ebl Fix sql query for sqlite on suse10 on copy job 16Jul09 ebl tweak some bat screens ebl Replace info_msg by send_msg in status slots command. -- 2.39.5