From 84bde4fee7a5426c543cf7b913a9b3a691ef0b5a Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 10 Feb 2010 21:54:04 +0100 Subject: [PATCH] Work around SQLite3 bug in bat submitted by Andreas Piesk a.piesk@gmx.net --- bacula/src/qt-console/job/job.cpp | 6 +++--- bacula/src/qt-console/medialist/mediaview.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bacula/src/qt-console/job/job.cpp b/bacula/src/qt-console/job/job.cpp index 42d51b21c0..f78bfd8c4e 100644 --- a/bacula/src/qt-console/job/job.cpp +++ b/bacula/src/qt-console/job/job.cpp @@ -218,9 +218,9 @@ void Job::populateForm() char buf[256]; QString query = "SELECT JobId, Job.Name, Level, Client.Name, Pool.Name, FileSet, SchedTime, StartTime, EndTime, " - "EndTime - StartTime AS Duration, JobBytes, JobFiles, JobErrors, JobStatus, PurgedFiles " - "FROM Job JOIN Client USING (ClientId) LEFT JOIN Pool USING (PoolId) " - "LEFT JOIN FileSet USING (FileSetId)" + "EndTime-StartTime AS Duration, JobBytes, JobFiles, JobErrors, JobStatus, PurgedFiles " + "FROM Job JOIN Client USING (ClientId) LEFT JOIN Pool ON (Job.PoolId = Pool.PoolId) " + "LEFT JOIN FileSet ON (Job.FileSetId = FileSet.FileSetId)" "WHERE JobId=" + m_jobId; QStringList results; if (m_console->sql_cmd(query, results)) { diff --git a/bacula/src/qt-console/medialist/mediaview.cpp b/bacula/src/qt-console/medialist/mediaview.cpp index 3210ad505b..7b0f7838e9 100644 --- a/bacula/src/qt-console/medialist/mediaview.cpp +++ b/bacula/src/qt-console/medialist/mediaview.cpp @@ -304,7 +304,7 @@ void MediaView::populateTable() "Slot, MediaType, VolStatus, VolBytes, Pool.Name, " "LastWritten, Media.VolRetention " "FROM Media JOIN Pool USING (PoolId) " - "LEFT JOIN Location USING (LocationId) " + "LEFT JOIN Location ON (Media.LocationId=Location.LocationId) " + cmd + " ORDER BY VolumeName LIMIT " + m_sbLimit->cleanText(); -- 2.39.5