mdbx: mdbx_env_set_syncbytes() only for MDBX-mode.

Change-Id: I7836d4b7b538fc15407122ea40c36a2f8a5ae033
This commit is contained in:
Leo Yuriev 2016-03-12 20:45:16 +03:00
parent eb429da210
commit c05fb6862d
2 changed files with 3 additions and 2 deletions

4
mdb.c
View File

@ -4008,8 +4008,9 @@ fail:
return rc;
}
#if MDBX_MODE_ENABLED
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))
return EINVAL;
@ -4020,6 +4021,7 @@ mdb_env_set_syncbytes(MDB_env *env, size_t bytes)
env->me_sync_threshold = bytes;
return env->me_map ? mdb_env_sync(env, 0) : 0;
}
#endif /* MDBX_MODE_ENABLED */
/** Read the environment parameters of a DB environment before
* mapping it into memory.

1
mdbx.h
View File

@ -80,7 +80,6 @@
#define mdb_env_set_userctx mdbx_env_set_userctx
#define mdb_env_get_userctx mdbx_env_get_userctx
#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_env mdbx_txn_env
#define mdb_txn_id mdbx_txn_id