]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/sql_create.c
Split messages line by line before sending it to syslog() fix #3325
[bacula/bacula] / bacula / src / cats / sql_create.c
index 53b4a690bcad2c93f791d9f1957ce81a9dfcc341..5c8ec87dde62bdb760724abf56f8ae94e2eb1a00 100644 (file)
@@ -849,9 +849,9 @@ bool db_write_batch_file_records(JCR *jcr)
    }
    
    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)",
@@ -866,6 +866,7 @@ bool db_write_batch_file_records(JCR *jcr)
 
 bail_out:
    db_sql_query(jcr->db_batch, "DROP TABLE batch", NULL,NULL);
+   jcr->batch_started = false;
 
    return retval;
 }
@@ -984,7 +985,7 @@ static int db_create_file_record(JCR *jcr, B_DB *mdb, ATTR_DBR *ar)
    /* 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);
 
@@ -1070,7 +1071,7 @@ bool db_create_attributes_record(JCR *jcr, B_DB *mdb, ATTR_DBR *ar)
    } else if (jcr->HasBase) {
       ret = db_create_base_file_attributes_record(jcr, mdb, ar);
    } else {
-      Jmsg0(jcr, M_FATAL, 0, _("Can't Copy/Migrate job using BaseJob"));
+      Jmsg0(jcr, M_FATAL, 0, _("Cannot Copy/Migrate job using BaseJob"));
       ret = true;               /* in copy/migration what do we do ? */
    }