Hallvard Furuseth
753356a38a
Warning cleanup.
...
Drop unused computed/assigned values.
mdb_page_alloc(): Make "mop_len>0 implies mop!=NULL" provable.
11 years ago
Hallvard Furuseth
9f7ae8925f
Add Caveat: Readers need write access. Whitespace.
11 years ago
Hallvard Furuseth
7bdb5be0b5
Rename SWAP() to avoid conflict with sqlightning.
...
Happened since sqlightning #includes mdb.c, midl.c.
11 years ago
Howard Chu
e9ed4d75f7
Spill pages, take 3
12 years ago
Hallvard Furuseth
7f67383552
Fix alloc/free issues.
...
Page leak, mdb_page_alloc(). On error, don't shorten me_pghead.
Memleak, mdb_ovpage_free(). Free page or keep it in dirty_list.
Bad MIDL, mdb_midl_need(). Fix midl[-1] (allocated size).
12 years ago
Hallvard Furuseth
51ff20a4d6
Tweak MIDLs, catch errors.
...
Grow midls earlier in order to catch errors earlier. Use
mdb_midl_need() instead of mdb_midl_grow(), then mdb_midl_xappend()
needs no error checks. Factor out mdb_midl_append_range().
12 years ago
Hallvard Furuseth
4a9ee2cb72
ITS#7620: Keep empty IDLs. Tweak mdb_page_alloc().
...
MDB_env.me_pghead: Don't free it when empty. mdb_ovpage_free()
needs it, but cannot allocate it.
mdb_midl_alloc(): Fill in length=0.
mdb_page_alloc(): Also Skip freeDB if txnid<3, instead of <4,
and consistently DPRINTF consumed IDLs.
12 years ago
Hallvard Furuseth
92fe958805
Drop unused liblmdb MIDL-range support.
12 years ago
Howard Chu
9ebd5992c9
Fix 66c839f029
...
Forgot #include <errno.h>
12 years ago
Howard Chu
66c839f029
Refactor mdb_midl_append, add mdb_midl_grow()
12 years ago
Howard Chu
bccbcd1938
Silence stupid warnings
12 years ago
Howard Chu
fed573cb86
Happy New Year
12 years ago
Howard Chu
5af47adf6b
Fix mdb_midl_shrink
12 years ago
Howard Chu
98fe339089
Rename libmdb to liblmdb
12 years ago
Howard Chu
bb36bdcd1c
ITS#7432 fix typo in mdb_midl_sort
...
Wasn't pushing the optimal half of the array onto the stack,
thus used more stack than expected -> overrun.
12 years ago
Howard Chu
d8a89464cd
Add MDB_WRITEMAP to use a writable mmap
12 years ago
Hallvard Furuseth
20baad4a20
libmdb: midl.h namespace cleanup.
...
Prefix ID, NOID, ID2, IDL, ID2L with 'MDB_'.
Also drop bdb from file description.
13 years ago
Kurt Zeilenga
81afbb2fca
Happy New Year!
13 years ago
Howard Chu
c4d5e6e786
Add support for nested transactions.
13 years ago
Hallvard Furuseth
8fa10ae668
libmdb IDL cleanup.
...
Microoptimize IDL search.
Use RANGE_<FIRST/LAST> when IDL is known to be a range.
13 years ago
Howard Chu
77b1017b85
Fix typo, minor cleanup
13 years ago
Howard Chu
57b5fbea49
Add mdb_drop() for deleting a DB
...
Allow MIDLs to grow arbitrarily, to allow unlimited number of
pages to be freed in one txn.
13 years ago
Hallvard Furuseth
5f68293475
explain mdl_midl_sort() istack size
13 years ago
Hallvard Furuseth
3dc8fa491a
Cleanup mdb macros.
...
Parenthesize. Rename GetPageSize -> GET_PAGESIZE since it does not
behave like a function (it has a non-pointer output argument).
13 years ago
Howard Chu
963c421a97
Minor cleanup
13 years ago
Howard Chu
2cde97ae94
Use mdb_midl_append/sort instead of _insert
13 years ago
Howard Chu
e91dae3ed5
Cleanup midl, start documenting internals
13 years ago
Hallvard B Furuseth
cb7c955220
Simplify: Replace IDL*_CMP() with CMP()
13 years ago
Hallvard B Furuseth
3029bb694d
Macro cleanup: Parenthesize, simplify, remove a ;
13 years ago
Howard Chu
1aa5105b67
Use IDL2 for dirty page list
13 years ago
Howard Chu
985f765dc5
Rename idl to midl
13 years ago
Howard Chu
785d8e184c
Start using as a library
13 years ago
Howard Chu
60550e14ee
Add some legalese
...
Note derived from Martin Hedenfalk's btree.c; the code
is significantly reworked but owes a lot to the original.
13 years ago
Howard Chu
194334b2f7
Replace ulong with ULONG macro
13 years ago
Howard Chu
27ab75ef36
Re-use old pages
13 years ago