]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix SQL that fails on SQLite3 in bat reported by Andreas Piesk a.piesk@gmx.net
authorKern Sibbald <kern@sibbald.com>
Tue, 9 Feb 2010 18:09:52 +0000 (19:09 +0100)
committerKern Sibbald <kern@sibbald.com>
Tue, 9 Feb 2010 18:09:52 +0000 (19:09 +0100)
bacula/src/qt-console/mediainfo/mediainfo.cpp

index 7ff888cf56179fb3648333969e2d24e0a5fac628..77163346c0c30ceafc56043376845706a9ef59a6 100644 (file)
@@ -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)) {