From 9c6eb75c656363176a55c63c81803feb3cfa614d Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 12 Aug 2017 12:21:25 +0100 Subject: ITS#8704 add MDB_PREVSNAPSHOT flag to mdb_env_open used to open the previous snapshot, in case the latest one is corrupted --- external/db_drivers/liblmdb/mdb_copy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'external/db_drivers/liblmdb/mdb_copy.c') diff --git a/external/db_drivers/liblmdb/mdb_copy.c b/external/db_drivers/liblmdb/mdb_copy.c index f37ccbcc2..95a6e7130 100644 --- a/external/db_drivers/liblmdb/mdb_copy.c +++ b/external/db_drivers/liblmdb/mdb_copy.c @@ -38,6 +38,8 @@ int main(int argc,char * argv[]) for (; argc > 1 && argv[1][0] == '-'; argc--, argv++) { if (argv[1][1] == 'n' && argv[1][2] == '\0') flags |= MDB_NOSUBDIR; + else if (argv[1][1] == 'v' && argv[1][2] == '\0') + flags |= MDB_PREVSNAPSHOT; else if (argv[1][1] == 'c' && argv[1][2] == '\0') cpflags |= MDB_CP_COMPACT; else if (argv[1][1] == 'V' && argv[1][2] == '\0') { @@ -48,7 +50,7 @@ int main(int argc,char * argv[]) } if (argc<2 || argc>3) { - fprintf(stderr, "usage: %s [-V] [-c] [-n] srcpath [dstpath]\n", progname); + fprintf(stderr, "usage: %s [-V] [-c] [-n] [-v] srcpath [dstpath]\n", progname); exit(EXIT_FAILURE); } -- cgit v1.2.3