/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2010 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2012 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
}
mdb->db_escape_string(jcr, esc, cr->Counter, strlen(cr->Counter));
/* Must create it */
- Mmsg(mdb->cmd, "INSERT INTO Counters (Counter,\"MinValue\",\"MaxValue\",CurrentValue,"
+ Mmsg(mdb->cmd, "INSERT INTO Counters (Counter,Counters.MinValue,Counters.MaxValue,CurrentValue,"
"WrapCounter) VALUES ('%s','%d','%d','%d','%s')",
esc, cr->MinValue, cr->MaxValue, cr->CurrentValue,
cr->WrapCounter);
}
if (!db_sql_query(jcr->db_batch,
- "INSERT INTO File (FileIndex, JobId, PathId, FilenameId, LStat, MD5, MarkId) "
+"INSERT INTO File (FileIndex, JobId, PathId, FilenameId, LStat, MD5, DeltaSeq) "
"SELECT batch.FileIndex, batch.JobId, Path.PathId, "
- "Filename.FilenameId,batch.LStat, batch.MD5, batch.MarkId "
+ "Filename.FilenameId,batch.LStat, batch.MD5, batch.DeltaSeq "
"FROM batch "
"JOIN Path ON (batch.Path = Path.Path) "
"JOIN Filename ON (batch.Name = Filename.Name)",
/* Must create it */
Mmsg(mdb->cmd,
"INSERT INTO File (FileIndex,JobId,PathId,FilenameId,"
- "LStat,MD5,MarkId) VALUES (%u,%u,%u,%u,'%s','%s',%u)",
+ "LStat,MD5,DeltaSeq) VALUES (%u,%u,%u,%u,'%s','%s',%u)",
ar->FileIndex, ar->JobId, ar->PathId, ar->FilenameId,
ar->attr, digest, ar->DeltaSeq);
"VALUES ('%s','%s','%s',%d,%d,%d,%d,%d,%d,%u)",
mdb->esc_name, esc_plug_name, mdb->esc_obj,
ro->object_len, ro->object_full_len, ro->object_index,
- FT_RESTORE_FIRST, ro->object_compression, ro->FileIndex, ro->JobId);
+ ro->FileType, ro->object_compression, ro->FileIndex, ro->JobId);
ro->RestoreObjectId = sql_insert_autokey_record(mdb, mdb->cmd, NT_("RestoreObject"));
if (ro->RestoreObjectId == 0) {