mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 17:54:13 +08:00
mdbx: fix MDBX_EACCESS
from mdbx_env_set_option()
if env not yet opened.
Change-Id: I0da15b71919a1787e5cc54441b5e41941afabf66
This commit is contained in:
parent
7a8fe2a72c
commit
934ca25ab2
@ -20992,7 +20992,7 @@ __cold int mdbx_env_set_option(MDBX_env *env, const MDBX_option_t option,
|
|||||||
case MDBX_opt_txn_dp_initial:
|
case MDBX_opt_txn_dp_initial:
|
||||||
if (unlikely(value > MDBX_PGL_LIMIT || value < CURSOR_STACK * 4))
|
if (unlikely(value > MDBX_PGL_LIMIT || value < CURSOR_STACK * 4))
|
||||||
return MDBX_EINVAL;
|
return MDBX_EINVAL;
|
||||||
if (unlikely(env->me_txn0 == NULL))
|
if (unlikely(env->me_flags & MDBX_RDONLY))
|
||||||
return MDBX_EACCESS;
|
return MDBX_EACCESS;
|
||||||
if (lock_needed) {
|
if (lock_needed) {
|
||||||
err = mdbx_txn_lock(env, false);
|
err = mdbx_txn_lock(env, false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user