diff -Naur cvs/src/cats/cats.h my/src/cats/cats.h
--- cvs/src/cats/cats.h 2006-12-06 15:11:53.000000000 +0100
-+++ my/src/cats/cats.h 2006-12-14 21:11:40.000000000 +0100
++++ my/src/cats/cats.h 2007-01-10 19:21:42.000000000 +0100
@@ -141,6 +141,7 @@
POOLMEM *fname; /* Filename only */
POOLMEM *path; /* Path only */
diff -Naur cvs/src/cats/mysql.c my/src/cats/mysql.c
--- cvs/src/cats/mysql.c 2006-12-09 14:41:50.000000000 +0100
-+++ my/src/cats/mysql.c 2006-12-16 19:18:17.000000000 +0100
++++ my/src/cats/mysql.c 2007-01-10 19:21:42.000000000 +0100
@@ -121,6 +121,7 @@
mdb->fname = get_pool_memory(PM_FNAME);
mdb->path = get_pool_memory(PM_FNAME);
+
diff -Naur cvs/src/cats/postgresql.c my/src/cats/postgresql.c
--- cvs/src/cats/postgresql.c 2006-12-06 15:11:53.000000000 +0100
-+++ my/src/cats/postgresql.c 2006-12-14 20:28:28.000000000 +0100
++++ my/src/cats/postgresql.c 2007-01-10 19:25:47.000000000 +0100
@@ -124,6 +124,7 @@
mdb->fname = get_pool_memory(PM_FNAME);
mdb->path = get_pool_memory(PM_FNAME);
if (mdb->db_name) {
free(mdb->db_name);
}
-@@ -538,5 +540,201 @@
+@@ -538,5 +540,202 @@
return id;
}
+ int count=30;
+ size_t len;
+ char *digest;
++ char ed1[50];
+
+ mdb->esc_name = check_pool_memory_size(mdb->esc_name, mdb->fnl*2+1);
+ my_postgresql_copy_escape(mdb->esc_name, mdb->fname, mdb->fnl);
+ digest = ar->Digest;
+ }
+
-+ len = Mmsg(mdb->cmd, "%u\t%u\t%s\t%s\t%s\t%s\n",
-+ ar->FileIndex, ar->JobId, mdb->path,
++ len = Mmsg(mdb->cmd, "%u\t%s\t%s\t%s\t%s\t%s\n",
++ ar->FileIndex, edit_int64(ar->JobId, ed1), mdb->path,
+ mdb->fname, ar->attr, digest);
+
+ do {
#endif /* HAVE_POSTGRESQL */
diff -Naur cvs/src/cats/protos.h my/src/cats/protos.h
--- cvs/src/cats/protos.h 2006-12-06 15:11:53.000000000 +0100
-+++ my/src/cats/protos.h 2006-12-13 19:03:46.000000000 +0100
++++ my/src/cats/protos.h 2007-01-10 19:21:42.000000000 +0100
@@ -67,6 +67,10 @@
bool db_create_device_record(JCR *jcr, B_DB *mdb, DEVICE_DBR *dr);
bool db_create_storage_record(JCR *jcr, B_DB *mdb, STORAGE_DBR *sr);
int db_delete_pool_record(JCR *jcr, B_DB *db, POOL_DBR *pool_dbr);
diff -Naur cvs/src/cats/sql_create.c my/src/cats/sql_create.c
--- cvs/src/cats/sql_create.c 2006-12-06 15:11:53.000000000 +0100
-+++ my/src/cats/sql_create.c 2006-12-14 22:06:41.000000000 +0100
-@@ -664,9 +664,207 @@
++++ my/src/cats/sql_create.c 2007-01-10 21:46:59.000000000 +0100
+@@ -664,9 +664,208 @@
* };
*/
+{
+ size_t len;
+ char *digest;
++ char edi1[50];
+
+ mdb->esc_name = check_pool_memory_size(mdb->esc_name, mdb->fnl*2+1);
+ db_escape_string(mdb->esc_name, mdb->fname, mdb->fnl);
+ digest = ar->Digest;
+ }
+
-+ len = Mmsg(mdb->cmd, "INSERT INTO batch VALUES (%u,%u,'%s','%s','%s','%s')",
-+ ar->FileIndex, ar->JobId, mdb->path,
++ len = Mmsg(mdb->cmd, "INSERT INTO batch VALUES (%u,%s,'%s','%s','%s','%s')",
++ ar->FileIndex, edit_int64(ar->JobId,ed1), mdb->path,
+ mdb->fname, ar->attr, digest);
+
+ sql_query(mdb, mdb->cmd);
* Create File record in B_DB
*
* In order to reduce database size, we store the File attributes,
-@@ -721,6 +919,8 @@
+@@ -721,6 +920,8 @@
return 0;
}
* The filename and path records have already been created.
diff -Naur cvs/src/cats/sqlite.c my/src/cats/sqlite.c
--- cvs/src/cats/sqlite.c 2006-12-06 15:11:53.000000000 +0100
-+++ my/src/cats/sqlite.c 2006-12-14 22:30:35.000000000 +0100
++++ my/src/cats/sqlite.c 2007-01-10 19:21:42.000000000 +0100
@@ -108,6 +108,7 @@
mdb->fname = get_pool_memory(PM_FNAME);
mdb->path = get_pool_memory(PM_FNAME);
#endif /* HAVE_SQLITE */
diff -Naur cvs/src/dird/backup.c my/src/dird/backup.c
--- cvs/src/dird/backup.c 2006-12-13 11:57:52.000000000 +0100
-+++ my/src/dird/backup.c 2006-12-13 19:03:46.000000000 +0100
++++ my/src/dird/backup.c 2007-01-10 19:21:42.000000000 +0100
@@ -233,6 +233,9 @@
/* Pickup Job termination data */
return true;
diff -Naur cvs/src/dird/jobq.c my/src/dird/jobq.c
--- cvs/src/dird/jobq.c 2006-11-24 11:29:37.000000000 +0100
-+++ my/src/dird/jobq.c 2006-12-13 19:03:46.000000000 +0100
++++ my/src/dird/jobq.c 2007-01-10 19:21:42.000000000 +0100
@@ -563,6 +563,10 @@
db_close_database(jcr, jcr->db);
jcr->db = NULL;
jcr->SDJobStatus = 0;
V(jq->mutex); /* release internal lock */
diff -Naur cvs/src/jcr.h my/src/jcr.h
---- cvs/src/jcr.h 2006-12-12 21:03:36.000000000 +0100
-+++ my/src/jcr.h 2006-12-13 19:03:46.000000000 +0100
+--- cvs/src/jcr.h 2006-12-19 21:57:38.000000000 +0100
++++ my/src/jcr.h 2007-01-10 19:21:42.000000000 +0100
@@ -184,6 +184,7 @@
bool cached_attribute; /* set if attribute is cached */
POOLMEM *attr; /* Attribute string from SD */