From d499c244cd39bec338cb371a5a8bae7ae38b9ac3 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 11 Aug 2011 05:04:49 -0700 Subject: [PATCH] Allow setting DB flags on main DB --- libraries/libmdb/mdb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 53e5dde8f8..a1b5b8e7e9 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -3121,6 +3121,8 @@ int mdb_open(MDB_txn *txn, const char *name, unsigned int flags, MDB_dbi *dbi) /* main DB? */ if (!name) { *dbi = MAIN_DBI; + if (flags & (MDB_DUPSORT|MDB_REVERSEKEY)) + txn->mt_dbs[MAIN_DBI].md_flags |= (flags & (MDB_DUPSORT|MDB_REVERSEKEY)); return MDB_SUCCESS; } -- 2.39.5