]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Fix spurious warning message printed when creating a volume with
authorKern Sibbald <kern@sibbald.com>
Sat, 13 Oct 2007 16:46:27 +0000 (16:46 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 13 Oct 2007 16:46:27 +0000 (16:46 +0000)
     a LabelFormat. This fixes bug #976.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@5750 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/patches/2.2.5-nextvol.patch [new file with mode: 0644]
bacula/src/dird/newvol.c
bacula/technotes-2.1

diff --git a/bacula/patches/2.2.5-nextvol.patch b/bacula/patches/2.2.5-nextvol.patch
new file mode 100644 (file)
index 0000000..27bf0d5
--- /dev/null
@@ -0,0 +1,29 @@
+
+  This bug fixes the warning message that prints each time an automatic
+  Volume name is created.  This fixes bug #979
+
+  This patch applies to Bacula version 2.2.5 (not to previous versions),
+  and can be applied with the following:
+
+  cd <bacula-source>
+  patch -p0 <2.2.5-newvol.patch
+  ./configure (your options)
+  make
+  ...
+  make install
+
+
+
+Index: src/dird/newvol.c
+===================================================================
+--- src/dird/newvol.c  (revision 5717)
++++ src/dird/newvol.c  (working copy)
+@@ -124,7 +124,7 @@
+    mr->VolumeName[0] = 0;
+    bstrncpy(name, pr->LabelFormat, sizeof(name));
+    ctx.value = 0;
+-   Mmsg(query, "SELECT MAX(MediaId) FROM Media,POOL WHERE Pool.PoolId=%s", 
++   Mmsg(query, "SELECT MAX(MediaId) FROM Media,Pool WHERE Pool.PoolId=%s", 
+         edit_int64(pr->PoolId, ed1));
+    if (!db_sql_query(jcr->db, query.c_str(), db_int64_handler, (void *)&ctx)) {
+       Jmsg(jcr, M_WARNING, 0, _("SQL failed, but ignored. ERR=%s\n"), db_strerror(jcr->db));
index c66b8133258fb70711a16d4c9af125535cf243af..b15ade839d102e66c9ac2e3b15652acb9290b936 100644 (file)
@@ -124,7 +124,7 @@ static bool create_simple_name(JCR *jcr, MEDIA_DBR *mr, POOL_DBR *pr)
    mr->VolumeName[0] = 0;
    bstrncpy(name, pr->LabelFormat, sizeof(name));
    ctx.value = 0;
-   Mmsg(query, "SELECT MAX(MediaId) FROM Media,POOL WHERE Pool.PoolId=%s", 
+   Mmsg(query, "SELECT MAX(MediaId) FROM Media,Pool WHERE Pool.PoolId=%s", 
         edit_int64(pr->PoolId, ed1));
    if (!db_sql_query(jcr->db, query.c_str(), db_int64_handler, (void *)&ctx)) {
       Jmsg(jcr, M_WARNING, 0, _("SQL failed, but ignored. ERR=%s\n"), db_strerror(jcr->db));
index 78363a0c2399abf087fdf35a7e3e3d9704bfc97c..3b5813ae982d578aff4bc6e1606ad51df89cd45a 100644 (file)
@@ -1,6 +1,11 @@
               Technical notes on version 2.2
 
 General:
+12Oct07
+kes  Fix spurious warning message printed when creating a volume with
+     a LabelFormat. This fixes bug #976.
+
+Release Version 2.2.5
 09Oct07
 kes  Add JobId in place of Job name in all the Jmsg() output.  
 kes  Correct the APP_DESC for the Win32 storage service (remove an e).