]> git.sur5r.net Git - openldap/commitdiff
Allow setting DB flags on main DB
authorHoward Chu <hyc@symas.com>
Thu, 11 Aug 2011 12:04:49 +0000 (05:04 -0700)
committerHoward Chu <hyc@symas.com>
Thu, 1 Sep 2011 23:17:07 +0000 (16:17 -0700)
libraries/libmdb/mdb.c

index 53e5dde8f86359780343a171edf88f21d2339c53..a1b5b8e7e943e0c3abc7eedbfbf10e70ff25071e 100644 (file)
@@ -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;
        }