From e6789128c694b949fa3639be6fa8b57c1ff60e63 Mon Sep 17 00:00:00 2001 From: timrc Date: Mon, 14 Jul 2014 19:25:24 -0700 Subject: [PATCH] Stop mdbm_bench on create if user specifies create but no-load. --- src/tools/mdbm_bench.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tools/mdbm_bench.c b/src/tools/mdbm_bench.c index 42f57c4..b9b9756 100644 --- a/src/tools/mdbm_bench.c +++ b/src/tools/mdbm_bench.c @@ -918,7 +918,7 @@ Options:\n\ -a Set record alignment (default is byte alignment)\n\ -B Enable backing store\n\ direct Use O_DIRECT when accessing backing-store files\n\ - file= Enable file-based backing store at \n\ + file= Enable file-based backing store at (DEPRECATED)\n\ lock Use mdbm normal (db) locking\n\ mdbm= Enable mdbm-based backing store at \n\ nolock Use no mdbm locking\n\ @@ -1564,6 +1564,10 @@ main (int argc, char** argv) } db = populate_db(reopen, find_size, gkeys); + if (create && !load) { + printf("Asked for create but not load... exiting.\n"); + exit(0); + } create = 0; setbuf(outfile,NULL);