Skip to content

Commit

Permalink
another try with function for clientid
Browse files Browse the repository at this point in the history
  • Loading branch information
aussendorf committed Sep 18, 2018
1 parent 677ae3b commit ca3be49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions core/src/cats/dbi.cc
Expand Up @@ -1219,7 +1219,6 @@ bool BareosDbDBI::SqlBatchStart(JobControlRecord *jcr)
"Name varchar,"
"LStat varchar,"
"MD5 varchar,"
"ClientId int,"
"DeltaSeq int)")) {
Dmsg0(500, "SqlBatchStart failed\n");
goto bail_out;
Expand Down Expand Up @@ -1386,7 +1385,7 @@ bool BareosDbDBI::SqlBatchInsert(JobControlRecord *jcr, AttributesDbRecord *ar)
postgresql_copy_escape(esc_path, path, pnl);
len = Mmsg(cmd, "%u\t%s\t%s\t%s\t%s\t%s\t%u\n",
ar->FileIndex, edit_int64(ar->JobId, ed1), esc_path,
esc_name, ar->attr, digest, ar->ClientId, ar->DeltaSeq);
esc_name, ar->attr, digest, ar->DeltaSeq);

/*
* libdbi don't support CopyData and we need call a postgresql
Expand Down
2 changes: 1 addition & 1 deletion core/src/cats/sql_create.cc
Expand Up @@ -863,7 +863,7 @@ bool BareosDb::WriteBatchFileRecords(JobControlRecord *jcr)
if (!jcr->db_batch->SqlQuery(
"INSERT INTO File (FileIndex, JobId, PathId, Name, LStat, MD5, DeltaSeq, Fhinfo, Fhnode, ClientId) "
"SELECT batch.FileIndex, batch.JobId, Path.PathId, "
"batch.Name, batch.LStat, batch.MD5, batch.DeltaSeq, batch.Fhinfo, batch.Fhnode, batch.ClientId "
"batch.Name, batch.LStat, batch.MD5, batch.DeltaSeq, batch.Fhinfo, batch.Fhnode, client_of_job (batch.JobId) "
"FROM batch "
"JOIN Path ON (batch.Path = Path.Path) ")) {
Jmsg1(jcr, M_FATAL, 0, "Fill File table %s\n", errmsg);
Expand Down

0 comments on commit ca3be49

Please sign in to comment.