diff --git a/Makefile b/Makefile index 4dfe99606d..1635566ad2 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,8 @@ TESTS = \ TOOLS = \ manifest_dump \ - leveldb_shell + leveldb_shell \ + sst_dump PROGRAMS = db_bench $(TESTS) $(TOOLS) BENCHMARKS = db_bench_sqlite3 db_bench_tree_db @@ -190,6 +191,9 @@ manifest_dump: tools/manifest_dump.o $(LIBOBJECTS) filelock_test: util/filelock_test.o $(LIBOBJECTS) $(TESTHARNESS) $(CXX) util/filelock_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LDFLAGS) +sst_dump: tools/sst_dump.o $(LIBOBJECTS) + $(CXX) tools/sst_dump.o $(LIBOBJECTS) -o $@ $(LDFLAGS) + # recreate the version file with the latest git revision $(VERSIONFILE): build_detect_version $(shell ./build_detect_platform build_config.mk) diff --git a/db/version_set.cc b/db/version_set.cc index 78b82343d1..4e70b380ba 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -1042,13 +1042,13 @@ Status VersionSet::DumpManifest(Options& options, std::string& dscname) { last_sequence_ = last_sequence; log_number_ = log_number; prev_log_number_ = prev_log_number; - + printf("manifest_file_number %d next_file_number %d last_sequence %d log_number %d prev_log_number %d\n", - manifest_file_number_, next_file_number_, + manifest_file_number_, next_file_number_, last_sequence, log_number, prev_log_number); printf("%s \n", v->DebugString().c_str()); } - + return s; } diff --git a/tools/manifest_dump.cc b/tools/manifest_dump.cc index 5f4d272c62..58f206fe96 100644 --- a/tools/manifest_dump.cc +++ b/tools/manifest_dump.cc @@ -29,7 +29,7 @@ int main(int argc, char** argv) { // parse command line options int n; - char junk; + char junk; int foundfile = 0; std::string manifestfile; for (int i = 1; i < argc; i++) { @@ -58,7 +58,7 @@ int main(int argc, char** argv) { TableCache* tc = new TableCache(dbname, &options, 10); const InternalKeyComparator* cmp = new InternalKeyComparator(options.comparator); - VersionSet* versions = new VersionSet(dbname, &options, + VersionSet* versions = new VersionSet(dbname, &options, tc, cmp); Status s = versions->DumpManifest(options, file); if (!s.ok()) {