From: Kern Sibbald Date: Tue, 9 Feb 2010 18:09:52 +0000 (+0100) Subject: Fix SQL that fails on SQLite3 in bat reported by Andreas Piesk a.piesk@gmx.net X-Git-Tag: Release-5.2.1~1785 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e9dec7eef8407c125ddb799d2f7183cd45a1081f;p=bacula%2Fbacula Fix SQL that fails on SQLite3 in bat reported by Andreas Piesk a.piesk@gmx.net --- 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)) {