本文整理汇总了C++中edit_int64函数的典型用法代码示例。如果您正苦于以下问题:C++ edit_int64函数的具体用法?C++ edit_int64怎么用?C++ edit_int64使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了edit_int64函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: update_vol_recyclepool
/* Modify the RecyclePool of a Volume */
void update_vol_recyclepool(UAContext *ua, char *val, MEDIA_DBR *mr)
{
POOL_DBR pr;
POOL_MEM query(PM_MESSAGE);
char ed1[50], ed2[50], *poolname;
if(val && *val) { /* update volume recyclepool="Scratch" */
/* If a pool name is given, look up the PoolId */
memset(&pr, 0, sizeof(pr));
bstrncpy(pr.Name, val, sizeof(pr.Name));
if (!get_pool_dbr(ua, &pr, NT_("recyclepool"))) {
return;
}
/* pool = select_pool_resource(ua); */
mr->RecyclePoolId = pr.PoolId; /* get the PoolId */
poolname = pr.Name;
} else { /* update volume recyclepool="" */
/* If no pool name is given, set the PoolId to 0 (the default) */
mr->RecyclePoolId = 0;
poolname = _("*None*");
}
db_lock(ua->db);
Mmsg(query, "UPDATE Media SET RecyclePoolId=%s WHERE MediaId=%s",
edit_int64(mr->RecyclePoolId, ed1), edit_int64(mr->MediaId, ed2));
if (!db_sql_query(ua->db, query.c_str(), NULL, NULL)) {
ua->error_msg("%s", db_strerror(ua->db));
} else {
ua->info_msg(_("New RecyclePool is: %s\n"), poolname);
}
db_unlock(ua->db);
}
示例2: send_volume_info_to_storage_daemon
static int send_volume_info_to_storage_daemon(JCR *jcr, BSOCK *sd, MEDIA_DBR *mr)
{
int status;
char ed1[50], ed2[50], ed3[50], ed4[50], ed5[50], ed6[50];
jcr->MediaId = mr->MediaId;
pm_strcpy(jcr->VolumeName, mr->VolumeName);
bash_spaces(mr->VolumeName);
status = sd->fsend(OK_media, mr->VolumeName, mr->VolJobs,
mr->VolFiles, mr->VolBlocks, edit_uint64(mr->VolBytes, ed1),
mr->VolMounts, mr->VolErrors, mr->VolWrites,
edit_uint64(mr->MaxVolBytes, ed2),
edit_uint64(mr->VolCapacityBytes, ed3),
mr->VolStatus, mr->Slot, mr->MaxVolJobs, mr->MaxVolFiles,
mr->InChanger,
edit_int64(mr->VolReadTime, ed4),
edit_int64(mr->VolWriteTime, ed5),
mr->EndFile, mr->EndBlock,
mr->LabelType,
edit_uint64(mr->MediaId, ed6),
mr->EncrKey, mr->MinBlocksize, mr->MaxBlocksize);
unbash_spaces(mr->VolumeName);
Dmsg2(100, "Vol Info for %s: %s", jcr->Job, sd->msg);
return status;
}
示例3: do_media_purge
/*
* This routine will purge (delete) all records
* associated with a particular Volume. It will
* not delete the media record itself.
* TODO: This function is broken and it doesn't purge
* File, BaseFiles, Log, ...
* We call it from relabel and delete volume=, both ensure
* that the volume is properly purged.
*/
static int do_media_purge(B_DB *mdb, MEDIA_DBR *mr)
{
POOLMEM *query = get_pool_memory(PM_MESSAGE);
struct s_del_ctx del;
char ed1[50];
int i;
del.num_ids = 0;
del.tot_ids = 0;
del.num_del = 0;
del.max_ids = 0;
Mmsg(mdb->cmd, "SELECT JobId from JobMedia WHERE MediaId=%d", mr->MediaId);
del.max_ids = mr->VolJobs;
if (del.max_ids < 100) {
del.max_ids = 100;
} else if (del.max_ids > MAX_DEL_LIST_LEN) {
del.max_ids = MAX_DEL_LIST_LEN;
}
del.JobId = (JobId_t *)malloc(sizeof(JobId_t) * del.max_ids);
db_sql_query(mdb, mdb->cmd, delete_handler, (void *)&del);
for (i=0; i < del.num_ids; i++) {
Dmsg1(400, "Delete JobId=%d\n", del.JobId[i]);
Mmsg(query, "DELETE FROM Job WHERE JobId=%s", edit_int64(del.JobId[i], ed1));
db_sql_query(mdb, query);
Mmsg(query, "DELETE FROM File WHERE JobId=%s", edit_int64(del.JobId[i], ed1));
db_sql_query(mdb, query);
Mmsg(query, "DELETE FROM JobMedia WHERE JobId=%s", edit_int64(del.JobId[i], ed1));
db_sql_query(mdb, query);
}
free(del.JobId);
free_pool_memory(query);
return 1;
}
示例4: update_vol_pool
/* Modify the Pool in which this Volume is located */
void update_vol_pool(UAContext *ua, char *val, MEDIA_DBR *mr, POOL_DBR *opr)
{
POOL_DBR pr;
POOL_MEM query(PM_MESSAGE);
char ed1[50], ed2[50];
memset(&pr, 0, sizeof(pr));
bstrncpy(pr.Name, val, sizeof(pr.Name));
if (!get_pool_dbr(ua, &pr)) {
return;
}
mr->PoolId = pr.PoolId; /* set new PoolId */
/*
*/
db_lock(ua->db);
Mmsg(query, "UPDATE Media SET PoolId=%s WHERE MediaId=%s",
edit_int64(mr->PoolId, ed1), edit_int64(mr->MediaId, ed2));
if (!db_sql_query(ua->db, query.c_str(), NULL, NULL)) {
ua->error_msg("%s", db_strerror(ua->db));
} else {
ua->info_msg(_("New Pool is: %s\n"), pr.Name);
opr->NumVols--;
if (!db_update_pool_record(ua->jcr, ua->db, opr)) {
ua->error_msg("%s", db_strerror(ua->db));
}
pr.NumVols++;
if (!db_update_pool_record(ua->jcr, ua->db, &pr)) {
ua->error_msg("%s", db_strerror(ua->db));
}
}
db_unlock(ua->db);
}
示例5: bdb_lock
/*
* Find last failed job since given start-time
* it must be either Full or Diff.
*
* Returns: false on failure
* true on success, jr is unchanged and stime unchanged
* level returned in JobLevel
*/
bool BDB::bdb_find_failed_job_since(JCR *jcr, JOB_DBR *jr, POOLMEM *stime, int &JobLevel)
{
SQL_ROW row;
char ed1[50], ed2[50];
char esc_name[MAX_ESCAPE_NAME_LENGTH];
bdb_lock();
bdb_escape_string(jcr, esc_name, jr->Name, strlen(jr->Name));
/* Differential is since last Full backup */
Mmsg(cmd,
"SELECT Level FROM Job WHERE JobStatus IN ('%c','%c', '%c', '%c') AND "
"Type='%c' AND Level IN ('%c','%c') AND Name='%s' AND ClientId=%s "
"AND FileSetId=%s AND StartTime>'%s' "
"ORDER BY StartTime DESC LIMIT 1",
JS_Canceled, JS_ErrorTerminated, JS_Error, JS_FatalError,
jr->JobType, L_FULL, L_DIFFERENTIAL, esc_name,
edit_int64(jr->ClientId, ed1), edit_int64(jr->FileSetId, ed2),
stime);
if (!QueryDB(jcr, cmd)) {
bdb_unlock();
return false;
}
if ((row = sql_fetch_row()) == NULL) {
sql_free_result();
bdb_unlock();
return false;
}
JobLevel = (int)*row[0];
sql_free_result();
bdb_unlock();
return true;
}
示例6: db_make_inchanger_unique
/*
* If we have a non-zero InChanger, ensure that no other Media
* record has InChanger set on the same Slot.
*
* This routine assumes the database is already locked.
*/
void
db_make_inchanger_unique(JCR *jcr, B_DB *mdb, MEDIA_DBR *mr)
{
char ed1[50], ed2[50];
char esc[MAX_ESCAPE_NAME_LENGTH];
if (mr->InChanger != 0 && mr->Slot != 0 && mr->StorageId != 0) {
if (mr->MediaId != 0) {
Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0, Slot=0 WHERE "
"Slot=%d AND StorageId=%s AND MediaId!=%s",
mr->Slot,
edit_int64(mr->StorageId, ed1), edit_int64(mr->MediaId, ed2));
} else if (*mr->VolumeName) {
mdb->db_escape_string(jcr, esc,mr->VolumeName,strlen(mr->VolumeName));
Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0, Slot=0 WHERE "
"Slot=%d AND StorageId=%s AND VolumeName!='%s'",
mr->Slot,
edit_int64(mr->StorageId, ed1), esc);
} else { /* used by ua_label to reset all volume with this slot */
Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0, Slot=0 WHERE "
"Slot=%d AND StorageId=%s",
mr->Slot,
edit_int64(mr->StorageId, ed1), mr->VolumeName);
}
Dmsg1(100, "%s\n", mdb->cmd);
UPDATE_DB_NO_AFR(jcr, mdb, mdb->cmd);
}
}
示例7: db_update_pool_record
bool db_update_pool_record(JCR *jcr, B_DB *mdb, POOL_DBR *pr)
{
bool retval;
char ed1[50], ed2[50], ed3[50], ed4[50], ed5[50], ed6[50];
char esc[MAX_ESCAPE_NAME_LENGTH];
db_lock(mdb);
mdb->db_escape_string(jcr, esc, pr->LabelFormat, strlen(pr->LabelFormat));
Mmsg(mdb->cmd, "SELECT count(*) from Media WHERE PoolId=%s",
edit_int64(pr->PoolId, ed4));
pr->NumVols = get_sql_record_max(jcr, mdb);
Dmsg1(400, "NumVols=%d\n", pr->NumVols);
Mmsg(mdb->cmd,
"UPDATE Pool SET NumVols=%u,MaxVols=%u,UseOnce=%d,UseCatalog=%d,"
"AcceptAnyVolume=%d,VolRetention='%s',VolUseDuration='%s',"
"MaxVolJobs=%u,MaxVolFiles=%u,MaxVolBytes=%s,Recycle=%d,"
"AutoPrune=%d,LabelType=%d,LabelFormat='%s',RecyclePoolId=%s,"
"ScratchPoolId=%s,ActionOnPurge=%d WHERE PoolId=%s",
pr->NumVols, pr->MaxVols, pr->UseOnce, pr->UseCatalog,
pr->AcceptAnyVolume, edit_uint64(pr->VolRetention, ed1),
edit_uint64(pr->VolUseDuration, ed2),
pr->MaxVolJobs, pr->MaxVolFiles,
edit_uint64(pr->MaxVolBytes, ed3),
pr->Recycle, pr->AutoPrune, pr->LabelType,
esc, edit_int64(pr->RecyclePoolId,ed5),
edit_int64(pr->ScratchPoolId,ed6),
pr->ActionOnPurge,
ed4);
retval = UPDATE_DB(jcr, mdb, mdb->cmd);
db_unlock(mdb);
return retval;
}
示例8: get_prune_list_for_volume
/*
* Get prune list for a volume
*/
int get_prune_list_for_volume(UAContext *ua, MEDIA_DBR *mr, del_ctx *del)
{
POOL_MEM query(PM_MESSAGE);
int count = 0;
utime_t now, period;
char ed1[50], ed2[50];
if (mr->Enabled == 2) {
return 0; /* cannot prune Archived volumes */
}
/*
* Now add to the list of JobIds for Jobs written to this Volume
*/
edit_int64(mr->MediaId, ed1);
period = mr->VolRetention;
now = (utime_t)time(NULL);
edit_int64(now-period, ed2);
Mmsg(query, sel_JobMedia, ed1, ed2);
Dmsg3(250, "Now=%d period=%d now-period=%s\n", (int)now, (int)period,
ed2);
Dmsg1(050, "Query=%s\n", query.c_str());
if (!db_sql_query(ua->db, query.c_str(), file_delete_handler, (void *)del)) {
if (ua->verbose) {
ua->error_msg("%s", db_strerror(ua->db));
}
Dmsg0(050, "Count failed\n");
goto bail_out;
}
count = exclude_running_jobs_from_list(del);
bail_out:
return count;
}
示例9: db_find_failed_job_since
/*
* Find last failed job since given start-time
* it must be either Full or Diff.
*
* Returns: false on failure
* true on success, jr is unchanged and stime unchanged
* level returned in JobLevel
*/
bool
db_find_failed_job_since(JCR *jcr, B_DB *mdb, JOB_DBR *jr, POOLMEM *stime, int &JobLevel)
{
SQL_ROW row;
char ed1[50], ed2[50];
db_lock(mdb);
/* Differential is since last Full backup */
Mmsg(mdb->cmd,
"SELECT Level FROM Job WHERE JobStatus!='T' AND Type='%c' AND "
"Level IN ('%c','%c') AND Name='%s' AND ClientId=%s "
"AND FileSetId=%s AND StartTime>'%s' "
"ORDER BY StartTime DESC LIMIT 1",
jr->JobType, L_FULL, L_DIFFERENTIAL, jr->Name,
edit_int64(jr->ClientId, ed1), edit_int64(jr->FileSetId, ed2),
stime);
if (!QUERY_DB(jcr, mdb, mdb->cmd)) {
db_unlock(mdb);
return false;
}
if ((row = sql_fetch_row(mdb)) == NULL) {
sql_free_result(mdb);
db_unlock(mdb);
return false;
}
JobLevel = (int)*row[0];
sql_free_result(mdb);
db_unlock(mdb);
return true;
}
示例10: db_update_job_start_record
/*
* Update the Job record at start of Job
*
* Returns: false on failure
* true on success
*/
bool db_update_job_start_record(JCR *jcr, B_DB *mdb, JOB_DBR *jr)
{
char dt[MAX_TIME_LENGTH];
time_t stime;
struct tm tm;
btime_t JobTDate;
bool retval;
char ed1[50], ed2[50], ed3[50], ed4[50], ed5[50];
stime = jr->StartTime;
(void)localtime_r(&stime, &tm);
strftime(dt, sizeof(dt), "%Y-%m-%d %H:%M:%S", &tm);
JobTDate = (btime_t)stime;
db_lock(mdb);
Mmsg(mdb->cmd, "UPDATE Job SET JobStatus='%c',Level='%c',StartTime='%s',"
"ClientId=%s,JobTDate=%s,PoolId=%s,FileSetId=%s WHERE JobId=%s",
(char)(jcr->JobStatus),
(char)(jr->JobLevel), dt,
edit_int64(jr->ClientId, ed1),
edit_uint64(JobTDate, ed2),
edit_int64(jr->PoolId, ed3),
edit_int64(jr->FileSetId, ed4),
edit_int64(jr->JobId, ed5));
retval = UPDATE_DB(jcr, mdb, mdb->cmd);
mdb->changes = 0;
db_unlock(mdb);
return retval;
}
示例11: db_find_failed_job_since
/*
* Find last failed job since given start-time
* it must be either Full or Diff.
*
* Returns: false on failure
* true on success, jr is unchanged and stime unchanged
* level returned in JobLevel
*/
bool db_find_failed_job_since(JCR *jcr, B_DB *mdb, JOB_DBR *jr, POOLMEM *stime, int &JobLevel)
{
bool retval = false;
SQL_ROW row;
char ed1[50], ed2[50];
char esc_name[MAX_ESCAPE_NAME_LENGTH];
db_lock(mdb);
mdb->db_escape_string(jcr, esc_name, jr->Name, strlen(jr->Name));
/* Differential is since last Full backup */
Mmsg(mdb->cmd,
"SELECT Level FROM Job WHERE JobStatus NOT IN ('T','W') AND "
"Type='%c' AND Level IN ('%c','%c') AND Name='%s' AND ClientId=%s "
"AND FileSetId=%s AND StartTime>'%s' "
"ORDER BY StartTime DESC LIMIT 1",
jr->JobType, L_FULL, L_DIFFERENTIAL, esc_name,
edit_int64(jr->ClientId, ed1), edit_int64(jr->FileSetId, ed2),
stime);
if (!QUERY_DB(jcr, mdb, mdb->cmd)) {
goto bail_out;
}
if ((row = sql_fetch_row(mdb)) == NULL) {
sql_free_result(mdb);
goto bail_out;
}
JobLevel = (int)*row[0];
sql_free_result(mdb);
retval = true;
bail_out:
db_unlock(mdb);
return retval;
}
示例12: db_find_last_jobid
/*
* Find JobId of last job that ran. E.g. for
* VERIFY_CATALOG we want the JobId of the last INIT.
* For VERIFY_VOLUME_TO_CATALOG, we want the JobId of the last Job.
*
* Returns: true on success
* false on failure
*/
bool
db_find_last_jobid(JCR *jcr, B_DB *mdb, const char *Name, JOB_DBR *jr)
{
SQL_ROW row;
char ed1[50];
/* Find last full */
db_lock(mdb);
Dmsg2(100, "JobLevel=%d JobType=%d\n", jr->JobLevel, jr->JobType);
if (jr->JobLevel == L_VERIFY_CATALOG) {
Mmsg(mdb->cmd,
"SELECT JobId FROM Job WHERE Type='V' AND Level='%c' AND "
" JobStatus IN ('T','W') AND Name='%s' AND "
"ClientId=%s ORDER BY StartTime DESC LIMIT 1",
L_VERIFY_INIT, jr->Name,
edit_int64(jr->ClientId, ed1));
} else if (jr->JobLevel == L_VERIFY_VOLUME_TO_CATALOG ||
jr->JobLevel == L_VERIFY_DISK_TO_CATALOG ||
jr->JobType == JT_BACKUP) {
if (Name) {
Mmsg(mdb->cmd,
"SELECT JobId FROM Job WHERE Type='B' AND JobStatus IN ('T','W') AND "
"Name='%s' ORDER BY StartTime DESC LIMIT 1", Name);
} else {
Mmsg(mdb->cmd,
"SELECT JobId FROM Job WHERE Type='B' AND JobStatus IN ('T','W') AND "
"ClientId=%s ORDER BY StartTime DESC LIMIT 1",
edit_int64(jr->ClientId, ed1));
}
} else {
Mmsg1(&mdb->errmsg, _("Unknown Job level=%d\n"), jr->JobLevel);
db_unlock(mdb);
return false;
}
Dmsg1(100, "Query: %s\n", mdb->cmd);
if (!QUERY_DB(jcr, mdb, mdb->cmd)) {
db_unlock(mdb);
return false;
}
if ((row = sql_fetch_row(mdb)) == NULL) {
Mmsg1(&mdb->errmsg, _("No Job found for: %s.\n"), mdb->cmd);
sql_free_result(mdb);
db_unlock(mdb);
return false;
}
jr->JobId = str_to_int64(row[0]);
sql_free_result(mdb);
Dmsg1(100, "db_get_last_jobid: got JobId=%d\n", jr->JobId);
if (jr->JobId <= 0) {
Mmsg1(&mdb->errmsg, _("No Job found for: %s\n"), mdb->cmd);
db_unlock(mdb);
return false;
}
db_unlock(mdb);
return true;
}
示例13: db_list_media_records
/*
* If VolumeName is non-zero, list the record for that Volume
* otherwise, list the Volumes in the Pool specified by PoolId
*/
void db_list_media_records(JCR *jcr, B_DB *mdb, MEDIA_DBR *mdbr,
OUTPUT_FORMATTER *sendit, e_list_type type)
{
char ed1[50];
char esc[MAX_ESCAPE_NAME_LENGTH];
db_lock(mdb);
mdb->db_escape_string(jcr, esc, mdbr->VolumeName, strlen(mdbr->VolumeName));
if (type == VERT_LIST) {
if (mdbr->VolumeName[0] != 0) {
Mmsg(mdb->cmd, "SELECT MediaId,VolumeName,Slot,PoolId,"
"MediaType,FirstWritten,LastWritten,LabelDate,VolJobs,"
"VolFiles,VolBlocks,VolMounts,VolBytes,VolErrors,VolWrites,"
"VolCapacityBytes,VolStatus,Enabled,Recycle,VolRetention,"
"VolUseDuration,MaxVolJobs,MaxVolFiles,MaxVolBytes,InChanger,"
"EndFile,EndBlock,LabelType,StorageId,DeviceId,"
"LocationId,RecycleCount,InitialWrite,ScratchPoolId,RecyclePoolId, "
"Comment"
" FROM Media WHERE Media.VolumeName='%s'", esc);
} else {
Mmsg(mdb->cmd, "SELECT MediaId,VolumeName,Slot,PoolId,"
"MediaType,FirstWritten,LastWritten,LabelDate,VolJobs,"
"VolFiles,VolBlocks,VolMounts,VolBytes,VolErrors,VolWrites,"
"VolCapacityBytes,VolStatus,Enabled,Recycle,VolRetention,"
"VolUseDuration,MaxVolJobs,MaxVolFiles,MaxVolBytes,InChanger,"
"EndFile,EndBlock,LabelType,StorageId,DeviceId,"
"LocationId,RecycleCount,InitialWrite,ScratchPoolId,RecyclePoolId, "
"Comment"
" FROM Media WHERE Media.PoolId=%s ORDER BY MediaId",
edit_int64(mdbr->PoolId, ed1));
}
} else {
if (mdbr->VolumeName[0] != 0) {
Mmsg(mdb->cmd, "SELECT MediaId,VolumeName,VolStatus,Enabled,"
"VolBytes,VolFiles,VolRetention,Recycle,Slot,InChanger,MediaType,LastWritten "
"FROM Media WHERE Media.VolumeName='%s'", esc);
} else {
Mmsg(mdb->cmd, "SELECT MediaId,VolumeName,VolStatus,Enabled,"
"VolBytes,VolFiles,VolRetention,Recycle,Slot,InChanger,MediaType,LastWritten "
"FROM Media WHERE Media.PoolId=%s ORDER BY MediaId",
edit_int64(mdbr->PoolId, ed1));
}
}
if (!QUERY_DB(jcr, mdb, mdb->cmd)) {
goto bail_out;
}
sendit->object_start("media");
list_result(jcr, mdb, sendit, type);
sendit->object_end("media");
sql_free_result(mdb);
bail_out:
db_unlock(mdb);
}
示例14: db_mark_file_record
/* Mark the file record as being visited during database
* verify compare. Stuff JobId into the MarkId field
*/
bool db_mark_file_record(JCR *jcr, B_DB *mdb, FileId_t FileId, JobId_t JobId)
{
bool retval;
char ed1[50], ed2[50];
db_lock(mdb);
Mmsg(mdb->cmd, "UPDATE File SET MarkId=%s WHERE FileId=%s",
edit_int64(JobId, ed1), edit_int64(FileId, ed2));
retval = UPDATE_DB(jcr, mdb, mdb->cmd);
db_unlock(mdb);
return retval;
}
示例15: db_update_job_end_record
/*
* Update the Job record at end of Job
*
* Returns: 0 on failure
* 1 on success
*/
int
db_update_job_end_record(JCR *jcr, B_DB *mdb, JOB_DBR *jr)
{
char dt[MAX_TIME_LENGTH];
char rdt[MAX_TIME_LENGTH];
time_t ttime;
struct tm tm;
int stat;
char ed1[30], ed2[30], ed3[50], ed4[50];
btime_t JobTDate;
char PriorJobId[50];
if (jr->PriorJobId) {
bstrncpy(PriorJobId, edit_int64(jr->PriorJobId, ed1), sizeof(PriorJobId));
} else {
bstrncpy(PriorJobId, "0", sizeof(PriorJobId));
}
ttime = jr->EndTime;
(void)localtime_r(&ttime, &tm);
strftime(dt, sizeof(dt), "%Y-%m-%d %H:%M:%S", &tm);
if (jr->RealEndTime == 0) {
jr->RealEndTime = jr->EndTime;
}
ttime = jr->RealEndTime;
(void)localtime_r(&ttime, &tm);
strftime(rdt, sizeof(rdt), "%Y-%m-%d %H:%M:%S", &tm);
JobTDate = ttime;
db_lock(mdb);
Mmsg(mdb->cmd,
"UPDATE Job SET JobStatus='%c',EndTime='%s',"
"ClientId=%u,JobBytes=%s,ReadBytes=%s,JobFiles=%u,JobErrors=%u,VolSessionId=%u,"
"VolSessionTime=%u,PoolId=%u,FileSetId=%u,JobTDate=%s,"
"RealEndTime='%s',PriorJobId=%s,HasBase=%u,PurgedFiles=%u WHERE JobId=%s",
(char)(jr->JobStatus), dt, jr->ClientId, edit_uint64(jr->JobBytes, ed1),
edit_uint64(jr->ReadBytes, ed4),
jr->JobFiles, jr->JobErrors, jr->VolSessionId, jr->VolSessionTime,
jr->PoolId, jr->FileSetId, edit_uint64(JobTDate, ed2),
rdt, PriorJobId, jr->HasBase, jr->PurgedFiles,
edit_int64(jr->JobId, ed3));
stat = UPDATE_DB(jcr, mdb, mdb->cmd);
db_unlock(mdb);
return stat;
}