From: Kern Sibbald Date: Wed, 8 Oct 2008 10:29:52 +0000 (+0000) Subject: Commit migrate poolsize patch X-Git-Tag: Release-3.0.0~854 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=97e52ad4d078e4a45fc98d18087acdc1f006ca93;p=bacula%2Fbacula Commit migrate poolsize patch git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7730 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/patches/2.4.2-migrate-poolsize.patch b/bacula/patches/2.4.2-migrate-poolsize.patch new file mode 100644 index 0000000000..986ec97e31 --- /dev/null +++ b/bacula/patches/2.4.2-migrate-poolsize.patch @@ -0,0 +1,39 @@ + + This patch should correct bug #1159 where Migration does not properly + respect the Migration Low Bytes directive. + + Apply it to Bacula version 2.4.2 (or possibly earlier) with: + + cd + patch -p0 <2.4.2-migrate-poolsize.patch + ./configure + make + ... + make install + + +Index: src/dird/migrate.c +=================================================================== +--- src/dird/migrate.c (revision 7566) ++++ src/dird/migrate.c (working copy) +@@ -557,13 +557,16 @@ + " AND Job.Type='B'" + " ORDER by Job.StartTime"; + +-/* Get tne number of bytes in the pool */ ++/* Get the number of bytes in the pool */ + const char *sql_pool_bytes = +- "SELECT SUM(VolBytes) FROM Media,Pool WHERE" ++ "SELECT SUM(JobBytes) FROM Job WHERE JobId IN" ++ " (SELECT DISTINCT Job.JobId from Pool,Job,Media,JobMedia WHERE" ++ " Pool.Name='%s' AND Media.PoolId=Pool.PoolId AND" + " VolStatus in ('Full','Used','Error','Append') AND Media.Enabled=1 AND" +- " Media.PoolId=Pool.PoolId AND Pool.Name='%s'"; ++ " Job.Type='B' AND" ++ " JobMedia.JobId=Job.JobId AND Job.PoolId=Media.PoolId)"; + +-/* Get tne number of bytes in the Jobs */ ++/* Get the number of bytes in the Jobs */ + const char *sql_job_bytes = + "SELECT SUM(JobBytes) FROM Job WHERE JobId IN (%s)"; +