ITS#9861 fix readonly regression from #9017

mdb.master3
Joakim Hassila 3 years ago committed by Howard Chu
parent 64fc67f4ae
commit 0179cfab57
  1. 8
      libraries/liblmdb/mdb.c

@ -6074,9 +6074,11 @@ mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mdb_mode_t mode
/* Synchronous fd for meta writes. Needed even with
* MDB_NOSYNC/MDB_NOMETASYNC, in case these get reset.
*/
rc = mdb_fopen(env, &fname, MDB_O_META, mode, &env->me_mfd);
if (rc)
goto leave;
if (!(flags & (MDB_RDONLY|MDB_WRITEMAP))) {
rc = mdb_fopen(env, &fname, MDB_O_META, mode, &env->me_mfd);
if (rc)
goto leave;
}
DPRINTF(("opened dbenv %p", (void *) env));
if (excl > 0 && !(flags & MDB_PREVSNAPSHOT)) {
rc = mdb_env_share_locks(env, &excl);

Loading…
Cancel
Save