Add mdb_env_get_maxkeysize()

vmware
Howard Chu 11 years ago
parent 1ecd86b14c
commit 1ac3c8308f
  1. 7
      libraries/liblmdb/lmdb.h
  2. 5
      libraries/liblmdb/mdb.c

@ -720,6 +720,13 @@ int mdb_env_get_maxreaders(MDB_env *env, unsigned int *readers);
*/ */
int mdb_env_set_maxdbs(MDB_env *env, MDB_dbi dbs); int mdb_env_set_maxdbs(MDB_env *env, MDB_dbi dbs);
/** @brief Get the maximum size of a key for the environment.
*
* @param[in] env An environment handle returned by #mdb_env_create()
* @return The maximum size of a key. (#MDB_MAXKEYSIZE)
*/
int mdb_env_get_maxkeysize(MDB_env *env);
/** @brief Create a transaction for use with the environment. /** @brief Create a transaction for use with the environment.
* *
* The transaction handle may be discarded using #mdb_txn_abort() or #mdb_txn_commit(). * The transaction handle may be discarded using #mdb_txn_abort() or #mdb_txn_commit().

@ -8069,6 +8069,11 @@ int mdb_set_relctx(MDB_txn *txn, MDB_dbi dbi, void *ctx)
return MDB_SUCCESS; return MDB_SUCCESS;
} }
int mdb_env_get_maxkeysize(MDB_env *env)
{
return MDB_MAXKEYSIZE;
}
int mdb_reader_list(MDB_env *env, MDB_msg_func *func, void *ctx) int mdb_reader_list(MDB_env *env, MDB_msg_func *func, void *ctx)
{ {
unsigned int i, rdrs; unsigned int i, rdrs;

Loading…
Cancel
Save