From: Kern Sibbald Date: Wed, 10 Feb 2010 20:54:04 +0000 (+0100) Subject: Work around SQLite3 bug in bat submitted by Andreas Piesk a.piesk@gmx.net X-Git-Tag: Release-7.0.0~2244 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=abfe366c60461bd680b29b5de955cb952dfde6cf;p=bacula%2Fbacula Work around SQLite3 bug in bat submitted by Andreas Piesk a.piesk@gmx.net --- 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();