]> git.sur5r.net Git - bacula/bacula/commitdiff
Remove JobMedia.Copy references
authorEric Bollengier <eric@eb.homelinux.org>
Wed, 2 Dec 2009 16:40:21 +0000 (17:40 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Wed, 2 Dec 2009 16:40:33 +0000 (17:40 +0100)
bacula/src/cats/cats.h
bacula/src/cats/sql_create.c
bacula/src/cats/sql_get.c
bacula/src/cats/sql_list.c
bacula/src/dird/catreq.c

index 10034d6fec1f791952cd38a8438142302c63a1f7..6e8bb92420a836df5a7dbd5f72fe216d48b159a4 100644 (file)
@@ -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 */
 };
 
 
index 60fa3b1c3442c90e9c72284dbc8cd6a31213691d..e597d46609341b3c4a35fa7230552d8b2e49f926 100644 (file)
@@ -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)) {
index 340ebd039defc6ce110d27725a09a34245bf9081..9fd2da59e1cc1949c3adc2cdc48f871d9909626d 100644 (file)
@@ -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;
             }
index c2b22b82f0b72decf95109dc142523a553e18e3f..d5a59b69f7740e0dfb3060dfd02699dbb2efe84d 100644 (file)
@@ -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");
       }
 
index 7eb00aa4d9d4c940c1ada735946d2e3e3ddc5024..9337bf2d11e6825b6e71bd1ded8c2b8128c3335d 100644 (file)
@@ -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;