From 73ada5feb4f32d189c348c91ef2ebb411c7f21dc Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 9 Feb 2010 19:09:52 +0100 Subject: [PATCH] Fix SQL that fails on SQLite3 in bat reported by Andreas Piesk a.piesk@gmx.net --- bacula/src/qt-console/mediainfo/mediainfo.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bacula/src/qt-console/mediainfo/mediainfo.cpp b/bacula/src/qt-console/mediainfo/mediainfo.cpp index 7ff888cf56..77163346c0 100644 --- a/bacula/src/qt-console/mediainfo/mediainfo.cpp +++ b/bacula/src/qt-console/mediainfo/mediainfo.cpp @@ -138,12 +138,12 @@ void MediaInfo::populateForm() "LastWritten, VolMounts, VolBytes, Media.Enabled," "Location.Location, VolStatus, RecyclePool.Name, Media.Recycle, " "VolReadTime/1000000, VolWriteTime/1000000, Media.VolUseDuration, " - "Media.MaxVolJobs, " - "Media.MaxVolFiles, Media.MaxVolBytes, Media.VolRetention,InChanger,Slot " + "Media.MaxVolJobs, Media.MaxVolFiles, Media.MaxVolBytes, " + "Media.VolRetention,InChanger,Slot " "FROM Media JOIN Pool USING (PoolId) LEFT JOIN Pool AS RecyclePool " - "ON (Media.RecyclePoolId = RecyclePool.PoolId) " - "LEFT JOIN Location USING (LocationId) " - "WHERE Media.VolumeName = '" + m_mediaName + "'"; + "ON (Media.RecyclePoolId=RecyclePool.PoolId) " + "LEFT JOIN Location ON (Media.LocationId=Location.LocationId) " + "WHERE Media.VolumeName='" + m_mediaName + "'"; QStringList results; if (m_console->sql_cmd(query, results)) { -- 2.39.5