mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-20 05:18:21 +08:00
mdbx: don't check present durability mode for MDBX_RDONLY.
This commit is contained in:
parent
700f3e9c2a
commit
47cc45dec4
@ -4156,7 +4156,8 @@ int __cold mdbx_env_open_ex(MDBX_env *env, const char *path, unsigned flags,
|
||||
/* LY: just indicate that is not an exclusive access. */
|
||||
*exclusive = 0;
|
||||
}
|
||||
if ((env->me_lck->mti_envmode ^ env->me_flags) & mode_flags) {
|
||||
if ((env->me_flags & MDBX_RDONLY) == 0 &&
|
||||
((env->me_lck->mti_envmode ^ env->me_flags) & mode_flags) != 0) {
|
||||
mdbx_error("current mode/flags incompatible with requested");
|
||||
rc = MDBX_INCOMPATIBLE;
|
||||
goto bailout;
|
||||
|
Loading…
x
Reference in New Issue
Block a user