Luke Reeves wrote: > -----BEGIN PGP SIGNED MESSAGE----- > 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: SELECT MAX(MediaId) 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. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel