Allow setting DB flags on main DB

This commit is contained in:
Howard Chu 2011-08-11 05:04:49 -07:00
parent 2f7ddb4103
commit d499c244cd

View File

@ -3121,6 +3121,8 @@ int mdb_open(MDB_txn *txn, const char *name, unsigned int flags, MDB_dbi *dbi)
/* main DB? */ /* main DB? */
if (!name) { if (!name) {
*dbi = MAIN_DBI; *dbi = MAIN_DBI;
if (flags & (MDB_DUPSORT|MDB_REVERSEKEY))
txn->mt_dbs[MAIN_DBI].md_flags |= (flags & (MDB_DUPSORT|MDB_REVERSEKEY));
return MDB_SUCCESS; return MDB_SUCCESS;
} }