diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 07ecf99..cd2ad9a 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -3155,6 +3155,7 @@ mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mode_t mode) sprintf(dpath, "%s" DATANAME, path); } + flags |= env->me_flags; /* silently ignore WRITEMAP if we're only getting read access */ if (F_ISSET(flags, MDB_RDONLY|MDB_WRITEMAP)) flags ^= MDB_WRITEMAP; diff --git a/libraries/libmdb/mdb.h b/libraries/libmdb/mdb.h index 1735fbd..d78868c 100644 --- a/libraries/libmdb/mdb.h +++ b/libraries/libmdb/mdb.h @@ -401,6 +401,7 @@ int mdb_env_create(MDB_env **env); * @param[in] flags Special options for this environment. This parameter * must be set to 0 or by bitwise OR'ing together one or more of the * values described here. + * Flags set by mdb_env_set_flags() are also used. *