From: Howard Chu Date: Thu, 11 Aug 2011 12:04:49 +0000 (-0700) Subject: Allow setting DB flags on main DB X-Git-Tag: OPENLDAP_REL_ENG_2_4_27~148^2~119 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d499c244cd39bec338cb371a5a8bae7ae38b9ac3;p=openldap Allow setting DB flags on main DB --- 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; }