Hallvard Furuseth
88342f9661
ITS#7775 Add mdb_env_set_assert()
2014-01-06 23:17:38 +01:00
Hallvard Furuseth
e40dae1064
Add mdb_env_<set,get>_userctx()
2014-01-06 23:17:38 +01:00
Hallvard Furuseth
46de4ab84c
ITS#7665 Drop lmdb.h doc on non-overlapping flags.
...
It was inaccurate and misplaced. Verify it in mdb.c instead.
2013-12-29 14:54:17 +01:00
Hallvard Furuseth
7e453c9763
Fix mdb_reader_list() and its spec.
...
It and the MDB_msg_func can now return >= 0 for success.
Always return any MDB_msg_func() error result.
2013-12-11 11:57:13 +01:00
Hallvard Furuseth
a58fd16ae5
Support dynamic max MDB keysize.
2013-12-11 11:57:13 +01:00
Hallvard Furuseth
734bc7e6ad
Relax MDB_MAXKEYSIZE for existing data.
...
Handle keys stored by a liblmdb with a bigger MDB_MAXKEYSIZE.
mdb_get/mdb_del(absent key bigger than our MDB_MAXKEYSIZE)
now return MDB_NOTFOUND instead of MDB_BAD_VALSIZE.
2013-12-11 11:57:12 +01:00
Howard Chu
f39bceb800
Doc tweak
...
Measured perf cost of meminit was 7% worst case on an Intel Core2
system. YMMV.
2013-11-12 08:10:33 -08:00
Howard Chu
eecbaa5942
Clarify WRITEMAP / NOMEMINIT
2013-11-11 16:35:17 -08:00
Howard Chu
509a197728
Change default mem init behavior
...
Init malloc'd memory by default, use #MDB_NOMEMINIT to disable.
Bump version to 0.9.10
2013-11-11 15:09:32 -08:00
Hallvard Furuseth
92f71f50f9
Add MDB_CLEANMEM option.
...
Initialize unused portions of DB pages, for security or to silence
checkers like Purify and Valgrind. Like BDB configure --enable-umrw.
2013-11-07 23:41:30 +01:00
Howard Chu
7449ca604c
Bump to 0.9.9
2013-10-24 15:57:17 -07:00
Howard Chu
b86f08e9d6
Add mdb_env_get_fd()
...
Return the environment's filedescriptor. Useful when the caller
is doing their own locking.
2013-10-21 10:41:41 -07:00
Howard Chu
ab9b08f8af
ITS#7725 add MDB_NORDAHEAD flag for env_open
2013-10-12 16:20:04 -07:00
Hallvard Furuseth
9f7ae8925f
Add Caveat: Readers need write access. Whitespace.
2013-10-04 00:51:58 +02:00
Howard Chu
79eac42c0f
s/MDB_NORDLOCK/MDB_NOLOCK/
...
Leave all lock management to the caller.
2013-10-03 10:26:44 -07:00
Howard Chu
a1685c3ef7
More doc for MDB_NORDLOCK
2013-10-01 23:36:57 -07:00
Howard Chu
f739940547
Add MDB_NORDLOCK to omit all reader table usage
...
Calling app wants to manage its own locking.
2013-10-01 13:16:38 -07:00
Hallvard Furuseth
5b21307f29
Update MDB documentation and comments.
2013-09-23 20:09:47 +02:00
Howard Chu
0f842a2710
Release 0.9.8
2013-09-09 08:29:46 -07:00
Howard Chu
5c5300c604
Bump version to 0.9.8
2013-08-28 19:17:25 -07:00
Howard Chu
2e7130cab0
Allow mdb_env_set_mapsize() on an open environment
...
The caller is responsible for making sure no transactions are
active in this process before resizing. This is slightly lighter
weight than doing a full env_close/env_open cycle.
2013-08-28 19:12:59 -07:00
Howard Chu
2a28686e4f
ITS#7672 fix mdb_dbi_flags
...
Use a txn instead of env argument. Only return persistent flags.
2013-08-27 06:28:30 -07:00
Howard Chu
c22a7d98ec
Update caveats now that mdb_reader_check exists
2013-08-20 17:37:53 -07:00
Hallvard Furuseth
9beea541e1
Replace EINVALs with generalized MDB_INCOMPATIBLE.
...
Also check xcursor instead of DUPSORT, it's slightly briefer.
2013-08-10 13:23:30 +02:00
Salvador Ortiz
86551828ab
ITS#7660 Add mdb_txn_env to API
2013-08-10 04:06:16 -07:00
Howard Chu
1ac3c8308f
Add mdb_env_get_maxkeysize()
2013-08-09 04:51:33 -07:00
Hallvard Furuseth
1ecd86b14c
Replace unpredictable EINVAL error returns.
...
Return EINVAL only for simple programmer errors.
2013-08-09 13:05:14 +02:00
Hallvard Furuseth
6214423163
Clarify doc: mdb_copy, nested txns, mdb_drop().
...
mdb_copy: Does not copy lockfile. Can trigger file growth.
mdb_txn_begin(): Clarify usage restrictions.
mdb_drop(): State what to do rather than what will be done, since
closing the handle could otherwise be read as happening even at failure.
2013-08-05 09:55:48 +02:00
Howard Chu
a4bbe57f8b
Add mdb_reader_check()
2013-07-18 10:47:29 -07:00
Howard Chu
49289f0d2e
Add mdb_reader_list()
...
Dump the active slots in the reader table.
2013-07-18 07:45:12 -07:00
Howard Chu
fc137e39a3
Add mdb_dbi_flags()
...
Retrieve the flags from a DB handle.
2013-07-15 10:57:13 -07:00
Howard Chu
fa7228962b
Bump version to 0.9.7
2013-07-12 13:36:05 -07:00
Howard Chu
589370d880
Tweaks for MDB_MULTIPLE
...
Terminate loop on intermediate failures, return count of written items,
document usage.
2013-07-02 02:19:17 -07:00
Howard Chu
d29b9600e6
Windows portability fixes for prev commit
2013-05-30 15:33:59 -07:00
Howard Chu
c68e5ae9be
Add mdb_env_copyfd()
...
Allow writing backup to an already opened file handle, for piping
to tar/gzip/ssh/whatever.
2013-05-30 13:06:12 -07:00
Hallvard Furuseth
a1b16ce5f0
ITS#7598 Tweak MDB_<NEXT/PREV>_NODUP,fix mdb_stat.
...
MDB_NEXT_NODUP, MDB_PREV_NODUP: Allow for non-MDB_DUPSORT databases.
No mdb.c code changes needed.
mdb_stat.c: Use MDB_NEXT_NODUP, to avoid a crash with a DUPSORT mainDB.
2013-05-21 22:44:51 +02:00
Hallvard Furuseth
b389341b4b
mdb_dcmp(): Assume the database has MDB_DUPSORT.
...
There was little point in returning EINVAL when not: Comparing (A,B)
and (B,A) would claim (A > B && B > A), which could confuse callers.
2013-05-04 12:34:49 +02:00
Hallvard Furuseth
91a93004ce
Update MDB doc: Cursors, DB handles, data lifetime
2013-05-04 12:34:20 +02:00
Howard Chu
da3e4d78d6
Fix typo from 7aba5f5ab9
2013-04-20 09:47:33 -07:00
Howard Chu
272e4e98ad
Add MDB_NOTLS envflag.
2013-04-18 04:17:03 +02:00
Hallvard Furuseth
afe488d8a9
Catch MDB txn reuse/sync errors.
2013-04-18 04:16:07 +02:00
Howard Chu
227329c8e1
Fixes for dbi_open/close, ITS#7515
2013-04-05 02:58:08 -07:00
Howard Chu
30da15a18d
Tweak mode_t def per Hallvard's suggestion
2013-03-31 20:56:08 +01:00
Howard Chu
0c568117ce
MSVC doesn't define mode_t
2013-03-31 08:10:43 -08:00
Howard Chu
3394bac2c0
Update error code instances
2013-02-20 05:08:52 -08:00
Hallvard Furuseth
80cd881184
Tweak MDB_INCOMPATIBLE description
2013-02-20 12:19:45 +01:00
Hallvard Furuseth
f97552a83a
Check DB flags when refreshing a stale MDB DBI.
...
It's hairy to figure out when a DBI is valid. Catch destructive
user errors, and flags which another process changed under us.
2013-02-19 22:02:37 +01:00
Hallvard Furuseth
e4af9ee5da
ITS#7515 mdb_dbi_open(): Also open in parent txns.
...
This makes aborting nested and non-nested txns more
similar: The new DBI is available to the surrounding
context (parent txn and MDB_env respectively).
2013-02-19 22:01:29 +01:00
Hallvard Furuseth
f19655eabc
ITS#7517 Document that dirty DBs may not be closed
2013-02-19 21:15:26 +01:00
Hallvard Furuseth
8ad25001ff
ITS#7485 Document key/data size limits in lmdb.h.
...
mdb.c already describes them. The user doc should too.
2013-02-19 21:14:23 +01:00