Skip to content

Commit

Permalink
adding ClientId to batch insert into file table
Browse files Browse the repository at this point in the history
  • Loading branch information
aussendorf committed Sep 10, 2018
1 parent 9996f15 commit 8d9fe04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/cats/sql_create.cc
Expand Up @@ -861,11 +861,11 @@ bool BareosDb::WriteBatchFileRecords(JobControlRecord *jcr)
}

if (!jcr->db_batch->SqlQuery(
"INSERT INTO File (FileIndex, JobId, PathId, Name, LStat, MD5, DeltaSeq, Fhinfo, Fhnode) "
"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.Name, batch.LStat, batch.MD5, batch.DeltaSeq, batch.Fhinfo, batch.Fhnode, %u "
"FROM batch "
"JOIN Path ON (batch.Path = Path.Path) ")) {
"JOIN Path ON (batch.Path = Path.Path) ", jcr->ClientId)) {
Jmsg1(jcr, M_FATAL, 0, "Fill File table %s\n", errmsg);
goto bail_out;
}
Expand Down

0 comments on commit 8d9fe04

Please sign in to comment.