[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] Automatic labeling (bug 1014)

Luke Reeves wrote:
> Hash: SHA1
> Greetings all.  I've been working at tracking down what I thought was a
> bug in Bacula.  Automatic volume labels prior to Bacula 2.2.5 were based
> on the number of volumes in the pool where the new media is created and
> in that version a change was made so that the incremental component of
> the label was based on the maximum media ID across all volumes.  The
> original behavior is restored by slightly modifying the SQL in newvol.c:
> SELECT MAX(MediaId) FROM Media,Pool WHERE Pool.PoolId=%s

A side note: I think there should be another condition in there. 
Something like:

   FROM Media,Pool
WHERE Pool.PoolId=%s
   AND media.poolid = pool.poolid

I am not questioning your quote.  I'm questioning the original SQL.  :)

Dan Langille

BSDCan - The Technical BSD Conference : http://www.bsdcan.org/
PGCon  - The PostgreSQL Conference:     http://www.pgcon.org/

This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
Bacula-devel mailing list

This mailing list archive is a service of Copilotco.