LMDB
lmdb.h
1 
165 #ifndef _LMDB_H_
166 #define _LMDB_H_
167 
168 #include <sys/types.h>
169 
170 #ifdef __cplusplus
171 extern "C" {
172 #endif
173 
175 #ifdef _MSC_VER
176 typedef int mdb_mode_t;
177 #else
178 typedef mode_t mdb_mode_t;
179 #endif
180 
185 #ifdef _WIN32
186 typedef void *mdb_filehandle_t;
187 #else
188 typedef int mdb_filehandle_t;
189 #endif
190 
199 #define MDB_VERSION_MAJOR 0
200 
201 #define MDB_VERSION_MINOR 9
202 
203 #define MDB_VERSION_PATCH 24
204 
206 #define MDB_VERINT(a,b,c) (((a) << 24) | ((b) << 16) | (c))
207 
209 #define MDB_VERSION_FULL \
210  MDB_VERINT(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH)
211 
213 #define MDB_VERSION_DATE "July 24, 2019"
214 
216 #define MDB_VERSTR(a,b,c,d) "LMDB " #a "." #b "." #c ": (" d ")"
217 
219 #define MDB_VERFOO(a,b,c,d) MDB_VERSTR(a,b,c,d)
220 
222 #define MDB_VERSION_STRING \
223  MDB_VERFOO(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH,MDB_VERSION_DATE)
224 
231 typedef struct MDB_env MDB_env;
232 
238 typedef struct MDB_txn MDB_txn;
239 
241 typedef unsigned int MDB_dbi;
242 
244 typedef struct MDB_cursor MDB_cursor;
245 
257 typedef struct MDB_val {
258  size_t mv_size;
259  void *mv_data;
260 } MDB_val;
261 
263 typedef int (MDB_cmp_func)(const MDB_val *a, const MDB_val *b);
264 
279 typedef void (MDB_rel_func)(MDB_val *item, void *oldptr, void *newptr, void *relctx);
280 
285 #define MDB_FIXEDMAP 0x01
286 
287 #define MDB_NOSUBDIR 0x4000
288 
289 #define MDB_NOSYNC 0x10000
290 
291 #define MDB_RDONLY 0x20000
292 
293 #define MDB_NOMETASYNC 0x40000
294 
295 #define MDB_WRITEMAP 0x80000
296 
297 #define MDB_MAPASYNC 0x100000
298 
299 #define MDB_NOTLS 0x200000
300 
301 #define MDB_NOLOCK 0x400000
302 
303 #define MDB_NORDAHEAD 0x800000
304 
305 #define MDB_NOMEMINIT 0x1000000
306 
312 #define MDB_REVERSEKEY 0x02
313 
314 #define MDB_DUPSORT 0x04
315 
317 #define MDB_INTEGERKEY 0x08
318 
319 #define MDB_DUPFIXED 0x10
320 
321 #define MDB_INTEGERDUP 0x20
322 
323 #define MDB_REVERSEDUP 0x40
324 
325 #define MDB_CREATE 0x40000
326 
332 #define MDB_NOOVERWRITE 0x10
333 
337 #define MDB_NODUPDATA 0x20
338 
339 #define MDB_CURRENT 0x40
340 
343 #define MDB_RESERVE 0x10000
344 
345 #define MDB_APPEND 0x20000
346 
347 #define MDB_APPENDDUP 0x40000
348 
349 #define MDB_MULTIPLE 0x80000
350 /* @} */
351 
358 #define MDB_CP_COMPACT 0x01
359 /* @} */
360 
366 typedef enum MDB_cursor_op {
395 } MDB_cursor_op;
396 
403 #define MDB_SUCCESS 0
404 
405 #define MDB_KEYEXIST (-30799)
406 
407 #define MDB_NOTFOUND (-30798)
408 
409 #define MDB_PAGE_NOTFOUND (-30797)
410 
411 #define MDB_CORRUPTED (-30796)
412 
413 #define MDB_PANIC (-30795)
414 
415 #define MDB_VERSION_MISMATCH (-30794)
416 
417 #define MDB_INVALID (-30793)
418 
419 #define MDB_MAP_FULL (-30792)
420 
421 #define MDB_DBS_FULL (-30791)
422 
423 #define MDB_READERS_FULL (-30790)
424 
425 #define MDB_TLS_FULL (-30789)
426 
427 #define MDB_TXN_FULL (-30788)
428 
429 #define MDB_CURSOR_FULL (-30787)
430 
431 #define MDB_PAGE_FULL (-30786)
432 
433 #define MDB_MAP_RESIZED (-30785)
434 
442 #define MDB_INCOMPATIBLE (-30784)
443 
444 #define MDB_BAD_RSLOT (-30783)
445 
446 #define MDB_BAD_TXN (-30782)
447 
448 #define MDB_BAD_VALSIZE (-30781)
449 
450 #define MDB_BAD_DBI (-30780)
451 
452 #define MDB_LAST_ERRCODE MDB_BAD_DBI
453 
456 typedef struct MDB_stat {
457  unsigned int ms_psize;
459  unsigned int ms_depth;
461  size_t ms_leaf_pages;
463  size_t ms_entries;
464 } MDB_stat;
465 
467 typedef struct MDB_envinfo {
468  void *me_mapaddr;
469  size_t me_mapsize;
470  size_t me_last_pgno;
471  size_t me_last_txnid;
472  unsigned int me_maxreaders;
473  unsigned int me_numreaders;
474 } MDB_envinfo;
475 
483 char *mdb_version(int *major, int *minor, int *patch);
484 
495 char *mdb_strerror(int err);
496 
508 int mdb_env_create(MDB_env **env);
509 
631 int mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mdb_mode_t mode);
632 
647 int mdb_env_copy(MDB_env *env, const char *path);
648 
662 int mdb_env_copyfd(MDB_env *env, mdb_filehandle_t fd);
663 
687 int mdb_env_copy2(MDB_env *env, const char *path, unsigned int flags);
688 
706 int mdb_env_copyfd2(MDB_env *env, mdb_filehandle_t fd, unsigned int flags);
707 
714 int mdb_env_stat(MDB_env *env, MDB_stat *stat);
715 
722 int mdb_env_info(MDB_env *env, MDB_envinfo *stat);
723 
743 int mdb_env_sync(MDB_env *env, int force);
744 
753 void mdb_env_close(MDB_env *env);
754 
769 int mdb_env_set_flags(MDB_env *env, unsigned int flags, int onoff);
770 
781 int mdb_env_get_flags(MDB_env *env, unsigned int *flags);
782 
795 int mdb_env_get_path(MDB_env *env, const char **path);
796 
811 int mdb_env_get_fd(MDB_env *env, mdb_filehandle_t *fd);
812 
845 int mdb_env_set_mapsize(MDB_env *env, size_t size);
846 
864 int mdb_env_set_maxreaders(MDB_env *env, unsigned int readers);
865 
876 int mdb_env_get_maxreaders(MDB_env *env, unsigned int *readers);
877 
896 int mdb_env_set_maxdbs(MDB_env *env, MDB_dbi dbs);
897 
906 
913 int mdb_env_set_userctx(MDB_env *env, void *ctx);
914 
920 void *mdb_env_get_userctx(MDB_env *env);
921 
928 typedef void MDB_assert_func(MDB_env *env, const char *msg);
929 
938 
973 int mdb_txn_begin(MDB_env *env, MDB_txn *parent, unsigned int flags, MDB_txn **txn);
974 
980 
990 size_t mdb_txn_id(MDB_txn *txn);
991 
1008 int mdb_txn_commit(MDB_txn *txn);
1009 
1018 void mdb_txn_abort(MDB_txn *txn);
1019 
1037 void mdb_txn_reset(MDB_txn *txn);
1038 
1053 int mdb_txn_renew(MDB_txn *txn);
1054 
1056 #define mdb_open(txn,name,flags,dbi) mdb_dbi_open(txn,name,flags,dbi)
1057 
1058 #define mdb_close(env,dbi) mdb_dbi_close(env,dbi)
1059 
1128 int mdb_dbi_open(MDB_txn *txn, const char *name, unsigned int flags, MDB_dbi *dbi);
1129 
1142 int mdb_stat(MDB_txn *txn, MDB_dbi dbi, MDB_stat *stat);
1143 
1151 int mdb_dbi_flags(MDB_txn *txn, MDB_dbi dbi, unsigned int *flags);
1152 
1169 void mdb_dbi_close(MDB_env *env, MDB_dbi dbi);
1170 
1180 int mdb_drop(MDB_txn *txn, MDB_dbi dbi, int del);
1181 
1201 int mdb_set_compare(MDB_txn *txn, MDB_dbi dbi, MDB_cmp_func *cmp);
1202 
1224 int mdb_set_dupsort(MDB_txn *txn, MDB_dbi dbi, MDB_cmp_func *cmp);
1225 
1244 int mdb_set_relfunc(MDB_txn *txn, MDB_dbi dbi, MDB_rel_func *rel);
1245 
1260 int mdb_set_relctx(MDB_txn *txn, MDB_dbi dbi, void *ctx);
1261 
1288 int mdb_get(MDB_txn *txn, MDB_dbi dbi, MDB_val *key, MDB_val *data);
1289 
1337 int mdb_put(MDB_txn *txn, MDB_dbi dbi, MDB_val *key, MDB_val *data,
1338  unsigned int flags);
1339 
1362 int mdb_del(MDB_txn *txn, MDB_dbi dbi, MDB_val *key, MDB_val *data);
1363 
1386 int mdb_cursor_open(MDB_txn *txn, MDB_dbi dbi, MDB_cursor **cursor);
1387 
1394 void mdb_cursor_close(MDB_cursor *cursor);
1395 
1412 int mdb_cursor_renew(MDB_txn *txn, MDB_cursor *cursor);
1413 
1419 
1425 
1445 int mdb_cursor_get(MDB_cursor *cursor, MDB_val *key, MDB_val *data,
1446  MDB_cursor_op op);
1447 
1507 int mdb_cursor_put(MDB_cursor *cursor, MDB_val *key, MDB_val *data,
1508  unsigned int flags);
1509 
1531 int mdb_cursor_del(MDB_cursor *cursor, unsigned int flags);
1532 
1545 int mdb_cursor_count(MDB_cursor *cursor, size_t *countp);
1546 
1557 int mdb_cmp(MDB_txn *txn, MDB_dbi dbi, const MDB_val *a, const MDB_val *b);
1558 
1569 int mdb_dcmp(MDB_txn *txn, MDB_dbi dbi, const MDB_val *a, const MDB_val *b);
1570 
1577 typedef int (MDB_msg_func)(const char *msg, void *ctx);
1578 
1586 int mdb_reader_list(MDB_env *env, MDB_msg_func *func, void *ctx);
1587 
1594 int mdb_reader_check(MDB_env *env, int *dead);
1597 #ifdef __cplusplus
1598 }
1599 #endif
1600 
1608 #endif /* _LMDB_H_ */
MDB_LAST
@ MDB_LAST
Definition: lmdb.h:376
mdb_env_stat
int mdb_env_stat(MDB_env *env, MDB_stat *stat)
Return statistics about the LMDB environment.
Definition: mdb.c:9670
mdb_txn_env
MDB_env * mdb_txn_env(MDB_txn *txn)
Returns the transaction's MDB_env.
Definition: mdb.c:2924
MDB_rel_func
void() MDB_rel_func(MDB_val *item, void *oldptr, void *newptr, void *relctx)
A callback function used to relocate a position-dependent data item in a fixed-address database.
Definition: lmdb.h:279
mdb_drop
int mdb_drop(MDB_txn *txn, MDB_dbi dbi, int del)
Empty or delete+close a database.
Definition: mdb.c:9985
mdb_env_close
void mdb_env_close(MDB_env *env)
Close the environment and release the memory map.
Definition: mdb.c:5150
mdb_cursor_dbi
MDB_dbi mdb_cursor_dbi(MDB_cursor *cursor)
Return the cursor's database handle.
Definition: mdb.c:7739
mdb_env_get_path
int mdb_env_get_path(MDB_env *env, const char **path)
Return the path that was used in mdb_env_open().
Definition: mdb.c:9631
mdb_env_get_maxkeysize
int mdb_env_get_maxkeysize(MDB_env *env)
Get the maximum size of keys and MDB_DUPSORT data we can write.
Definition: mdb.c:10073
MDB_SET_RANGE
@ MDB_SET_RANGE
Definition: lmdb.h:392
MDB_PREV_NODUP
@ MDB_PREV_NODUP
Definition: lmdb.h:389
MDB_SET_KEY
@ MDB_SET_KEY
Definition: lmdb.h:391
mdb_cursor_count
int mdb_cursor_count(MDB_cursor *cursor, size_t *countp)
Return count of duplicates for current key.
Definition: mdb.c:7679
mdb_env_get_userctx
void * mdb_env_get_userctx(MDB_env *env)
Get the application information associated with the MDB_env.
Definition: mdb.c:9614
mdb_reader_list
int mdb_reader_list(MDB_env *env, MDB_msg_func *func, void *ctx)
Dump the entries in the reader lock table.
Definition: mdb.c:10079
MDB_cursor_op
MDB_cursor_op
Cursor Get operations.
Definition: lmdb.h:366
MDB_NEXT_NODUP
@ MDB_NEXT_NODUP
Definition: lmdb.h:385
mdb_dcmp
int mdb_dcmp(MDB_txn *txn, MDB_dbi dbi, const MDB_val *a, const MDB_val *b)
Compare two data items according to a particular database.
Definition: mdb.c:1752
MDB_GET_BOTH_RANGE
@ MDB_GET_BOTH_RANGE
Definition: lmdb.h:371
mdb_cursor_open
int mdb_cursor_open(MDB_txn *txn, MDB_dbi dbi, MDB_cursor **cursor)
Create a cursor handle.
Definition: mdb.c:7628
mdb_dbi_open
int mdb_dbi_open(MDB_txn *txn, const char *name, unsigned int flags, MDB_dbi *dbi)
Open a database in the environment.
Definition: mdb.c:9724
mdb_dbi_close
void mdb_dbi_close(MDB_env *env, MDB_dbi dbi)
Close a database handle. Normally unnecessary. Use with care:
Definition: mdb.c:9861
mdb_txn_begin
int mdb_txn_begin(MDB_env *env, MDB_txn *parent, unsigned int flags, MDB_txn **txn)
Create a transaction for use with the environment.
Definition: mdb.c:2823
mdb_env_info
int mdb_env_info(MDB_env *env, MDB_envinfo *stat)
Return information about the LMDB environment.
Definition: mdb.c:9683
MDB_NEXT
@ MDB_NEXT
Definition: lmdb.h:379
MDB_cmp_func
int() MDB_cmp_func(const MDB_val *a, const MDB_val *b)
A callback function used to compare two keys in a database.
Definition: lmdb.h:263
mdb_env_open
int mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mdb_mode_t mode)
Open an environment handle.
Definition: mdb.c:4953
MDB_GET_MULTIPLE
@ MDB_GET_MULTIPLE
Definition: lmdb.h:373
mdb_set_relfunc
int mdb_set_relfunc(MDB_txn *txn, MDB_dbi dbi, MDB_rel_func *rel)
Set a relocation function for a MDB_FIXEDMAP database.
Definition: mdb.c:10054
MDB_stat::ms_branch_pages
size_t ms_branch_pages
Definition: lmdb.h:460
MDB_env
Opaque structure for a database environment.
Definition: mdb.c:1253
MDB_val::mv_size
size_t mv_size
Definition: lmdb.h:258
mdb_stat
int mdb_stat(MDB_txn *txn, MDB_dbi dbi, MDB_stat *stat)
Retrieve statistics for a database.
Definition: mdb.c:9844
mdb_env_set_assert
int mdb_env_set_assert(MDB_env *env, MDB_assert_func *func)
Definition: mdb.c:9620
mdb_txn_abort
void mdb_txn_abort(MDB_txn *txn)
Abandon all the operations of the transaction instead of saving them.
Definition: mdb.c:3055
MDB_stat::ms_overflow_pages
size_t ms_overflow_pages
Definition: lmdb.h:462
MDB_envinfo::me_numreaders
unsigned int me_numreaders
Definition: lmdb.h:473
MDB_NEXT_DUP
@ MDB_NEXT_DUP
Definition: lmdb.h:380
mdb_cursor_del
int mdb_cursor_del(MDB_cursor *cursor, unsigned int flags)
Delete current key/data pair.
Definition: mdb.c:7063
mdb_env_create
int mdb_env_create(MDB_env **env)
Create an LMDB environment handle.
Definition: mdb.c:3945
mdb_cursor_renew
int mdb_cursor_renew(MDB_txn *txn, MDB_cursor *cursor)
Renew a cursor handle.
Definition: mdb.c:7662
mdb_cursor_close
void mdb_cursor_close(MDB_cursor *cursor)
Close a cursor handle.
Definition: mdb.c:7717
MDB_SET
@ MDB_SET
Definition: lmdb.h:390
mdb_env_set_mapsize
int mdb_env_set_mapsize(MDB_env *env, size_t size)
Set the size of the memory map to use for this environment.
Definition: mdb.c:4054
MDB_FIRST
@ MDB_FIRST
Definition: lmdb.h:367
mdb_cursor_put
int mdb_cursor_put(MDB_cursor *cursor, MDB_val *key, MDB_val *data, unsigned int flags)
Store by cursor.
Definition: mdb.c:6534
mdb_set_dupsort
int mdb_set_dupsort(MDB_txn *txn, MDB_dbi dbi, MDB_cmp_func *cmp)
Set a custom data comparison function for a MDB_DUPSORT database.
Definition: mdb.c:10045
MDB_val::mv_data
void * mv_data
Definition: lmdb.h:259
mdb_env_get_fd
int mdb_env_get_fd(MDB_env *env, mdb_filehandle_t *fd)
Return the filedescriptor for the given environment.
Definition: mdb.c:9641
MDB_envinfo::me_last_pgno
size_t me_last_pgno
Definition: lmdb.h:470
mdb_env_copy
int mdb_env_copy(MDB_env *env, const char *path)
Copy an LMDB environment to the specified path.
Definition: mdb.c:9577
mdb_txn_commit
int mdb_txn_commit(MDB_txn *txn)
Commit all the operations of a transaction into the database.
Definition: mdb.c:3442
MDB_PREV_DUP
@ MDB_PREV_DUP
Definition: lmdb.h:387
MDB_LAST_DUP
@ MDB_LAST_DUP
Definition: lmdb.h:377
mdb_env_get_maxreaders
int mdb_env_get_maxreaders(MDB_env *env, unsigned int *readers)
Get the maximum number of threads/reader slots for the environment.
Definition: mdb.c:4106
MDB_GET_CURRENT
@ MDB_GET_CURRENT
Definition: lmdb.h:372
MDB_assert_func
void MDB_assert_func(MDB_env *env, const char *msg)
A callback function for most LMDB assert() failures, called before printing the message and aborting.
Definition: lmdb.h:928
mdb_env_copyfd
int mdb_env_copyfd(MDB_env *env, mdb_filehandle_t fd)
Copy an LMDB environment to the specified file descriptor.
MDB_envinfo::me_mapaddr
void * me_mapaddr
Definition: lmdb.h:468
MDB_PREV_MULTIPLE
@ MDB_PREV_MULTIPLE
Definition: lmdb.h:393
mdb_env_get_flags
int mdb_env_get_flags(MDB_env *env, unsigned int *flags)
Get environment flags.
Definition: mdb.c:9595
MDB_envinfo
Information about the environment.
Definition: lmdb.h:467
mdb_txn_id
size_t mdb_txn_id(MDB_txn *txn)
Return the transaction's ID.
Definition: mdb.c:2931
MDB_NEXT_MULTIPLE
@ MDB_NEXT_MULTIPLE
Definition: lmdb.h:382
mdb_env_set_maxdbs
int mdb_env_set_maxdbs(MDB_env *env, MDB_dbi dbs)
Set the maximum number of named databases for the environment.
Definition: mdb.c:4088
mdb_env_set_userctx
int mdb_env_set_userctx(MDB_env *env, void *ctx)
Set application information associated with the MDB_env.
Definition: mdb.c:9605
mdb_strerror
char * mdb_strerror(int err)
Return a string describing a given error code.
Definition: mdb.c:1473
MDB_dbi
unsigned int MDB_dbi
A handle for an individual database in the DB environment.
Definition: lmdb.h:241
mdb_put
int mdb_put(MDB_txn *txn, MDB_dbi dbi, MDB_val *key, MDB_val *data, unsigned int flags)
Store items into a database.
Definition: mdb.c:9003
MDB_envinfo::me_last_txnid
size_t me_last_txnid
Definition: lmdb.h:471
mdb_dbi_flags
int mdb_dbi_flags(MDB_txn *txn, MDB_dbi dbi, unsigned int *flags)
Retrieve the DB flags for a database handle.
Definition: mdb.c:9877
MDB_envinfo::me_mapsize
size_t me_mapsize
Definition: lmdb.h:469
MDB_msg_func
int() MDB_msg_func(const char *msg, void *ctx)
A callback function used to print a message from the library.
Definition: lmdb.h:1577
MDB_PREV
@ MDB_PREV
Definition: lmdb.h:386
MDB_GET_BOTH
@ MDB_GET_BOTH
Definition: lmdb.h:370
mdb_set_relctx
int mdb_set_relctx(MDB_txn *txn, MDB_dbi dbi, void *ctx)
Set a context pointer for a MDB_FIXEDMAP database's relocation function.
Definition: mdb.c:10063
mdb_env_copyfd2
int mdb_env_copyfd2(MDB_env *env, mdb_filehandle_t fd, unsigned int flags)
Copy an LMDB environment to the specified file descriptor, with options.
mdb_cursor_get
int mdb_cursor_get(MDB_cursor *cursor, MDB_val *key, MDB_val *data, MDB_cursor_op op)
Retrieve by cursor.
Definition: mdb.c:6313
MDB_stat
Statistics for a database in the environment.
Definition: lmdb.h:456
MDB_cursor
Opaque structure for navigating through a database.
Definition: mdb.c:1178
MDB_stat::ms_entries
size_t ms_entries
Definition: lmdb.h:463
mdb_del
int mdb_del(MDB_txn *txn, MDB_dbi dbi, MDB_val *key, MDB_val *data)
Delete items from a database.
Definition: mdb.c:8517
MDB_stat::ms_leaf_pages
size_t ms_leaf_pages
Definition: lmdb.h:461
mdb_get
int mdb_get(MDB_txn *txn, MDB_dbi dbi, MDB_val *key, MDB_val *data)
Get items from a database.
Definition: mdb.c:5776
MDB_val
Generic structure used for passing keys and data in and out of the database.
Definition: lmdb.h:257
MDB_stat::ms_psize
unsigned int ms_psize
Definition: lmdb.h:457
MDB_FIRST_DUP
@ MDB_FIRST_DUP
Definition: lmdb.h:368
mdb_txn_renew
int mdb_txn_renew(MDB_txn *txn)
Renew a read-only transaction.
Definition: mdb.c:2806
MDB_txn
Opaque structure for a transaction handle.
Definition: mdb.c:1078
mdb_version
char * mdb_version(int *major, int *minor, int *patch)
Return the LMDB library version information.
Definition: mdb.c:1440
mdb_txn_reset
void mdb_txn_reset(MDB_txn *txn)
Reset a read-only transaction.
Definition: mdb.c:3042
MDB_envinfo::me_maxreaders
unsigned int me_maxreaders
Definition: lmdb.h:472
mdb_env_set_maxreaders
int mdb_env_set_maxreaders(MDB_env *env, unsigned int readers)
Set the maximum number of threads/reader slots for the environment.
Definition: mdb.c:4097
mdb_reader_check
int mdb_reader_check(MDB_env *env, int *dead)
Check for stale entries in the reader lock table.
Definition: mdb.c:10157
mdb_cursor_txn
MDB_txn * mdb_cursor_txn(MDB_cursor *cursor)
Return the cursor's transaction handle.
Definition: mdb.c:7732
MDB_stat::ms_depth
unsigned int ms_depth
Definition: lmdb.h:459
mdb_set_compare
int mdb_set_compare(MDB_txn *txn, MDB_dbi dbi, MDB_cmp_func *cmp)
Set a custom key comparison function for a database.
Definition: mdb.c:10036
mdb_env_copy2
int mdb_env_copy2(MDB_env *env, const char *path, unsigned int flags)
Copy an LMDB environment to the specified path, with options.
Definition: mdb.c:9557
mdb_cmp
int mdb_cmp(MDB_txn *txn, MDB_dbi dbi, const MDB_val *a, const MDB_val *b)
Compare two data items according to a particular database.
Definition: mdb.c:1746
mdb_env_set_flags
int mdb_env_set_flags(MDB_env *env, unsigned int flags, int onoff)
Set environment flags.
Definition: mdb.c:9583
mdb_env_sync
int mdb_env_sync(MDB_env *env, int force)
Flush the data buffers to disk.
Definition: mdb.c:2507