]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/sqlite.c
Fix get_basename() -- rewrite
[bacula/bacula] / bacula / src / cats / sqlite.c
index a859777ff755c028125a695b54feea19a698366a..e012a7fd8e62673ad3f5899612ec3a029d4e0e27 100644 (file)
@@ -112,6 +112,13 @@ B_DB_SQLITE::B_DB_SQLITE(JCR *jcr,
    esc_obj  = get_pool_memory(PM_FNAME);
    m_allow_transactions = mult_db_connections;
 
+   /* At this time, when mult_db_connections == true, this is for 
+    * specific console command such as bvfs or batch mode, and we don't
+    * want to share a batch mode or bvfs. In the future, we can change
+    * the creation function to add this parameter.
+    */
+   m_dedicated = mult_db_connections; 
+
    /*
     * Initialize the private members.
     */
@@ -675,7 +682,6 @@ bool B_DB_SQLITE::sql_batch_end(JCR *jcr, const char *error)
  */
 bool B_DB_SQLITE::sql_batch_insert(JCR *jcr, ATTR_DBR *ar)
 {
-   size_t len;
    const char *digest;
    char ed1[50];
 
@@ -691,10 +697,10 @@ bool B_DB_SQLITE::sql_batch_insert(JCR *jcr, ATTR_DBR *ar)
       digest = ar->Digest;
    }
 
-   len = Mmsg(cmd, "INSERT INTO batch VALUES "
-                   "(%u,%s,'%s','%s','%s','%s',%u)",
-                   ar->FileIndex, edit_int64(ar->JobId,ed1), esc_path,
-                   esc_name, ar->attr, digest, ar->DeltaSeq);
+   Mmsg(cmd, "INSERT INTO batch VALUES "
+        "(%u,%s,'%s','%s','%s','%s',%u)",
+        ar->FileIndex, edit_int64(ar->JobId,ed1), esc_path,
+        esc_name, ar->attr, digest, ar->DeltaSeq);
 
    return sql_query(cmd);
 }