]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix SQL case problem that may cause the failure of DiskToCatalog
authorKern Sibbald <kern@sibbald.com>
Mon, 8 Sep 2008 19:21:34 +0000 (19:21 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 8 Sep 2008 19:21:34 +0000 (19:21 +0000)
     in bug #1149.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7567 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/patches/2.4.2-storename.patch [new file with mode: 0644]
bacula/patches/2.4.2-verifydisk.patch [new file with mode: 0644]
bacula/src/cats/sql_get.c
bacula/technotes-2.5

diff --git a/bacula/patches/2.4.2-storename.patch b/bacula/patches/2.4.2-storename.patch
new file mode 100644 (file)
index 0000000..bb20106
--- /dev/null
@@ -0,0 +1,25 @@
+
+  This patch fixes a missing storage name problem, which as far
+  as we can tell never created any problem.
+  Apply the patch to version 2.4.2 (and previous versions) with:
+
+  cd <bacula-source>
+  patch -p0 <2.4.2-storename.patch
+  ./configure <your-options>
+  make
+  ...
+  make install
+
+   
+Index: src/dird/msgchan.c
+===================================================================
+--- src/dird/msgchan.c (revision 7507)
++++ src/dird/msgchan.c (working copy)
+@@ -229,6 +229,7 @@
+       bash_spaces(pool_name);
+       foreach_alist(storage, rstore) {
+          Dmsg1(100, "Rstore=%s\n", storage->name());
++         pm_strcpy(store_name, storage->name());
+          bash_spaces(store_name);
+          pm_strcpy(media_type, storage->media_type);
+          bash_spaces(media_type);
diff --git a/bacula/patches/2.4.2-verifydisk.patch b/bacula/patches/2.4.2-verifydisk.patch
new file mode 100644 (file)
index 0000000..74bc1ed
--- /dev/null
@@ -0,0 +1,26 @@
+
+  This patch fixes a case problem in an SQL command, and could potentially
+  fix the DiskToCatalog problem reported in bug #1149.
+  Apply the patch to version 2.4.2 (and previous versions) with:
+
+  cd <bacula-source>
+  patch -p0 <2.4.2-verifydisk.patch
+  ./configure <your-options>
+  make
+  ...
+  make install
+
+   
+Index: src/cats/sql_get.c
+===================================================================
+--- src/cats/sql_get.c (revision 7507)
++++ src/cats/sql_get.c (working copy)
+@@ -109,7 +109,7 @@
+    Mmsg(mdb->cmd,
+ "SELECT FileId, LStat, MD5 FROM File,Job WHERE "
+ "File.JobId=Job.JobId AND File.PathId=%s AND "
+-"File.FilenameId=%s AND Job.Type='B' AND Job.JobSTATUS='T' AND "
++"File.FilenameId=%s AND Job.Type='B' AND Job.JobStatus='T' AND "
+ "ClientId=%s ORDER BY StartTime DESC LIMIT 1",
+       edit_int64(fdbr->PathId, ed1), 
+       edit_int64(fdbr->FilenameId, ed2), 
index 753f47864da16534c423770256ded5924ed01176..d778dac73f1fe96b2b4c7598fdb5521458738f52 100644 (file)
@@ -109,7 +109,7 @@ int db_get_file_record(JCR *jcr, B_DB *mdb, JOB_DBR *jr, FILE_DBR *fdbr)
       Mmsg(mdb->cmd,
 "SELECT FileId, LStat, MD5 FROM File,Job WHERE "
 "File.JobId=Job.JobId AND File.PathId=%s AND "
-"File.FilenameId=%s AND Job.Type='B' AND Job.JobSTATUS='T' AND "
+"File.FilenameId=%s AND Job.Type='B' AND Job.JobStatus='T' AND "
 "ClientId=%s ORDER BY StartTime DESC LIMIT 1",
       edit_int64(fdbr->PathId, ed1), 
       edit_int64(fdbr->FilenameId, ed2), 
index 68488fae35c7dcbef79979d602d2ed7313e06b54..cb69938cb6cb1973d2dd1a0180aca741d4524938 100644 (file)
@@ -62,6 +62,8 @@ remove reader/writer in FOPTS????
 
 General:
 08Sep08
+kes  Fix SQL case problem that may cause the failure of DiskToCatalog
+     in bug #1149.
 kes  First cut adding SD plugins.
 03Sep08
 kes  Add Slot if it is non-zero to writing bsr file after a