Howard Chu
122fa3a895
Merge remote branch 'origin/mdb.master'
2011-11-11 12:50:12 -08:00
Howard Chu
29de655bc4
Add MDB_FDATASYNC to allow override to fsync if needed.
2011-11-11 12:49:11 -08:00
Howard Chu
ca15238dfb
Merge remote branch 'origin/mdb.master'
2011-11-11 11:00:14 -08:00
Howard Chu
291c0ce2db
Use <inttypes.h> instead of <stdint.h>
2011-11-11 10:59:27 -08:00
Howard Chu
334099c0db
Merge remote branch 'origin/mdb.master'
2011-11-10 12:43:41 -08:00
Howard Chu
8763c41e30
Fix size check
2011-11-10 12:41:34 -08:00
Howard Chu
52a0d00031
Merge remote branch 'origin/mdb.master'
2011-11-09 15:36:00 -08:00
Howard Chu
04b522cc72
More Solaris warning cleanup
2011-11-09 15:32:37 -08:00
Howard Chu
b905811d3c
Merge remote branch 'origin/mdb.master'
2011-11-09 01:02:38 -08:00
Howard Chu
68143e4532
More pgno alignment tweaks
2011-11-09 00:36:50 -08:00
Howard Chu
056910df03
Merge remote branch 'origin/mdb.master'
2011-11-08 20:06:23 -08:00
Howard Chu
690792c170
Add dummy DKEY define
2011-11-08 20:05:29 -08:00
Howard Chu
dac408369b
Merge remote branch 'origin/mdb.master'
2011-11-08 19:05:39 -08:00
Howard Chu
cc7a89cd67
Add Solaris byte-order detection
2011-11-08 19:04:39 -08:00
Howard Chu
f0c9d77326
Fix mdb_drop return
2011-11-08 16:45:45 -08:00
Howard Chu
6018fe9671
Merge remote branch 'origin/mdb.master'
2011-10-14 22:05:37 -07:00
Howard Chu
a103a64434
Android/ARM portability
...
2-byte alignment isn't good enough for subpages
2011-10-14 22:03:46 -07:00
Howard Chu
277a8edd2e
Android defines wctomb but doesn't provide it
2011-10-12 19:18:05 -07:00
Howard Chu
fb5ba5f09c
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap
2011-10-06 19:15:43 -07:00
Howard Chu
331bf92df5
Fix page_split with MDB_RESERVE
2011-10-06 18:53:07 -07:00
Howard Chu
19e4df476d
Fix subcursor initialization
2011-10-06 16:12:52 -07:00
Howard Chu
1adc0b9b1c
Merge remote branch 'origin/mdb.master'
2011-10-04 02:22:01 -07:00
Howard Chu
934a19553c
Don't use Append mode when splits are caused by sub-page inserts
...
Sub-pages need room to grow...
2011-10-03 18:02:17 -07:00
Howard Chu
ea0d07ffa3
Fix freelist bug on page split
...
NULL out env->pghead before writing it, so that its pages can't be used
to satisfy the write.
2011-10-03 12:40:53 -07:00
Howard Chu
7cd16d7b9f
Merge remote branch 'origin/mdb.master'
2011-10-03 11:30:10 -07:00
Howard Chu
85bfb3c1d1
Add rudimentary MDB_MULTIPLE support for puts
...
Only for DUPFIXED DBs. Still could do better.
2011-10-03 11:28:14 -07:00
Howard Chu
02cafebb8e
Merge remote branch 'origin/mdb.master'
2011-10-02 21:28:55 -07:00
Howard Chu
fa3c2945f5
Add MDB_APPEND to avoid splitting full pages
2011-10-02 21:27:07 -07:00
Howard Chu
163514e470
Fix 6e05ca17e9
...
Missed a MDB_RESERVE case
2011-10-02 19:52:12 -07:00
Howard Chu
c2df36c86f
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap
2011-10-02 19:36:57 -07:00
Howard Chu
28b8aaeb96
Add mdb_cursor_txn() and mdb_cursor_dbi() for querying the cursor
2011-10-02 19:28:33 -07:00
Howard Chu
2dd578221b
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap
2011-10-02 11:14:53 -07:00
Howard Chu
6e05ca17e9
Add MDB_RESERVE mode
...
When putting a record, just make space for the data, don't copy it.
(Not compatible with MDB_DUPSORT, since the actual data is needed
to determine the insert location.)
2011-10-02 10:02:30 -07:00
Howard Chu
fe11433619
Tweak cursor adjustment code
...
Skip the original cursor that made the change
2011-09-30 22:15:05 -07:00
Howard Chu
8a5d0952ad
ITS#7006 fix MozNSS wildcard cert match
2011-09-30 03:27:19 -07:00
Rich Megginson
8e9af53fb6
ITS#7034 use mutex for connection handshake when using PEM nss
...
PEM nss is not thread safe when establishing the initial connection
using SSL_ForceHandshake. Create a new mutex - tlsm_pem_mutex - to
protect this function call.
The call to SSL_ConfigServerSessionIDCache() is not thread-safe - move it
to the init section and protect it with the init mutex.
2011-09-30 03:16:57 -07:00
Howard Chu
9b082bf716
ITS#7051 fix GNUtls cert dn parse
2011-09-30 00:41:13 -07:00
Howard Chu
19d1e72bbc
Make sure mdb_open actually got a sub-db record
2011-09-29 21:07:07 -07:00
Howard Chu
fa0d64242b
Doc for the MDB_NOSUBDIR env option
2011-09-22 21:46:12 -07:00
Howard Chu
7a40080dd1
Add MDB_NOSUBDIR option
...
Create the data file using exactly the given pathname, and
the lock file using a suffix on the data file name.
2011-09-22 18:05:06 -07:00
Howard Chu
54eb76cc7a
Reader table notes
2011-09-22 04:34:40 -07:00
Howard Chu
4bcaabecf5
assert cleanup
2011-09-21 17:21:48 -07:00
Howard Chu
619e671f1c
txn_abort/commit free all their cursors now.
2011-09-21 16:37:29 -07:00
Howard Chu
9bcc51ef5d
Only free malloc'd cursors
2011-09-21 16:06:52 -07:00
Howard Chu
c8c34cdd43
Merge remote branch 'origin/mdb.master'
2011-09-21 15:58:55 -07:00
Howard Chu
b9d13a29e6
Track changes to all cursors.
...
For any change to a page or node, update all other cursors pointing
at the same page (or node). Cursors are now stored in a linked list
off their owning transaction. Cursors are all closed when the transaction
ends. Cursors in parent transactions are updated when their child
transaction commits.
2011-09-21 15:55:27 -07:00
Howard Chu
c4d5e6e786
Add support for nested transactions.
2011-09-21 12:58:43 -07:00
Hallvard Furuseth
ef7f5f5e32
Cleanup ISO C compatibility for recent commits
2011-09-19 10:31:12 +02:00
Hallvard Furuseth
d9edc7d5af
Merge branch 'mdb.master'
2011-09-19 10:30:30 +02:00
Hallvard Furuseth
8fa10ae668
libmdb IDL cleanup.
...
Microoptimize IDL search.
Use RANGE_<FIRST/LAST> when IDL is known to be a range.
2011-09-19 10:27:49 +02:00
Howard Chu
02abfb91ba
Additional fix for prev commit
2011-09-18 18:26:54 -07:00
Howard Chu
76c6c8e5b7
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap
2011-09-18 18:14:05 -07:00
Howard Chu
4272e7de4f
Make sure 2 subpages fit in one real page
2011-09-18 18:13:23 -07:00
Howard Chu
001f149654
Merge remote branch 'origin/mdb.master'
2011-09-18 17:08:40 -07:00
Howard Chu
237fabda64
Fix last delete from a subpage
2011-09-18 17:07:47 -07:00
Howard Chu
0ab841598f
Fix 09006ccec7
...
Check for stale DBs was in the wrong place.
2011-09-18 16:39:18 -07:00
Howard Chu
7164c4c662
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap
2011-09-18 14:28:20 -07:00
Howard Chu
2c70d0430a
Fix mdb_drop() if not deleting the DB record
2011-09-18 14:22:27 -07:00
Howard Chu
77b1017b85
Fix typo, minor cleanup
2011-09-18 14:12:49 -07:00
Howard Chu
e76299c196
Merge remote branch 'origin/mdb.master'
2011-09-18 13:25:09 -07:00
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.
2011-09-18 12:37:02 -07:00
Howard Chu
09006ccec7
API change, consistency check
...
mdb_close() takes an env, not a txn.
Also, add check for stale DB records (in case some other process
wrote to the DB last).
2011-09-18 10:48:12 -07:00
Howard Chu
a05cbba77a
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap
2011-09-17 04:02:52 -07:00
Howard Chu
b7057eb61e
New sorted-dup subpage support
...
Instead of converting directly to a subDB when the first duplicate
item is seen for a key, convert to a subpage instead. Allow the
subpage to grow up to the overflow limit, then convert to a subDB.
This saves a significant amount of space in a typical slapd index
database.
Currently we don't convert back to the smaller form if items are
later deleted. Probably could do that with some hysteresis, e.g.,
convert back from subDB to subpage when the size drops below
(overflow limit/2). Maybe later.
2011-09-17 03:33:07 -07:00
Howard Chu
e1a5177bac
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap
2011-09-15 10:37:13 -07:00
Howard Chu
0a28548131
Use FNV-1A hash to generate unique mutex names
...
For Windows and MacOSX
2011-09-15 10:36:15 -07:00
Howard Chu
d9a60db75e
Merge remote branch 'origin/mdb.master'
2011-09-14 20:34:27 -07:00
Howard Chu
2c033676ea
Doc tweak - txn flags
2011-09-14 20:33:09 -07:00
Howard Chu
5b7c983a66
MacOSX semaphore names are limited to 31 chars
...
Including the terminating NUL. Good job documenting that, guys.
2011-09-14 20:30:26 -07:00
Howard Chu
8917b774f7
Merge remote branch 'origin/mdb.master'
2011-09-14 11:46:40 -07:00
Howard Chu
0533f80364
Add MacOSX support
...
mmap() with FIXEDMAP fails, otherwise things work.
2011-09-14 11:31:27 -07:00
Howard Chu
e222506b88
Minor doc cleanup
2011-09-14 01:46:08 -07:00
Howard Chu
9e3e7cefd8
More docs
2011-09-14 01:08:01 -07:00
Howard Chu
71a665aa9d
Namespace cleanup
2011-09-13 23:36:41 -07:00
Howard Chu
550dc4aaee
Merge remote branch 'origin/mdb.master'
2011-09-13 15:24:33 -07:00
Howard Chu
56fe0d4f1a
Tweak search_node inner loop to avoid LEAF2 checks
2011-09-13 13:42:02 -07:00
Howard Chu
70c79df1df
cursor_set/search_node tweaks, use intcmp when possible
2011-09-13 13:41:40 -07:00
Howard Chu
dc83777ab9
Minor tweaks, update relfunc behavior
2011-09-12 01:15:22 -07:00
Howard Chu
0f1522418e
Merge remote branch 'origin/mdb.master'
2011-09-11 23:58:50 -07:00
Howard Chu
25529a4c36
More cursor_init cleanup
2011-09-11 23:57:17 -07:00
Howard Chu
8acb755034
One more sub-cursor fix
2011-09-11 23:13:36 -07:00
Howard Chu
92a63ff790
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap into mdb.master
2011-09-11 22:23:35 -07:00
Howard Chu
3501248548
Fix 2e3bc39fa9
...
Various mistakes when converting from previous data structures.
Add a few more debug asserts/sanity checks.
Split all "if (foo) return" constructs to separate lines to allow
easier breakpoint setting.
Add mtest6 for checking mdb_split() behavior. This needs to be
expanded to check rebalance/merge cases too.
2011-09-11 22:17:10 -07:00
Hallvard Furuseth
946b38f471
Fix mdb debug formats
2011-09-11 19:29:24 +02:00
Hallvard Furuseth
ed0fc55fd3
Restore missing LAZY_LOCKS semicolon.
...
Lost in C90 compat commit c5dad7a6d0
.
2011-09-11 19:29:24 +02:00
Hallvard Furuseth
90ed553301
mdb integer type cleanup: Use MDB_dbi consistently.
...
This changes the prototype of mdb_env_set_maxdbs().
2011-09-11 19:29:24 +02:00
Hallvard Furuseth
b56be64d2e
Drop ULONG in favor of size_t.
2011-09-10 22:49:34 +02:00
Hallvard Furuseth
b1cfff4aeb
Add mdb.c:txnid_t for readability.
...
Maybe later we'll test txnid wraparound with it defined to ushort.
2011-09-10 22:49:34 +02:00
Hallvard Furuseth
bf9d722bec
mdb type cleanup: Consistent reader count types.
...
Use unsigned int for reader counts/max limits, that's the smallest
change. Don't need uint32_t when mdb_env_set_maxreaders() takes less.
Change prototypes of mdb_env_set_maxreaders,mdb_env_get_maxreaders().
Check the mdb_env_set_maxreaders() argument.
2011-09-10 22:49:34 +02:00
Hallvard Furuseth
5f68293475
explain mdl_midl_sort() istack size
2011-09-10 22:49:34 +02:00
Hallvard Furuseth
2d1f3b7ed3
Fix memn(r)cmp of key sizes > INT_MAX. Simplify.
2011-09-10 22:49:34 +02:00
Hallvard Furuseth
69e53cf700
Check some mdb integer type assumptions
2011-09-10 22:49:34 +02:00
Hallvard Furuseth
88da18cccf
Put MDB_node.<mn_lo,mn_hi> in host byte order.
2011-09-10 22:49:20 +02:00
Hallvard Furuseth
c5dad7a6d0
C90 compatibility cleanup in mdb.
...
Fix void* pointer arithmetic in cintcmp().
Fix invalid ';'s in declarations after possibly-empty macros.
2011-09-10 15:39:02 +02:00
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).
2011-09-10 10:11:55 +02:00
Hallvard Furuseth
ec2d82f79a
libmdb/.gitignore += test[45], Doxygen output
2011-09-10 10:11:55 +02:00
Howard Chu
8623c98726
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap
2011-09-09 22:29:37 -07:00
Howard Chu
acdc248f57
If put(NOOVERWRITE) exists, return existing data
2011-09-09 22:28:07 -07:00
Howard Chu
a7edb95e64
Minor typos, additional clarification
2011-09-09 03:52:12 -07:00
Howard Chu
c7d6c0fab3
Add a few NULL checks to defend against dumb API checkers.
...
Unfortunately automated checkers don't seem to read the documentation
for how APIs are expected to be used, and the C declaration syntax
isn't expressive enough to encode the documented usage.
2011-09-08 23:41:06 -07:00
Howard Chu
0c487538cf
Partial revert, fix MDB_page definition
2011-09-08 20:18:29 -07:00
Howard Chu
9ac8638d9d
More docs
2011-09-08 17:13:51 -07:00
Howard Chu
badc324647
Merge remote branch 'origin/mdb.master'
2011-09-08 14:35:17 -07:00
Howard Chu
bed3123b82
More docs
2011-09-08 14:34:21 -07:00
Pierangelo Masarati
568e3b7faa
fix uninit'ed vars (ITS#7039)
2011-09-08 23:32:58 +02:00
Howard Chu
1b69295a48
Speedup cintcmp
...
Now that we know we're always 2-byte aligned...
2011-09-08 13:10:17 -07:00
Howard Chu
cb24efd287
Merge remote branch 'origin/mdb.master'
2011-09-08 10:11:30 -07:00
Howard Chu
dac3fae3b5
Fix previous commit
2011-09-08 10:08:21 -07:00
Howard Chu
cba0d05a9d
Merge remote branch 'origin/mdb.master'
2011-09-07 23:58:29 -07:00
Howard Chu
8678fef597
Forgot to commit this
2011-09-07 23:11:14 -07:00
Howard Chu
2e3bc39fa9
Further cursor-based restructuring
...
Get rid of all of the redundant MDB_*page structs and other cruft.
2011-09-07 23:09:45 -07:00
Howard Chu
976a150973
Cleanup unused code
2011-09-06 23:37:37 -07:00
Howard Chu
619cebee12
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap
2011-09-06 23:22:40 -07:00
Howard Chu
1f8c3369b9
Fix mdb_move_node again
2011-09-06 23:16:45 -07:00
Howard Chu
06ec9f1db2
ITS#7035 don't loop forever in wait4msg
2011-09-06 21:13:49 -07:00
Howard Chu
473e2c997f
Merge branch 'mdb.master' of /home/hyc/OD/mdb
2011-09-06 15:24:00 -07:00
Howard Chu
f9c8796d0b
Fix search_node, add cintcmp
2011-09-06 15:22:53 -07:00
Howard Chu
ee3f050000
Merge branch 'mdb.master' of /home/hyc/OD/mdb
2011-09-06 13:55:02 -07:00
Howard Chu
5e6a864513
Guarantee nodes are 2-byte aligned
...
Also fix xcursor_init1 md_dirty flag
Also another mdb_cmp refactoring fix
2011-09-06 13:50:51 -07:00
Howard Chu
293df78b2b
Change MDB_node to depend on 2-byte alignment
2011-09-06 05:17:24 -07:00
Howard Chu
e071488c85
Merge remote branch 'mdb/mdb.master'
2011-09-05 16:56:02 -07:00
Howard Chu
807841b1aa
Fix for mdb_cmp refactoring
2011-09-05 16:54:39 -07:00
Howard Chu
13ad0aedcc
More merge fix
2011-09-05 16:20:31 -07:00
Howard Chu
513d96105d
Fix bad merge
2011-09-05 16:15:36 -07:00
Howard Chu
ffdf3d7afb
Merge remote branch 'mdb/mdb.master'
2011-09-05 15:19:41 -07:00
Howard Chu
963c421a97
Minor cleanup
2011-09-05 14:22:46 -07:00
Howard Chu
e44d4cf06a
Use mdb_midl_append/sort instead of _insert
2011-09-05 02:37:43 -07:00
Howard Chu
2cde97ae94
Use mdb_midl_append/sort instead of _insert
2011-09-05 02:36:24 -07:00
Howard Chu
221be39208
mdb_cmp refactoring
2011-09-05 01:19:24 -07:00
Howard Chu
0609aa45b3
Reimplement basic ops as cursor ops
2011-09-05 01:19:24 -07:00
Howard Chu
23790cf390
Add MDB_{FIRST,LAST}_DUP for cursor_get
2011-09-05 01:17:13 -07:00
Howard Chu
9cfbea8e8f
Cleanup midl, start documenting internals
2011-09-05 01:16:44 -07:00
Howard Chu
0f679e9386
Tweak docs
2011-09-05 01:16:33 -07:00
Howard Chu
70a4f6f29d
mdb_cmp refactoring
2011-09-05 00:46:32 -07:00
Howard Chu
7bb14a2e79
Cursor stuff working, no major perf gain
2011-09-04 21:33:57 -07:00
Howard Chu
1843fe0b53
Cursors in-progress, broken
2011-09-04 21:33:57 -07:00
Howard Chu
8d89a53165
Use cursor->mc_flags
2011-09-04 21:33:57 -07:00
Howard Chu
7f46832ec5
Begin reimplementing basic ops as cursor ops
2011-09-04 21:33:57 -07:00
Howard Chu
f6edbd7793
Add MDB_{FIRST,LAST}_DUP for cursor_get
2011-09-04 21:33:57 -07:00
Howard Chu
2197928aaa
Fix mdb_split, fix MDB_GET_BOTH
2011-09-03 20:12:09 -07:00
Howard Chu
9d821c26c3
Fix mdb_split, fix MDB_GET_BOTH
2011-09-03 20:11:07 -07:00
Howard Chu
e91dae3ed5
Cleanup midl, start documenting internals
2011-09-03 14:27:07 -07:00
Howard Chu
b30d0266e7
Tweak docs
2011-09-02 01:09:11 -07:00
Howard Chu
02cff39398
Merge remote branch 'mdb4/master'
2011-09-01 16:50:26 -07:00
Howard Chu
30736a0ff5
Ugly-as-sin initial Windows port
2011-09-01 16:31:10 -07:00
Howard Chu
2510bea718
API cleanup, doxygen docs for public API
2011-09-01 16:31:10 -07:00
Howard Chu
0f459dd773
Cleanup, fix freelist alloc
...
Don't allow new pages for free list to come from the free list.
Otherwise a nasty data self-reference occurs that is too much
trouble to unwind.
2011-09-01 16:31:10 -07:00
Howard Chu
f7aa0d5e4a
Tweak locks, fix race conditions
2011-09-01 16:31:10 -07:00
Howard Chu
d27a7754f3
Reduce excessive memcpy in mdb_split
2011-09-01 16:31:10 -07:00
Howard Chu
027e1daa10
Fix mdb_split, tweak split_indx if space is tight
2011-09-01 16:31:10 -07:00