From: Eric Bollengier Date: Wed, 2 Dec 2009 16:40:21 +0000 (+0100) Subject: Remove JobMedia.Copy references X-Git-Tag: Release-7.0.0~2528 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cd62965da0d2c661657f4ecc284bbe58aa701a81;p=bacula%2Fbacula Remove JobMedia.Copy references --- diff --git a/bacula/src/cats/cats.h b/bacula/src/cats/cats.h index 10034d6fec..6e8bb92420 100644 --- a/bacula/src/cats/cats.h +++ b/bacula/src/cats/cats.h @@ -835,7 +835,7 @@ struct JOBMEDIA_DBR { uint32_t EndFile; /* End file on Volume */ uint32_t StartBlock; /* start block on tape */ uint32_t EndBlock; /* last block */ - uint32_t Copy; /* identical copy */ +// uint32_t Copy; /* identical copy */ }; diff --git a/bacula/src/cats/sql_create.c b/bacula/src/cats/sql_create.c index 60fa3b1c34..e597d46609 100644 --- a/bacula/src/cats/sql_create.c +++ b/bacula/src/cats/sql_create.c @@ -132,13 +132,12 @@ db_create_jobmedia_record(JCR *jcr, B_DB *mdb, JOBMEDIA_DBR *jm) */ Mmsg(mdb->cmd, "INSERT INTO JobMedia (JobId,MediaId,FirstIndex,LastIndex," - "StartFile,EndFile,StartBlock,EndBlock,VolIndex,Copy) " - "VALUES (%s,%s,%u,%u,%u,%u,%u,%u,%u,%u)", + "StartFile,EndFile,StartBlock,EndBlock,VolIndex) " + "VALUES (%s,%s,%u,%u,%u,%u,%u,%u,%u)", edit_int64(jm->JobId, ed1), edit_int64(jm->MediaId, ed2), jm->FirstIndex, jm->LastIndex, - jm->StartFile, jm->EndFile, jm->StartBlock, jm->EndBlock,count, - jm->Copy); + jm->StartFile, jm->EndFile, jm->StartBlock, jm->EndBlock,count); Dmsg0(300, mdb->cmd); if (!INSERT_DB(jcr, mdb, mdb->cmd)) { diff --git a/bacula/src/cats/sql_get.c b/bacula/src/cats/sql_get.c index 340ebd039d..9fd2da59e1 100644 --- a/bacula/src/cats/sql_get.c +++ b/bacula/src/cats/sql_get.c @@ -428,7 +428,7 @@ int db_get_job_volume_parameters(JCR *jcr, B_DB *mdb, JobId_t JobId, VOL_PARAMS db_lock(mdb); Mmsg(mdb->cmd, "SELECT VolumeName,MediaType,FirstIndex,LastIndex,StartFile," -"JobMedia.EndFile,StartBlock,JobMedia.EndBlock,Copy," +"JobMedia.EndFile,StartBlock,JobMedia.EndBlock," "Slot,StorageId,InChanger" " FROM JobMedia,Media WHERE JobMedia.JobId=%s" " AND JobMedia.MediaId=Media.MediaId ORDER BY VolIndex,JobMediaId", @@ -467,10 +467,9 @@ int db_get_job_volume_parameters(JCR *jcr, B_DB *mdb, JobId_t JobId, VOL_PARAMS EndBlock = str_to_uint64(row[7]); Vols[i].StartAddr = (((uint64_t)StartFile)<<32) | StartBlock; Vols[i].EndAddr = (((uint64_t)EndFile)<<32) | EndBlock; -// Vols[i].Copy = str_to_uint64(row[8]); - Vols[i].Slot = str_to_uint64(row[9]); - StorageId = str_to_uint64(row[10]); - Vols[i].InChanger = str_to_uint64(row[11]); + Vols[i].Slot = str_to_uint64(row[8]); + StorageId = str_to_uint64(row[9]); + Vols[i].InChanger = str_to_uint64(row[10]); Vols[i].Storage[0] = 0; SId[i] = StorageId; } diff --git a/bacula/src/cats/sql_list.c b/bacula/src/cats/sql_list.c index c2b22b82f0..d5a59b69f7 100644 --- a/bacula/src/cats/sql_list.c +++ b/bacula/src/cats/sql_list.c @@ -210,13 +210,13 @@ void db_list_jobmedia_records(JCR *jcr, B_DB *mdb, uint32_t JobId, if (JobId > 0) { /* do by JobId */ Mmsg(mdb->cmd, "SELECT JobMediaId,JobId,Media.MediaId,Media.VolumeName," "FirstIndex,LastIndex,StartFile,JobMedia.EndFile,StartBlock," - "JobMedia.EndBlock,Copy " + "JobMedia.EndBlock " "FROM JobMedia,Media WHERE Media.MediaId=JobMedia.MediaId " "AND JobMedia.JobId=%s", edit_int64(JobId, ed1)); } else { Mmsg(mdb->cmd, "SELECT JobMediaId,JobId,Media.MediaId,Media.VolumeName," "FirstIndex,LastIndex,StartFile,JobMedia.EndFile,StartBlock," - "JobMedia.EndBlock,Copy " + "JobMedia.EndBlock " "FROM JobMedia,Media WHERE Media.MediaId=JobMedia.MediaId"); } diff --git a/bacula/src/dird/catreq.c b/bacula/src/dird/catreq.c index 7eb00aa4d9..9337bf2d11 100644 --- a/bacula/src/dird/catreq.c +++ b/bacula/src/dird/catreq.c @@ -110,7 +110,7 @@ void catalog_request(JCR *jcr, BSOCK *bs) int index, ok, label, writing; POOLMEM *omsg; POOL_DBR pr; - uint32_t Stripe; + uint32_t Stripe, Copy; uint64_t MediaId; utime_t VolFirstWritten; utime_t VolLastWritten; @@ -326,7 +326,7 @@ void catalog_request(JCR *jcr, BSOCK *bs) */ } else if (sscanf(bs->msg, Create_job_media, &Job, &jm.FirstIndex, &jm.LastIndex, &jm.StartFile, &jm.EndFile, - &jm.StartBlock, &jm.EndBlock, &jm.Copy, &Stripe, &MediaId) == 10) { + &jm.StartBlock, &jm.EndBlock, &Copy, &Stripe, &MediaId) == 10) { if (jcr->mig_jcr) { jm.JobId = jcr->mig_jcr->JobId;