mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-30 11:29:19 +08:00
mdbx: mdbx_env_set_syncbytes() only for MDBX-mode.
Change-Id: I7836d4b7b538fc15407122ea40c36a2f8a5ae033
This commit is contained in:
parent
eb429da210
commit
c05fb6862d
4
mdb.c
4
mdb.c
@ -4008,8 +4008,9 @@ fail:
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if MDBX_MODE_ENABLED
|
||||||
int __cold
|
int __cold
|
||||||
mdb_env_set_syncbytes(MDB_env *env, size_t bytes)
|
mdbx_env_set_syncbytes(MDB_env *env, size_t bytes)
|
||||||
{
|
{
|
||||||
if (unlikely(!env))
|
if (unlikely(!env))
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
@ -4020,6 +4021,7 @@ mdb_env_set_syncbytes(MDB_env *env, size_t bytes)
|
|||||||
env->me_sync_threshold = bytes;
|
env->me_sync_threshold = bytes;
|
||||||
return env->me_map ? mdb_env_sync(env, 0) : 0;
|
return env->me_map ? mdb_env_sync(env, 0) : 0;
|
||||||
}
|
}
|
||||||
|
#endif /* MDBX_MODE_ENABLED */
|
||||||
|
|
||||||
/** Read the environment parameters of a DB environment before
|
/** Read the environment parameters of a DB environment before
|
||||||
* mapping it into memory.
|
* mapping it into memory.
|
||||||
|
1
mdbx.h
1
mdbx.h
@ -80,7 +80,6 @@
|
|||||||
#define mdb_env_set_userctx mdbx_env_set_userctx
|
#define mdb_env_set_userctx mdbx_env_set_userctx
|
||||||
#define mdb_env_get_userctx mdbx_env_get_userctx
|
#define mdb_env_get_userctx mdbx_env_get_userctx
|
||||||
#define mdb_env_set_assert mdbx_env_set_assert
|
#define mdb_env_set_assert mdbx_env_set_assert
|
||||||
#define mdb_env_set_syncbytes mdbx_env_set_syncbytes
|
|
||||||
#define mdb_txn_begin mdbx_txn_begin
|
#define mdb_txn_begin mdbx_txn_begin
|
||||||
#define mdb_txn_env mdbx_txn_env
|
#define mdb_txn_env mdbx_txn_env
|
||||||
#define mdb_txn_id mdbx_txn_id
|
#define mdb_txn_id mdbx_txn_id
|
||||||
|
Loading…
Reference in New Issue
Block a user