static void print_catalog_details(CAT *catalog, const char *working_dir)
{
- POOLMEM *buf = get_pool_memory(PM_MESSAGE);
+ POOLMEM *catalog_details = get_pool_memory(PM_MESSAGE);
/*
* Instantiate a B_DB class and see what db_type gets assigned to it.
catalog->mult_db_connections,
catalog->disable_batch_insert);
if (db) {
- printf("%sdb_type=%s\nworking_dir=%s\n", catalog->display(buf),
+ printf("%sdb_type=%s\nworking_dir=%s\n", catalog->display(catalog_details),
db->db_get_type(), working_directory);
db_close_database(NULL, db);
}
- free_pool_memory(buf);
+ free_pool_memory(catalog_details);
}
static void do_interactive_mode()
static int get_name_handler(void *ctx, int num_fields, char **row)
{
- POOLMEM *buf = (POOLMEM *)ctx;
+ POOLMEM *name = (POOLMEM *)ctx;
+
if (row[0]) {
- pm_strcpy(&buf, row[0]);
+ pm_strcpy(&name, row[0]);
}
return 0;
}
static void eliminate_orphaned_path_records()
{
+ db_int64_ctx lctx;
+ lctx.count=0;
+ db_sql_query(db, "SELECT 1 FROM Job WHERE HasCache=1 LIMIT 1",
+ db_int64_handler, &lctx);
+
+ if (lctx.count == 1) {
+ printf(_("Pruning orphaned Path entries isn't possible when using BVFS.\n"));
+ return;
+ }
+
idx_tmp_name = NULL;
/*
* Check the existence of the required "one column" index
}
db_sql_query(db, buf, NULL, NULL);
}
+ free_pool_memory(name);
}
}
}
db_sql_query(db, buf, NULL, NULL);
}
+ free_pool_memory(name);
}
}