From: Andreas P. <a....@gm...> - 2010-02-08 18:09:45
|
Eric Bollengier schrieb: > > What sqlite version are you using ? > the version provided by bacula srpm, in depkgs18Dec09 itself: config.log: $ ./configure --build=x86_64-redhat-linux-gnu .. --with-sqlite3=/usr/src/redhat/BUILD/bacula-5.0.0/../depkgs/sqlite3 .. # rpm -qf /usr/lib64/bacula/sqlite/sqlite3 bacula-sqlite-5.0.0-1 # /usr/lib64/bacula/sqlite/sqlite3 -version 3.6.10 # cat a SELECT MediaId, VolumeName, Pool.Name, MediaType, FirstWritten, 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 FROM Media JOIN Pool USING (PoolId) LEFT JOIN Pool AS RecyclePool ON (Media.RecyclePoolId = RecyclePool.PoolId) LEFT JOIN Location USING (LocationId) WHERE Media.VolumeName = 'volume100'; # cat a | /usr/lib64/bacula/sqlite/sqlite3 /var/lib/bacula/bacula.db SQL error near line 1: cannot join using column LocationId - column not present in both tables # cat b SELECT MediaId, VolumeName, Pool.Name, MediaType, FirstWritten, 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 FROM Media JOIN Pool USING (PoolId) LEFT JOIN Pool AS RecyclePool ON (Media.RecyclePoolId = RecyclePool.PoolId) LEFT JOIN Location ON (Media.LocationId = Location.LocationId) WHERE Media.VolumeName = 'volume100'; # cat b | /usr/lib64/bacula/sqlite/sqlite3 /var/lib/bacula/bacula.db 109|volume100|Daily|File|2010-02-01 23:05:03|2010-02-01 23:13:37|28|1073737891|1||Full|Default|1|0|71|0|1|0|1073741824|864000|0|0 i get the same results using the installed version of sqlite: # /usr/bin/sqlite3 -version 3.3.6 # cat a | /usr/bin/sqlite3 /var/lib/bacula/bacula.db SQL error: cannot join using column LocationId - column not present in both tables # cat b | /usr/bin/sqlite3 /var/lib/bacula/bacula.db 109|volume100|Daily|File|2010-02-01 23:05:03|2010-02-01 23:13:37|28|1073737891|1||Full|Default|1|0|71|0|1|0|1073741824|864000|0|0 regards, -ap |