-
a2ac1010
by Hallvard Furuseth at 2014-10-01T20:35:12+01:00
Add MDB_ROBUST
-
f6add293
by Howard Chu at 2014-10-01T20:36:11+01:00
Free write mutex earlier in txn_reset0
-
ec6cf4e4
by Hallvard Furuseth at 2014-10-01T20:36:21+01:00
MDB_ROBUST: Use MDB_PID_T. Drop a wmutex variable.
-
a53716ed
by Howard Chu at 2014-10-01T20:36:37+01:00
Must do dlist_free before releasing Wmutex
-
58ddb552
by Howard Chu at 2014-10-01T20:37:25+01:00
Use SysV semaphores instead of POSIX
Since they can cleanup after themselves on process exit
-
e3b6c359
by Howard Chu at 2014-10-01T20:58:15+01:00
Use robust mutexes by default
Making it optional on pthreads just complicates things;
they're always robust on other implementations
-
8bec53fd
by Howard Chu at 2014-10-01T21:00:03+01:00
Don't use -fPIC for static lib
-
fd0315d6
by Howard Chu at 2014-10-02T21:34:55+01:00
ITS#7952 .gitignore mdb_dump/load
-
61dd0178
by Howard Chu at 2014-10-02T21:35:15+01:00
ITS#7953 .gitignore *.lo
-
bfe297da
by Howard Chu at 2014-10-02T21:58:20+01:00
ITS#7955, #7671 fix MDB_PREV_DUP
-
56c2c160
by Howard Chu at 2014-10-02T22:11:43+01:00
ITS#7956 fix compact of empty env
-
461d9c8f
by Leo Yuriev at 2014-10-02T23:43:57+01:00
ITS#7841 trivial cleanup
TRIVIA - lmdb: clean testdb-dir while "make test".
-
d77e3ddb
by Jean-Christophe DUBOIS at 2014-10-03T21:10:49+01:00
ITS#7959 Check fstat return value
Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
-
d72b2f5d
by Howard Chu at 2014-10-04T21:48:49+01:00
ITS#7961 fix txn init
More fallout from 4d02c741b120786df1b87ee9ed49c1d3f9bc7522
-
925e7805
by Howard Chu at 2014-10-08T19:25:27+01:00
ITS#7959 fix prev commit
fstat returns -1, not an errno. Move code into its own function
for reuse.
-
9a80a8a8
by leo@yuriev.ru at 2014-10-18T06:53:53+01:00
ITS#7969 LMDB: volatile & __synchronize().
Globally shared fields of meta-data are not 'volatile'.
-
bd6d2e6f
by leo@yuriev.ru at 2014-10-18T06:57:58+01:00
ITS#7970 LMDB: Critical Heisenbug
Inconsistent reading & SIGSEGV due to the race condition.
-
9a8eb956
by leo@yuriev.ru at 2014-10-18T07:00:52+01:00
ITS#7971 LMDB: clarification in mdb_txn_renew0().
-
9a72292a
by Hallvard Furuseth at 2014-11-28T16:32:23+00:00
ITS#7961,#7987 Re-fix txn init.
More fallout from 4d02c741b120786df1b87ee9ed49c1d3f9bc7522:
Don't modify another thread's write txn. Reinit me_txn0 fully.
-
42110d83
by Hallvard Furuseth at 2014-12-01T08:59:29+01:00
Simplify recent changes a bit.
-
443a7e40
by Hallvard Furuseth at 2014-12-01T08:59:29+01:00
Fix robust mutexes - repair mti_txnid.
Broken by e3b6c359a935283c21e1fd7d03b790d87d53b933, if
commit() crashes in write_meta before setting mti_txnid.
-
4bda1d24
by Hallvard Furuseth at 2014-12-01T08:59:29+01:00
Clean up SysV semaphore code.
Change MDB_LOCK_FORMAT to differ from Posix semaphores/mutexes.
Do not use array/member length 0 for MDB_txninfo.mt2.
-
4376a19c
by Hallvard Furuseth at 2014-12-01T08:59:29+01:00
Fix comments
-
0697869d
by Hallvard Furuseth at 2014-12-01T08:59:29+01:00
mdb_strerror: Silence warning @ Windows
-
c306423a
by Hallvard Furuseth at 2014-12-03T12:27:53+01:00
Fix WIN32 -> _WIN32
-
3e6ac6ef
by Hallvard Furuseth at 2014-12-03T12:37:55+01:00
For ITS#7789: Ensure mapsize >= pages in use.
Check new mapsizes against mm_last_pg. Move
mdb_env_init_meta0() so it can set mm_last_pg earlier.
-
1413de3a
by Hallvard Furuseth at 2014-12-05T18:18:53+01:00
Fix SysV semaphores - repair mti_txnid.
Similar to 443a7e40c4280cfd07cbf80c5de62ea072b136e3.
-
b660491d
by David Barbour at 2014-12-05T19:17:52+00:00
ITS#7994 Access to current transaction ID.
I, David Barbour, hereby place the following modifications to OpenLDAP
Software (and only these modifications) into the public domain. Hence,
these modifications may be freely used and/or redistributed for any
purpose with or without attribution and/or other notice.
-
c36c167c
by Howard Chu at 2014-12-05T19:18:01+00:00
ITS#7994 fix prev commit
Strip docs promising behaviors that we don't promise to hold.
Strip MDB_txnid_t typedef.
-
1a7243b3
by Leo Yuriev at 2014-12-05T19:30:31+00:00
ITS#7987 fix excessive space for single write txn
-
03ddbcf3
by Hallvard Furuseth at 2014-12-05T21:00:21+01:00
C90-compatible code for SysV semaphores
-
9cc04f60
by Howard Chu at 2014-12-08T03:21:09+00:00
Clarify mdb_dbi_open doc
The concurrency restriction is on threads within a single process.
Multiple processes can use mdb_dbi_open without affecting each other.
-
cccc947b
by Hallvard Furuseth at 2014-12-08T09:56:36+01:00
Try to avoid an invalid datafile after failed init
-
6c711732
by Hallvard Furuseth at 2014-12-13T20:35:08+01:00
make clean: remove *.lo
-
7ce29b9e
by Howard Chu at 2014-12-15T20:40:59+00:00
Fix MDB_APPEND doc
We actually compare the new key against the last key, to prevent
corruption.
-
0018eeb2
by Howard Chu at 2014-12-18T04:38:53+00:00
Hack for potential ext3/ext4 corruption issue
Use regular fsync() if we think this commit grew the DB file.
-
985bbbbd
by Howard Chu at 2014-12-21T00:13:50+00:00
Fix prev commit for env_sync0
-
0ef1e0b1
by Howard Chu at 2015-01-08T11:29:30+00:00
Revert "Fix prev commit for env_sync0"
This reverts commit 985bbbbdd5d64e57f55249ffdeb7c08035b240b2.
Revert "Hack for potential ext3/ext4 corruption issue"
This reverts commit 0018eeb2c3b2239c30def9d47c9d194a4ebf35fe.
-
9585c012
by Howard Chu at 2015-01-08T11:42:08+00:00
Simpler fdatasync hack
-
293d6bb4
by Howard Chu at 2015-01-08T11:43:57+00:00
Note MDB_SAFE_FDATASYNC
-
e86072a9
by Howard Chu at 2015-01-08T12:17:58+00:00
Revert "Note MDB_SAFE_FDATASYNC"
This reverts commit 293d6bb47f7f0d54a45d57ce2be3a9595e806dc0.
Revert "Simpler fdatasync hack"
This reverts commit 9585c012335b2a28fbfdd267bcdeeeea91dc0f08.
-
462dc097
by Howard Chu at 2015-01-08T12:54:14+00:00
fdatasync hack, again
Check for ext3/ext4 fs, then check kernel version.
-
f83f62a7
by Howard Chu at 2015-01-09T11:25:52+00:00
ITS#8021 env_sync is invalid in RDONLY env
-
ea89e3d2
by Howard Chu at 2015-01-11T11:37:37+00:00
Tweak conditionals for fdatasync hack
-
8b6c4250
by Howard Chu at 2015-01-12T10:42:26+00:00
More cleanup for fdatasync hack
-
94410124
by Hallvard Furuseth at 2015-01-12T12:19:51+01:00
ITS#8021 doc: Don't mix MDB_WRITEMAP + non-WRITEMAP
-
631970e4
by Hallvard Furuseth at 2015-01-12T21:02:29+01:00
Make SysV semaphores robust. Cleanup MDB_ROBUST.
-
d711e357
by Hallvard Furuseth at 2015-01-12T21:02:29+01:00
Whitespace (align with mdb.RE)
-
71741a6b
by Howard Chu at 2015-01-13T19:19:09+00:00
Fix potential null deref (coverity)
-
404697b3
by Hallvard Furuseth at 2015-01-14T08:12:50+01:00
mdb_env_set_flags(): Reject CHANGELESS flags.
Reverts part of a2ac10107e2fb845c4a38a339239063ec4407d84.
MDB_ROBUST needed to be accepted, but that flag is gone.
-
b2ab9910
by Hallvard Furuseth at 2015-01-17T06:32:12+01:00
ITS#7971 Fix reader allocation and me_numreaders
-
570ba6fb
by Hallvard Furuseth at 2015-01-27T06:10:57+01:00
Fix EACCES description
-
3368d1f5
by Howard Chu at 2015-01-30T09:21:39+00:00
Support MDB_NOSYNC on mdb_txn_begin()
-
8bb541bc
by Howard Chu at 2015-02-02T10:33:41+00:00
Also support NOMETASYNC on txn_begin
-
f526f1b9
by Quanah Gibson-Mount at 2015-02-12T10:46:33-06:00
Happy New Year
-
6fe12f32
by Quanah Gibson-Mount at 2015-02-12T11:17:59-06:00
Happy New Year
-
04af46b1
by Howard Chu at 2015-02-26T21:37:01+00:00
ITS#8066 fix mdb_load with large values
-
d2dab3c9
by Howard Chu at 2015-03-18T19:26:21+00:00
ITS#8062 fix uninit'd cursor index
-
49bb9e82
by Hallvard Furuseth at 2015-04-08T21:47:24+02:00
mdb_txn_renew(): Clear error from previous txn
-
54516639
by Hallvard Furuseth at 2015-04-08T21:51:16+02:00
Renumber MDB_TXN_* flags, simplify flag code
-
8adee946
by Hallvard Furuseth at 2015-04-08T21:51:50+02:00
Fix per-txn MDB_NOMETASYNC, MDB_NOSYNC.
Fallout from 4d02c741b120786df1b87ee9ed49c1d3f9bc7522. The flags
were ignored: mdb_txn_renew0/begin cleared and/or did not set them.
-
6a86f22b
by Hallvard Furuseth at 2015-04-08T21:52:05+02:00
Cleanup MDB_env.me_txn0.
More fallout from 4d02c741b120786df1b87ee9ed49c1d3f9bc7522.
-
5224774f
by Hallvard Furuseth at 2015-04-14T20:24:30+02:00
Reformat mdb_dbi_open() doc for clarity
-
2f6877ff
by Hallvard Furuseth at 2015-04-14T20:25:51+02:00
Cleanup mtest* and sample-*.
Fix mdb_txn_begin(&read-only txn) calls. Test mdb_env_set_maxreaders().
Rename DBI open/close functions. Move mdb_dbi_close() out of txn.
-
b0fca5b9
by Howard Chu at 2015-04-15T23:20:55+01:00
ITS#8062 fix rebalance
(Probably fixes the ITS, definitely fixes a bug) when collapsing
the root page, fixups of other cursors was incomplete.
-
ccf4d8b3
by Howard Chu at 2015-04-16T00:20:28+01:00
ITS#8062 also handle subcursors
-
4c62fde8
by Howard Chu at 2015-04-17T18:32:54+01:00
ITS#8106 retry writes on EINTR
-
f4cab299
by Howard Chu at 2015-04-23T05:49:56+01:00
ITS#8109 fix mdb_cursor_del0 on empty DB
-
ed13d4aa
by Howard Chu at 2015-04-29T17:13:55+01:00
ITS#8117 fix INTEGERDUP compare
-
ce7ba0ce
by Howard Chu at 2015-04-29T17:28:21+01:00
ITS#8117 cleanup prev commit
-
3d2202f3
by Howard Chu at 2015-05-03T07:56:40+01:00
Revert "ITS#8117 cleanup prev commit"
This reverts commit ce7ba0ceb69fd2cd56d557c1a877d046ec9f246c.
Revert "ITS#8117 fix INTEGERDUP compare"
This reverts commit ed13d4aa59cf06a1bb6b096fe19af63fc6f8737a.
-
329e12e4
by Howard Chu at 2015-05-03T07:57:22+01:00
ITS#8117 better fix
Don't change mc_dbx because we would need to undo the change if
the txn aborts. Make the fix (for get) match existing code for put.
-
9bb91567
by Hallvard Furuseth at 2015-05-19T20:33:35+02:00
ITS#8117 Fix MDB_INTEGERDUP keysize doc + md_dcmp
-
77bdbdd9
by Hallvard Furuseth at 2015-05-20T03:17:47+02:00
mtest*.c: Fix MDB_NOOVERWRITE, plug cursor leak
-
02e8de5e
by Hallvard Furuseth at 2015-05-20T04:04:38+02:00
Set/clear mp_pad, md_pad (MDB_DUPFIXED data size).
mdb_xcursor_init1(): md_pad is only used when MDB_DUPFIXED.
mdb_page_split(): Copy mp_pad too. Used by mdb_page_list().
-
8d1f6ca7
by Hallvard Furuseth at 2015-05-27T22:23:50+02:00
mdb_txn_renew(): Drop pointless diff from mdb.RE.
Makes the code friendlier to "git cherry-pick".
-
aa16d7bc
by Hallvard Furuseth at 2015-05-27T22:26:54+02:00
ITS#8157 mdb_txn_renew0(): init after error checks
-
579ad14d
by Hallvard Furuseth at 2015-05-28T20:51:24+02:00
ITS#8156 Fix MDB_MAXKEYSIZE doc
-
68f64aa1
by Hallvard Furuseth at 2015-06-02T20:49:33+02:00
Clarify mdb_env_open() doc of 'mode' param
-
e95d57f3
by Hallvard Furuseth at 2015-06-02T20:51:03+02:00
Use ftok() for semget(), and only lower mode bits
-
bf55ce55
by Howard Chu at 2015-06-19T14:13:43+01:00
Bump version to 0.9.15
(not really, since this is the dev/non-release branch)
-
7d162bcf
by Howard Chu at 2015-07-02T18:03:36+01:00
CHANGES only belongs in mdb.RE
-
8293b20c
by Hallvard Furuseth at 2015-07-02T21:06:27+02:00
Add MDB_USE_POSIX_MUTEX.
So far just to help aligning mdb.master and mdb.RE.
We'll make it an option later.
-
9574b656
by Hallvard Furuseth at 2015-07-02T21:06:35+02:00
Fix mdb_mutex_t, add mdb_mutexref_t, drop MDB_MUTEX().
Fixes the types of Windows HANDLEs, they became HANDLE*.
MDB_MUTEX() took a magic r/w arg which it's nice to get rid of.
-
943b23f0
by Hallvard Furuseth at 2015-07-02T21:14:56+02:00
Restore support for Posix semaphores
-
a937740a
by Hallvard Furuseth at 2015-07-03T22:38:50+02:00
ITS#7969 Wrap unportable __sync_synchronize in #if
-
11536bea
by Hallvard Furuseth at 2015-07-04T13:42:41+02:00
mdb_env_get_flags(): Hide internal flags
-
f702e33b
by Hallvard Furuseth at 2015-07-04T13:48:01+02:00
Use mdb_cmp_long() for FREE_DBI
-
b6ac0cd9
by Hallvard Furuseth at 2015-07-04T13:48:02+02:00
mdb_drop0(): Omit scanning DUPSORT sub-DB leaves
-
53058715
by Hallvard Furuseth at 2015-07-04T13:48:03+02:00
mdb_txn_begin() cleanup
-
084d412f
by Hallvard Furuseth at 2015-07-04T13:48:04+02:00
Simpler mdb_txn_commit().
mt_env is always set.
Commit(mt_child) resets mt_child, so parent need not.
-
be0cdc1c
by Hallvard Furuseth at 2015-07-04T13:48:05+02:00
Simpler mdb_node_shrink()
-
4033f31a
by Hallvard Furuseth at 2015-07-04T13:48:06+02:00
Simpler mdb_drop().
MDB_DBI_CHANGED(,MAIN_DBI) is never true.
-
5cd5e928
by Hallvard Furuseth at 2015-07-04T13:48:07+02:00
Simpler flag/DBI checks and MDB_DEBUG
-
ebb8b671
by Hallvard Furuseth at 2015-07-04T13:49:12+02:00
Add DB_USRVALID, to avoid 'dbi == FREE_DBI' tests
-
ad87d6a3
by Hallvard Furuseth at 2015-07-04T13:50:21+02:00
More ESECT declarations
-
749633e4
by Howard Chu at 2015-07-07T13:42:41+01:00
ITS#8190 fix cursor EOF bug
-
45e40552
by Hallvard Furuseth at 2015-07-11T21:01:40+02:00
ITS#8181 Verify that records are/aren't DBs.
Except we don't catch the user passing F_SUBDATA to
mdb_cursor_<put/del>, like an internal LMDB call.
-
62aabaa4
by Hallvard Furuseth at 2015-07-11T21:09:36+02:00
Simpler mdb_node_add()
-
91fc43f1
by Hallvard Furuseth at 2015-07-11T21:10:33+02:00
Factor me_metas[toggle] out to mdb_env_pick_meta()
-
90f6fc4b
by Hallvard Furuseth at 2015-07-19T21:18:31+02:00
ITS#8200 Fix mdb_midl_shrink() usage, return void
-
b6973a33
by Hallvard Furuseth at 2015-07-19T21:30:12+02:00
Move code into mdb_txn_end(). Was mdb_txn_reset0.
Side effects:
* Clean txn up a bit even before freeing it.
* Tweak DEBUG output at txn end. Add DEBUG after commit(writer).
-
3e301ec4
by Hallvard Furuseth at 2015-07-19T21:31:25+02:00
Catch most uses of finished/parent txns.
* Add MDB_TXN_FINISHED, MDB_TXN_HAS_CHILD, MDB_TXN_BLOCKED.
* Clear mt_numdbs in writers, for TXN_DBI_EXIST() to catch.
We already do in readers.
-
060b63a5
by Hallvard Furuseth at 2015-07-19T21:31:54+02:00
Cleanup: Drop !mt_dbxs hack, use MDB_TXN_FINISHED
-
d7db12ad
by Hallvard Furuseth at 2015-07-19T21:43:10+02:00
ITS#7377 Always notice env error on txn startup.
Move the check to the end of txn startup. Catches env
breakage which happens while the new txn waits for a lock.
-
4dea7d44
by Hallvard Furuseth at 2015-07-19T21:44:02+02:00
ITS#7377 Catch mdb_put() to blocked/read-only txns
...early enough that txn state is left unchanged.
-
af29f6a5
by Hallvard Furuseth at 2015-07-26T07:16:41+02:00
Kill magic numbers for NUM_METAS, databases
-
2c6c267a
by Hallvard Furuseth at 2015-07-26T07:20:19+02:00
Simpler mdb_env_write_meta()
-
572aff7e
by Howard Chu at 2015-07-29T20:01:34+01:00
ITS#8192 fix reference to EINTR on WIN32 from ITS#8106
-
d4f95682
by Howard Chu at 2015-07-29T20:03:43+01:00
ITS#8192 cleanup unused label on WIN32
-
c9d45600
by Howard Chu at 2015-07-30T00:54:05+01:00
ITS#8192 fix typo
-
80e997a0
by Howard Chu at 2015-08-14T01:01:40+01:00
Bump version to 0.9.16
-
8d198fdd
by Pavel Medvedev at 2015-08-19T16:39:08+01:00
ITS#8067 add ssize_t typedef for MSVC
-
10c808e4
by Pavel Medvedev at 2015-08-19T17:21:16+01:00
ITS#8069 char* strings on Windows are ASCII
-
c77fbc6f
by Howard Chu at 2015-08-21T21:40:33+01:00
Another MDB_APPEND doc tweak
Missed this in 7ce29b9edbdaf34b7aeb545324008ed4dff62952
-
bc4c177b
by Howard Chu at 2015-08-22T14:00:12+01:00
Doc tweak - MDB_RESERVE / DUPSORT incompat
For those people who insist on ignoring the obvious.
-
e9e3c9fb
by Hallvard Furuseth at 2015-08-23T11:12:45+02:00
ITS#7377 mdb_env_init_meta(): Catch calloc error
-
7e476e49
by Howard Chu at 2015-09-06T20:38:58+01:00
ITS#8237 fix ITS#7589 regression
-
62826b09
by Luke Yeager at 2015-09-25T19:59:30+01:00
ITS#8256 Create install directories if needed
-
7267e0f5
by Howard Chu at 2015-09-26T16:50:28+01:00
ITS#8221 don't merge branch pages needlessly
-
2247507b
by Howard Chu at 2015-09-27T22:34:22+01:00
ITS#8221 cleanup prev commit
-
3cbbe3a0
by Howard Chu at 2015-09-29T17:31:56+01:00
ITS#8221 fix typos
-
e034bd3d
by Howard Chu at 2015-09-30T18:11:20+01:00
ITS#8259 fix usage ordering
-
436333b1
by Hallvard Furuseth at 2015-10-01T19:43:58+02:00
Fix typo in mdb_tassert().
No effect on current code.
-
8b46dcc2
by Howard Chu at 2015-10-04T02:14:29+01:00
ITS#8258 fix rebalance/split
The tree height can also increase during rebalance, not just shrink.
This can happen if update_key needs to split a parent branch page.
-
b42cd651
by Howard Chu at 2015-10-06T08:02:03+01:00
ITS#8264 fix cursor_del cursor tracking
Some destination fixups need to happen immediately after nodes
are moved, before rebalancing
-
c456d219
by Howard Chu at 2015-10-07T06:30:58+01:00
ITS#8263 fix cursor tracking in cursor_put
-
e211b870
by Hallvard Furuseth at 2015-10-11T21:40:49+01:00
ITS#8263 streamline prev patch
-
7c1baed4
by Howard Chu at 2015-10-12T00:08:41+01:00
ITS#7771 fix cursor tracking on fake pages
node_del shifts nodes around, cursors pointing at fake pages
need to have their mc_pg[0] corrected.
-
9411de60
by Howard Chu at 2015-10-12T10:29:09+01:00
ITS#7771 more for prev commit
-
619ccdd3
by Ignacio Casal Quinteiro at 2015-10-25T08:06:37+00:00
ITS#8270 win32: fix conversion error with MSVC
-
2ee9c4a3
by Hallvard Furuseth at 2015-10-28T09:37:23+01:00
Fix MDB_NOSYNC,MDB_NOMETASYNC thinko
-
2be67975
by Howard Chu at 2015-10-31T02:11:47+00:00
Add MDB_NO_ROBUST to disable Robust Mutexes
-
b9130d3d
by Howard Chu at 2015-10-31T02:28:12+00:00
Use MDB_USE_ROBUST not MDB_NO_ROBUST
-
d372a2a1
by Howard Chu at 2015-11-04T17:03:48+00:00
ITS#8299 fix page_merge cursor fixup
The parent's mc_ki has changed. We need to fix that up as well
in other cursors.
-
eddd9b75
by Howard Chu at 2015-11-04T18:12:33+00:00
ITS#8238 fix DUPFIXED page_split
Parent mc_ki wasn't adjusted if new_indx was > split point
-
0c777dfc
by Howard Chu at 2015-11-04T21:02:32+00:00
ITS#8300 fix rebalance after node_move
ITS#8258, ITS#7829 fixes checked parent index to see if we were moving
from a left neighbor. Should have just checked to see if current index
was 0, meaning we added on the left. (Parent index may not tell us
anything meaningful after a nested rebalance.)
-
7a5a78ef
by Howard Chu at 2015-11-04T21:02:44+00:00
ITS#8300 fix node_move
Don't adjust other cursors when we added a node on the right.
-
b12bdaaa
by Howard Chu at 2015-11-04T22:32:05+00:00
ITS#8300 more for node_move fixups
When moving a node from the right neighbor, a different
adjustment is needed.
-
3ff8a737
by Howard Chu at 2015-11-04T22:45:38+00:00
ITS#8300 simplify
-
0fdfdf32
by Howard Chu at 2015-11-06T10:12:45+00:00
ITS#8300 more for node_move
When moving a node from one page to another, make sure other cursors'
parent index gets adjusted too.
-
3c9786b5
by Howard Chu at 2015-11-09T20:09:10+00:00
ITS#8304 fix page_merge
Was using the pre-touch dst page pointer instead of the touched page
-
c6d90807
by Howard Chu at 2015-11-11T09:44:30+00:00
Tweak robust mutex detection for glibc
-
c46119a5
by Howard Chu at 2015-11-13T09:27:07+00:00
ITS#8310 fix mdb_rebalance cursor fixup
When collapsing root, must adjust entire cursor stack
-
3360cbad
by Hallvard Furuseth at 2015-11-17T18:22:25+01:00
ITS#7209 Default MDB_DSYNC = O_SYNC if no O_DSYNC
-
6d63afb1
by Howard Chu at 2015-11-18T10:01:34+00:00
ITS#8311 fix page_split from update_key
Check for top of stack. Usually the cursor only has height 1 when
calling page_split, but not always.
-
355f64ad
by Howard Chu at 2015-11-18T10:24:58+00:00
ITS#8311 add comment
-
4d140b92
by Hallvard Furuseth at 2015-11-18T16:30:24+01:00
ITS#8312 Fix loose pages in commit(nested txn)
-
f08b70d0
by Howard Chu at 2015-11-18T21:33:51+00:00
ITS#8313 more for ITS#8062
dummy flags must be init'd due to 3d46d550
-
a98b74e6
by Howard Chu at 2015-11-19T10:01:59+00:00
ITS#8315 fix ovpage_free
Keep dirty_room sync'd with dirty_list
-
60c34d14
by Howard Chu at 2015-11-19T20:04:16+00:00
ITS#8316 cursor fixup in page_merge
Deleting the merged page requires bumping down other ki's
of the page's parent.
-
58ad1dd7
by Oskari Timperi at 2015-11-20T01:11:31+00:00
ITS#7992 assume Windows paths are UTF-8
-
1bfe7578
by Howard Chu at 2015-11-20T09:20:16+00:00
Refix root split check from 5da67968afb599697d7557c13b65fb961ec408dd
-
946e4d3b
by Howard Chu at 2015-11-20T09:47:56+00:00
Silence some valgrind uninit warnings
-
d6ae2553
by Howard Chu at 2015-11-23T01:02:57+00:00
ITS#8300 more for prev commit
Just tell explicitly which direction we moved/merged from
-
f3e38565
by Howard Chu at 2015-11-23T01:40:01+00:00
ITS#8316 more for 60c34d14ec3ceb0762d620eef77db73dd1e911dc
-
f3eb26c9
by Howard Chu at 2015-11-23T01:40:45+00:00
ITS#8321 Fix del/dupsort
When deleting a dupsort key, if other cursors pointed at that key,
set them to uninit'd, not EOF. They no longer have anything to
point at.
-
3b9f857d
by Howard Chu at 2015-11-23T01:40:56+00:00
ITS#8321 don't skip fixups on splitting cursors
Adjustments can't be skipped, in recursive calls each level must
fixup their own level.
-
88ac6987
by Howard Chu at 2015-11-23T01:40:56+00:00
ITS#8321 fix mdb_cursor_chk()
It was reporting spurious errors due to uninit'd cursors
-
0d5ebc50
by Howard Chu at 2015-11-23T01:40:56+00:00
ITS#8321 fix mdb_cursor_shadow()
Set a valid txn so that cursor fixup code works on the shadows
-
828107eb
by Howard Chu at 2015-11-23T01:40:56+00:00
ITS#8321 fix mdb_cursor_put
Ignore sub-cursors that shouldn't be fixed up
-
3a31dd5a
by Howard Chu at 2015-11-23T01:40:56+00:00
ITS#8321 track temporary cursors
In rebalance/split operations, temporary cursors need to be visible
to propagate fixups
-
fd598083
by Howard Chu at 2015-11-23T01:40:56+00:00
ITS#8321 simplify page_split fixups
-
6fdaea41
by Howard Chu at 2015-11-23T01:40:56+00:00
ITS#8321 reorganize page_split fixups
DUPFIXED fixups needed to occur after separator update.
MDB_RESERVE handling moved after split fixup.
-
e29cfa0b
by Orivej Desh at 2015-11-23T02:01:21+00:00
ITS#8319 mdb_load: explain readline and mdb_cursor_put errors
-
85d2f980
by Orivej Desh at 2015-11-23T02:01:37+00:00
ITS#8320 mdb_load: fix loading data from simple text files
mdb_load -T was supposed to read escaped text, but 21b51cb7 "Add mdb_load"
made it read hex.
-
fae01c8d
by Hallvard Furuseth at 2015-11-23T13:03:09+01:00
CURSOR_TMP_[UN]TRACK() -> WITH_CURSOR_TRACKING()
-
83258ca8
by Howard Chu at 2015-11-24T12:46:57+00:00
ITS#8323 Fix nested commit
Must remove our spilled pages from parent's dirty list
-
b5ce8108
by Howard Chu at 2015-11-24T15:17:06+00:00
ITS#8321 deinit empty cursors
Always unset C_INIT flag if the cursor's target DB has been deleted
-
cf8677e1
by Howard Chu at 2015-11-24T15:17:10+00:00
ITS#8321 Fix mdb_cursor_set
Always reinit mc_pg[0] if cursor is not C_INITIALIZED
It might have a stale value when using nested txns
-
db02a71d
by Howard Chu at 2015-11-24T15:17:15+00:00
ITS#8321 mdb_put cursor needs tracking too
-
69829288
by Howard Chu at 2015-11-24T15:17:19+00:00
ITS#8321 page_touch - don't fixup the cursor we just touched
-
1424aa06
by Howard Chu at 2015-11-24T15:17:23+00:00
ITS#8321 More cursor fixup
Based on page_touch fixup from ITS#7594 but expanded:
make sure sub-cursors agree with main cursors.
-
50d96511
by Howard Chu at 2015-11-24T15:17:28+00:00
Cleanup C_DEL flag usage
Only set it if the cursor's current position was deleted
-
da67af1a
by Howard Chu at 2015-11-24T15:17:28+00:00
ITS#8321 fix ambiguity in cursor_put fixup
After delete/add of a node, other nodes may no longer be
pointing at the data they intended. This can confuse subsequent
fixups.
-
3a4fd79c
by Heiko Becker at 2015-11-24T16:04:01+00:00
ITS#8168 Allow passing AR to make
This is helpful when the ar executable is named differently, for
example with an arch specific prefix.
-
6cff716f
by Heiko Becker at 2015-11-24T16:07:10+00:00
ITS#8169 Allow passing mandir to make install
The motivation for this change is my distribution moving to a multiarch
layout. While the architecture specific stuff (binaries, libraries,
etc.) is installed under /usr/${host}/{bin,lib,...} architecture-independent
data should still be installed to /usr/share/.
-
dbbbfa10
by Howard Chu at 2015-11-24T20:21:51+00:00
ITS#8321 cleanup unused var
from da67af1a4bf1a6d3f5d173d9daf74bb4ec66175a
-
fb5a768a
by Howard Chu at 2015-11-30T18:46:19+00:00
ITS#8324 incremental DB file growth for Windows
-
50949b46
by Howard Chu at 2015-12-01T13:48:29+00:00
ITS#8169 more for prev patch
Missed the mkdir command
-
45fe870c
by Howard Chu at 2015-12-01T14:10:12+00:00
ITS#8169 more Makefile tweaks
Use all the same vars as main OpenLDAP makefiles
-
4198bbde
by Sebastien Launay at 2015-12-03T19:03:47+00:00
ITS#8330 Fix robust mutex detection for glibc 2.10 and 2.11
pthread_mutexattr_setrobust and pthread_mutex_consistent are provided since 2.12 not 2.10:
https://sourceware.org/git/?p=glibc.git;a=commit;h=402cd98775db1478f64c9b0dbe00664b89eb2773
https://sourceware.org/git/?p=glibc.git;a=commit;h=78ee21859939ff75ccf8bbe00499b0c462df2e2d
-
c4e31434
by Howard Chu at 2015-12-06T20:54:23+00:00
ITS#8324 additional tweaks
VirtualAlloc is only needed with WRITEMAP. Regular writes
already extend the mmap implictly.
-
abb13ba1
by Hallvard Furuseth at 2015-12-08T16:43:55+01:00
ITS#8334 Fix MDB_APPENDDUP vs. rewrite(single item)
-
58d1fd4c
by Howard Chu at 2015-12-08T18:21:48+00:00
ITS#8336 fix page_search_root assert on FreeDB
Let "illegal" branch pages thru on the FreeDB - the condition
is only temporary and will be fixed by the time rebalance finishes.
-
8b95e7d1
by Howard Chu at 2015-12-08T19:35:59+00:00
ITS#8324 fix for read-only envs
-
791badd0
by Hallvard Furuseth at 2015-12-12T19:25:06+01:00
mdb_dbi_open(): Catch strdup failure
-
c7a786eb
by Howard Chu at 2015-12-15T18:45:34+00:00
ITS#7992 cleanup
check for utf8_to_utf16 failures
-
2cc88d20
by Howard Chu at 2015-12-19T22:53:26+00:00
Add Getting Started doc
-
86ae31eb
by Howard Chu at 2015-12-19T22:57:00+00:00
Fix typos
-
1ba5adb2
by Howard Chu at 2015-12-20T00:19:12+00:00
MDB_VL32 preparation
Use 64 bit types consistently. This keeps database structures the
same size for MDB_VL32 and native 64 bit builds.
-
29ebd02e
by Howard Chu at 2015-12-20T01:08:18+00:00
MDB_VL32 support 64 bit DBs on 32 bit processors
-
860527f6
by Howard Chu at 2015-12-20T01:08:18+00:00
Note that we're prepping for 1.0
-
209b56fe
by Howard Chu at 2015-12-21T02:36:20+00:00
ITS#8324 fix for WRITEMAP
We called FlushViewOfFile with (map,mapsize) which worked fine
when we had allocated the entire map already. Now we have to make
sure to only flush as much as was actually written. Add a numpgs
argument to tell how much to flush in env_sync0().
-
397d85d1
by Hallvard Furuseth at 2015-12-22T04:20:41+00:00
Pass cursor to mdb_page_get(), mdb_node_read().
No change in behavior.
-
33025182
by Hallvard Furuseth at 2015-12-22T04:21:13+00:00
Prep for next commit: C_WRITEMAP, C_ORIG_RDONLY.
No change in behavior.
-
6534b804
by Hallvard Furuseth at 2015-12-22T04:21:23+00:00
mdb_page_alloc(): Use original snapshot of freeDB.
I can't help thinking this should be safer, and useful somewhere.
-
3a2ac24f
by Howard Chu at 2015-12-22T04:22:01+00:00
MDB_VL32 - track overflow pages too
Otherwise they'll fill up the txn's pageref list when traversing
a DB with lots of overflow records.
-
5eb25c5c
by Howard Chu at 2015-12-22T05:20:33+00:00
MDB_VL32 - fix for Win32 read-only envs
We can't map with MEM_RESERVE because that requires write access
to the underlying file/section. Mapping with the default (MEM_COMMIT)
requires that we don't map past the end of the file.
-
9d75a82a
by Howard Chu at 2015-12-22T06:13:25+00:00
MDB_VL32 - fix prev commit
Only tweak length for read-only envs
-
825ab2ad
by Howard Chu at 2015-12-22T18:30:41+00:00
MDB_RESERVE doc
Add mdb_put text to mdb_cursor_put description for people who
fail to draw logical conclusions.
-
90d1ee27
by Howard Chu at 2015-12-22T20:24:26+00:00
MDB_VL32 - Fix me_rpmutex usage
-
7b9928ce
by Howard Chu at 2015-12-23T23:02:06+00:00
MDB_VL32 - prevent mixing with non-VL32 builds
-
c3852f29
by Howard Chu at 2015-12-28T19:38:32+00:00
MDB_VL32 tweak prev commit
-
1c2a5888
by Howard Chu at 2015-12-28T19:38:32+00:00
ITS#8342 MDB_VL32/WIN32 - close file mapping handle in env_close
-
53f624bf
by Howard Chu at 2015-12-28T20:31:09+00:00
MDB_VL32 fix cursor_unref - ignore cursor with empty stack
-
5db0b54c
by Howard Chu at 2016-01-02T12:31:49+00:00
Fixups for env_copy with large files
wsize was being truncated to 32bits on Windows.
Only try to write 1GB at a time on Windows64;
larger writes fail with ERROR_WORKING_SET_QUOTA.
-
27b1c5f3
by Howard Chu at 2016-01-07T18:28:29+00:00
Add MDB_PREV_MULTIPLE
Logical counterpart to GET_MULTIPLE, NEXT_MULTIPLE
-
447683a8
by Howard Chu at 2016-01-11T20:17:42+00:00
ITS#8346 free last txn0->mt_rpages in env_close
-
a5bf1648
by Howard Chu at 2016-01-11T20:25:33+00:00
ITS#8347 fix off-by-one in VL32 purge
-
15880014
by Howard Chu at 2016-01-12T07:13:48+00:00
ITS#8346 fix typo in prev commit
-
d6995599
by Hallvard Furuseth at 2016-01-12T23:18:06+01:00
lmdb.h Caveats: Reserved vs. actual mem/disk usage
-
a6ccef73
by Howard Chu at 2016-01-16T17:13:25+00:00
ITS#8324 fix c4e31434c7773ee54f2ffdeb545e5740f56492a1
Actually, there is no guarantee that Windows will map newly written
data, so we need VirtualAlloc even for non-WRITEMAP.
-
20dec1f6
by Howard Chu at 2016-01-20T01:30:57+00:00
WIN64 needs off_t redefined too
-
b5018e26
by Howard Chu at 2016-01-23T16:51:42+00:00
Update WRITEMAP doc
-
8c215aa9
by Howard Chu at 2016-01-24T11:35:42+00:00
ITS#8355 fix subcursors
make sure C_DEL gets reset in subcursor after it moves.
-
8f88b1b0
by Howard Chu at 2016-01-26T22:13:01+00:00
ITS#8324 fix a6ccef73ed288271f9b5871909d14a2e481c81ae
Removing the WRITEMAP test dropped this into the MDB_VL32 code path,
which was wrong.
-
6f653ca2
by Howard Chu at 2016-01-27T11:48:22+00:00
MDB_VL32 more for 1ba5adb2ec262405f9207d6015d4f29eea548d25
fix 32bit overflow in set_mapsize
-
5bf313e8
by Howard Chu at 2016-01-28T04:21:32+00:00
ITS#8363 Fix off-by-one in mdb_midl_shrink
-
3f62ddc8
by Howard Chu at 2016-01-28T14:23:02+00:00
MDB_VL32 change overflow page scan
Just check the requested page, don't worry about any other pages
-
e394e023
by Hallvard Furuseth at 2016-01-28T19:45:01+01:00
Fix MDB_VL32 mdb_cursor_count()/entrycount types
-
5f5f4dab
by Howard Chu at 2016-01-30T12:54:32+00:00
Happy New Year
-
fcac8d07
by Hallvard Furuseth at 2016-02-04T03:23:13+01:00
ITS#7992 Fix memleak in prev change
-
5ef19082
by Howard Chu at 2016-02-14T23:53:05+00:00
ITS#8324 Map NTAPI result codes to WIN32 codes
-
d909ab2f
by Howard Chu at 2016-02-15T00:07:04+00:00
Tweak Win32 errmsg buffer
-
3f62b727
by Howard Chu at 2016-02-16T23:38:43+00:00
Tweak MDB_PREV_MULTIPLE for uninit'd cursor
-
e46d78b7
by Howard Chu at 2016-03-02T16:29:54+00:00
MDB_VL32 - increase max write txn size
-
8fff90db
by Howard Chu at 2016-03-28T01:36:26+01:00
ITS#8393 fix MDB_GET_BOTH on non-dup record
-
c8dbd772
by Howard Chu at 2016-04-09T20:42:45+01:00
mdb_drop optimization
If we know there are no sub-DBs and no overflow pages, skip leaf scan.
-
37081325
by Howard Chu at 2016-04-18T18:07:56+01:00
ITS#8406 fix xcursors after cursor_del
Don't leave them uninit'd if they now point at a valid DUP node
-
a04aad31
by Howard Chu at 2016-04-26T12:52:21+01:00
ITS#8412 fix NEXT_DUP after cursor_del
-
e2b8b644
by Hallvard Furuseth at 2016-05-10T07:11:44+02:00
Comment ovpage code in mdb_cursor_put()
-
b045bce2
by Howard Chu at 2016-05-15T00:44:54+01:00
ITS#8424 init cursor in mdb_env_cwalk
-
c367c1f6
by Howard Chu at 2016-06-02T21:01:27+01:00
ITS#8339 Solaris 10/11 robust mutex fixes
Check for PTHREAD_MUTEX_ROBUST_NP definition (this doesn't work
on Linux/glibc because they used an enum). Zero out mutex before
initing.
-
53a0fdf1
by Hallvard Furuseth at 2016-06-03T06:11:54+02:00
Init "locked" flag for SysV semaphores
-
c4c7833d
by Hallvard Furuseth at 2016-06-05T23:42:44+02:00
mdb_env_setup_locks: Plug mutexattr leak on error
-
eb7bbed9
by Hallvard Furuseth at 2016-06-25T07:55:34+02:00
ITS#8209 MDB_CP_COMPACT fixes
Handle errors. Fix cond_wait condition so mc_new
is the sole control var. Drop specious cond_waits.
Do not look at 'mo' while copythr writes it.
-
5ea12b0b
by Hallvard Furuseth at 2016-06-25T07:57:04+02:00
ITS#8209 MDB_CP_COMPACT: Handle empty or broken DB
Preserve DB flags (use metapage#1) when main DB is empty.
Fail if metapage root != actual root in output file.
-
291c69dd
by Hallvard Furuseth at 2016-06-29T06:25:37+02:00
ITS#8209 Tweak previous fixes
Some _aligned_malloc() doc seems to think arg NULL = user error.
Don't know if posix_memalign() pointer is defined after failure.
-
84610e65
by Hallvard Furuseth at 2016-07-14T05:53:21+02:00
Add error MDB_PROBLEM, replace some MDB_CORRUPTED
When problem is most likely in txn, not on disk.
-
32764bcb
by Hallvard Furuseth at 2016-07-23T12:08:12+02:00
Factor out MDB_SIZE_MAX, MDB_FMT_Y, MDB_FMT_Z
-
dff8bafb
by Hallvard Furuseth at 2016-07-23T12:11:34+02:00
Factor some MDB_VL32-related '#if's out to macros
Add MC_OVPG() + MC_SET_OVPG(), NEED_CMP_CLONG(), MDB_CURSOR_UNREF().
-
12ad38d6
by Hallvard Furuseth at 2016-07-23T12:16:20+02:00
Fix size_t/formats -> mdb_size_t for MDB_VL32
-
0842f998
by Hallvard Furuseth at 2016-07-23T12:17:04+02:00
Use mdb_size_t for line numbers in mdb_load
This matches the mdb_size_t entry counts.
-
f25d7165
by Hallvard Furuseth at 2016-07-23T12:18:01+02:00
Fix MDB_INTEGERKEY doc of integer types
-
a43fcad8
by Hallvard Furuseth at 2016-07-23T12:43:16+02:00
MDB_VL32: Match mdb_size_t type with format modifier.
When using format modifier "ll" or "I64", use the matching
type unsigned <long long / __int64> rather than uint64_t.
-
65d9791a
by Hallvard Furuseth at 2016-07-23T12:45:46+02:00
Refactor mdb_page_get()
-
4d47e89f
by Hallvard Furuseth at 2016-08-02T21:02:35+02:00
MDB_VL32: Switch to mdb_size_t formats PRIu64 & co
Drop macro Y=MDB_FMT_Y, add Yu/Yd=MDB_PRIy(). Replace
Y"d..." -> Yd"...", Y"u..." -> Yu"..." / MDB_SCNy(u)"...".
-
58b0ce50
by Hallvard Furuseth at 2016-08-02T21:04:17+02:00
mdb_size comments
-
8670805b
by Hallvard Furuseth at 2016-08-02T22:16:09+02:00
Doc fixes: VALID_FLAGS, mm_last_pg, mt_loose_count
-
77d522d1
by Hallvard Furuseth at 2016-08-02T22:17:54+02:00
Comment MDB_page
-
7e2290c5
by Howard Chu at 2016-08-11T21:30:56+01:00
MDB_VL32 plug rpage leak
mdb_cursor_set wasn't unref'ing as intended.
-
c6510147
by Howard Chu at 2016-08-19T17:24:25+01:00
ITS#8481 make shared lib suffix overridable
-
36d374ba
by Hallvard Furuseth at 2016-08-21T23:20:22+02:00
Fix mdb_page_list() message
-
da4443a9
by Hallvard Furuseth at 2016-08-21T23:22:18+02:00
Clean up MDB_USE_ROBUST #defines
Make explicit and default nonzero equivalent. Parenthesize.
-
45a88275
by Howard Chu at 2016-09-01T00:41:35+01:00
ITS#8489 reset cursor EOF flag in cursor_set
It usually gets done anyway, but one of the fastpath shortcuts
bypassed this step.
-
26e226b2
by Hallvard Furuseth at 2016-09-03T09:41:30+02:00
Silence warning for initializer "mdb_copy my = {0}"
1st struct member was not a scalar.
-
cdcf9da6
by Hallvard Furuseth at 2016-09-25T08:12:56+02:00
ITS#7682 F_NOCACHE: Allow error, skip any O_DIRECT
We can run without F_NOCACHE if it fails. And we do not know
what combining it with O_DIRECT means, if a system has both.
-
3dd2d207
by Hallvard Furuseth at 2016-09-25T08:12:56+02:00
Drop spurious Errcode() call
-
d87ee20e
by Hallvard Furuseth at 2016-09-25T08:12:56+02:00
Clean up strange fcntl result check
...and check !MDB_CLOEXEC in an 'if' rather than '#if'
to match its non-zero usage.
-
67fb3c74
by Hallvard Furuseth at 2016-09-25T15:40:08+02:00
ITS#7992 Tighter utf8_to_utf16(), fix errcodes
The 0xFFFD check seems due to misleading MultiByteToWideChar() doc.
Bad UTF-8 gives 0xFFFD in the output string, not the return value.
-
cdc3f9cc
by Hallvard Furuseth at 2016-09-25T15:40:08+02:00
Factor filename handling out to mdb_fname_*()
No change in functionality, except needs less mallocing.
-
15666878
by Hallvard Furuseth at 2016-10-04T19:12:58+02:00
Move opening files to mdb_fopen()
No change in functionality.
-
04acac63
by Hallvard Furuseth at 2016-10-04T19:12:58+02:00
ITS#8505 Set FD_CLOEXEC for me_mfd,env_copy as well
-
6355dade
by Hallvard Furuseth at 2016-10-04T21:16:27+02:00
ITS#8505 Protect parent from fork()-pthread_exit()
-
77845345
by Hallvard Furuseth at 2016-10-04T21:16:27+02:00
ITS#8505 Clarify fork() caveat, mdb_env_get_fd(), flock->fcntl.
-
f7e85d78
by Hallvard Furuseth at 2016-10-04T21:16:27+02:00
Only set me_mfd if needed. Drop unused read access.
-
e58db7d5
by Howard Chu at 2016-11-12T23:11:20+00:00
More for ITS#8406
Revert excess cursor fixup
-
fa83b25e
by Howard Chu at 2016-11-29T19:19:45+00:00
More for ITS#8406
xcursor fixup depends on init state
-
f3ab0d23
by Hallvard Furuseth at 2016-12-01T21:17:42+01:00
Factor out refreshing sub-page pointers
-
a70200f1
by Hallvard Furuseth at 2016-12-02T05:22:11+01:00
Fix mdb_env_open() with MDB_VL32
Init me_rpmutex independently of MDB_NOLOCK.
Plug leaks on mdb_env_open() failure.
Tweak mdb_env_close0() to handle the rearranged mdb_env_open().
-
08e4684d
by Hallvard Furuseth at 2016-12-02T07:00:08+01:00
MDB_VL32 mdb_page_get(): Set MDB_TXN_ERROR on failure.
-
72f875b4
by Hallvard Furuseth at 2016-12-07T18:55:21+01:00
Note functions which must set MDB_TXN_ERROR on failure
Other functions depend on them to do so.
For mdb_node_read(), instead remove such a dependence.
-
3dda2bfa
by Hallvard Furuseth at 2016-12-07T19:04:19+01:00
doxygen cleanup
-
ef066598
by Hallvard Furuseth at 2016-12-07T19:06:11+01:00
MDB_CP_COMPACT comments
-
ffd13db3
by Hallvard Furuseth at 2016-12-09T00:03:36+01:00
Cleanup: Add flag DB_DUPDATA, drop DB_DIRTY hack
-
e1be73c7
by Hallvard Furuseth at 2016-12-10T09:16:17+01:00
ITS#8542 mdb_dbi_open(): Protect mainDB cursors
-
c0ff9a26
by Hallvard Furuseth at 2016-12-10T17:17:28+01:00
MDB_VL32 cleanup: MDB_env.mm_mapsize type
-
1fb0822b
by Hallvard Furuseth at 2016-12-10T21:11:12+01:00
ITS#8355 cleanup
Drop ~C_EOF, pointless after 8c215aa970215a58ee0df458813c0405ad27a6e9
-
d78c80d9
by Hallvard Furuseth at 2016-12-10T21:42:39+01:00
Clean up and comment C_UNTRACK
Don't use it as a "cursor is tracked" hint in mdb_pages_xkeep().
It's been harmless so far, but would break after mdb_cursor_copy().
Checking m0 directly short-circuits better anyway.
-
65e95ffc
by Hallvard Furuseth at 2016-12-10T22:00:31+01:00
ITS#7377 Catch mdb_cursor_sibling() error
-
3e7a8e26
by Lorenz Bauer at 2016-12-13T18:47:13+01:00
ITS#8504 mdb_env_copyfd2(): Don't abort on SIGPIPE
Return EPIPE instead.
-
e5396540
by Hallvard Furuseth at 2016-12-13T18:50:45+01:00
ITS#8504 Fix prev commit: mc_error, #ifdef SIGPIPE
Never clear mc_error, we could lose a failure in the other thread.
-
72c893fc
by Hallvard Furuseth at 2016-12-15T22:12:45+01:00
Mention MDB_PREV_MULTIPLE along with MDB_NEXT_MULTIPLE
-
be94a756
by Hallvard Furuseth at 2016-12-21T21:40:50+01:00
Doxygen fixes. Use DISTRIBUTE_GROUP_DOC.
- DISTRIBUTE_GROUP_DOC makes doxygen give several fields the
same doc: mn_hi + mn_lo in MDB_node.
- With mdb_mutex_t + mdb_mutexref_t, instead split them up.
- Don't hide a doxygen #name inside double quotes.
-
4bc270a2
by Hallvard Furuseth at 2016-12-21T21:42:36+01:00
More MDB_node doc
-
2e3eaf2c
by Howard Chu at 2016-12-28T18:30:19+00:00
ITS#8554 kFreeBSD is like BSD
Doesn't have POSIX robust mutexes - GNU userland on BSD kernel
-
59ac317d
by Howard Chu at 2017-01-06T19:48:58+00:00
ITS#8558 fix mdb_load with escaped plaintext
-
d84dee51
by Howard Chu at 2017-01-11T09:51:43+00:00
ITS#8557 fix mdb_cursor_last
Optimize mdb_page_search_root(PS_LAST) when cursor is already near
last position, ignoring C_EOF flag for now.
-
511f5880
by Howard Chu at 2017-01-11T10:33:28+00:00
Tweak cursor_next C_EOF check
Allow C_EOF flag to be stale
-
c44b29ea
by Howard Chu at 2017-01-11T11:18:57+00:00
ITS#8557 fix prev commit
-
f8ce8a82
by Howard Chu at 2017-01-11T11:19:18+00:00
More C_EOF tweaks
-
6ac9aa66
by Howard Chu at 2017-01-11T14:39:08+00:00
Happy New Year
-
5eae7aad
by Howard Chu at 2017-01-12T13:35:31+00:00
Fix f8ce8a82717ddefdc912fa47c07f1bdee2a3336b
GET_MULTIPLE was broken
-
882e27c1
by Howard Chu at 2017-01-14T19:22:34+00:00
Further fix f8ce8a82717ddefdc912fa47c07f1bdee2a3336b
Fully revert the change to GET_MULTIPLE
-
1db9f32a
by Howard Chu at 2017-01-31T10:41:52+00:00
Workaround VL32 cursor refcounting miscount
Don't try to deref cursor page if txn's pagelist is empty
-
e36517db
by Howard Chu at 2017-02-06T15:09:26+00:00
ITS#8582 keep mutex at end of struct
since it's variable size on Linux/glibc
-
58ba039b
by Hallvard Furuseth at 2017-03-04T13:03:15+01:00
ITS#8582 MDB_LOCK_VERSION = 2 due to format change
-
68eda68f
by Hallvard Furuseth at 2017-03-19T13:21:51+01:00
Store lock ID instead of pathname in lockfile
This limits the namespace which the user can meddle with for
POSIX semaphores and Windows mutexes. Their names change a
bit, they no longer have fixed lengths.
-
172d8251
by Hallvard Furuseth at 2017-03-19T13:21:52+01:00
Simplify mdb_hash_val() -> mdb_hash()
Simpler usage since it's only called once, rename to match new usage,
and drop 3 loop pessimizations which were optimizations 20 years ago.
-
52c0df1d
by Hallvard Furuseth at 2017-03-19T13:21:52+01:00
Clear any struct padding in idbuf
-
b5e5fcc3
by Hallvard Furuseth at 2017-03-19T13:24:08+01:00
ITS#8582 Fill in MDB_LOCK_FORMAT
Attempt to stop liblmdb variants compiled with conflicting options
from using the lockfile at the same time and thus breaking it.
-
4d215439
by Howard Chu at 2017-03-23T20:55:12+00:00
ITS#8622 fix xcursor after cursor_del
Re-fix 6b1df0e4c7fadd21d1233d7157229b2d89ccaa04 from ITS#8406
-
34888541
by Howard Chu at 2017-07-01T21:59:44+01:00
MDB_VL32
Use the same size dirty list for both 64 and 32 bit.
-
775be5e5
by Howard Chu at 2017-07-01T21:59:44+01:00
Fix Android recognition
The official macro is __ANDROID__; ANDROID may or may not be defined.
-
ac047d1e
by Howard Chu at 2020-10-10T12:50:55+01:00
Add new MDB_RPAGE_CACHE def
Separate 32/64 dependency from rpage buffer mechanism
-
53799e51
by Howard Chu at 2020-10-10T12:51:08+01:00
RPAGE_CACHE is now dynamically selectable
Behavior is controlled by MDB_REMAP_CHUNKS envflag
Remapping is always enabled in MDB_VL32
-
ad7933ba
by Howard Chu at 2020-10-10T12:51:23+01:00
Optimization for mdb_rpage_get()
The caller already knows if it's using an overflow page, so
pass the number of expected pages in instead of having to
map the page first and check the count there.
-
fbf35a16
by Hallvard Furuseth at 2020-10-10T12:51:42+01:00
Rename mdb_env_close0() -> mdb_env_close_active()
Hopefully we'll remember now what goes in which function.
-
b89f8fc9
by Howard Chu at 2020-10-10T12:51:54+01:00
Page-level encryption support
Currently encrypts all but the meta pages
Still needs to store/retrieve the initialization vector
-
525a2cce
by Howard Chu at 2020-10-10T12:52:10+01:00
Add test code for remap / encryption
-
34c3cfe8
by Howard Chu at 2020-10-10T12:52:22+01:00
Plug some information leaks
Zero out decrypted pages before freeing them.
Do proper init on reused loose pages.
-
fafbd42c
by Howard Chu at 2020-10-10T12:52:37+01:00
Save/restore enc IV in page 0
-
de161fe9
by Hallvard Furuseth at 2020-10-10T12:52:51+01:00
Get flags from $LMDB_FLAGS when MDB_TEST
Now we don't need to tweak the code of callers to test encryption.
-
f16ce88d
by Hallvard Furuseth at 2020-10-10T12:53:05+01:00
Trivial encryption when $LMDB_FLAGS = "e"
-
c7ef535a
by Howard Chu at 2020-10-10T12:55:47+01:00
Data format change: add txnid to page header
-
f0f985fa
by Howard Chu at 2020-10-10T12:55:58+01:00
checkpoint - moving overflow page headers
Moving headers outside of overflow page.
-
757378fc
by Howard Chu at 2020-10-10T12:56:11+01:00
Scaled back on overflow page work
Still keeping page header at top of overflow page for now
-
ca8e48d9
by Hallvard Furuseth at 2020-10-10T12:56:25+01:00
Fix last commit - sizeof(pgno_t) and C90 compat
-
74928f6a
by Hallvard Furuseth at 2020-10-10T12:56:41+01:00
Fix broken mdb_page_get(ovpage) optimization
-
214aff23
by Hallvard Furuseth at 2020-10-10T12:56:52+01:00
Move misplaced OVERFLOW_NOTYET code
...so it would set pgno,txnid in the MDB_dovpage, not the actual ovpage
-
9e3603eb
by Hallvard Furuseth at 2020-10-10T12:57:10+01:00
Fix mdb_enctest()
Accept a partial ovpage. I.e. decryption of the beginning
should not depend on the data at the end.
Make the key and IV less regular. (Divisor 67 has period>64.)
-
4b7e4303
by Hallvard Furuseth at 2020-10-10T12:57:23+01:00
mdb_page_touch: Always set MDB_TXN_ERROR on error
-
0e17ba43
by Hallvard Furuseth at 2020-10-10T12:57:36+01:00
Verify final loose_count in mdb_txn_commit()
Mismatch may indicate that pages leaked or got used twice
in the same snapshot.
-
12ee1a2d
by Hallvard Furuseth at 2020-10-10T12:57:46+01:00
Use mdb_page_loose() more
-
6dd5a4d7
by Hallvard Furuseth at 2020-10-10T12:57:59+01:00
Protect freelist at end of mdb_freelist_save()
-
34461da9
by Hallvard Furuseth at 2020-10-10T12:58:11+01:00
Skip unnecessary mdb_page_get()s when spilling
Do not bring in pages merely to see if they should be skipped.
-
3b55853f
by Hallvard Furuseth at 2020-10-10T12:58:25+01:00
Drop unnecessary searches in the spill lists
Check with IS_MUTABLE() if an MDB_page is spilled, instead of
searching spill lists. When unspilling, skip parent spill lists.
-
0a99df54
by Hallvard Furuseth at 2020-10-10T12:58:38+01:00
Divide page flags in P_ADM_FLAGS and the rest
P_ADM_FLAGS flags are tied to the page, even through page_loose-alloc.
OTOH mdb_page_split() should only duplicate the relevant flags.
This is just the code for the feature, P_ADM_FLAGS is 0 for now.
We'll need it for P_HIDESPILL later.
-
c83434e1
by Hallvard Furuseth at 2020-10-10T12:58:49+01:00
Demo - move P_DIRTY to P_ADM_FLAGS, page_dirty()
...to have something substantial to test P_ADM_FLAGS with,
at least until we drop the P_DIRTY flag.
-
f1db84d3
by Hallvard Furuseth at 2020-10-10T12:59:04+01:00
mp_txnid = page state, avoids searching dirty_list
In nested txns, check mp_txnid to see which txn dirtied the page.
This change will also let us remove the P_DIRTY flag, and keep
some flags in (dirty page).mp_txnid if we should need it.
-
adfa8f75
by Hallvard Furuseth at 2020-10-10T12:59:16+01:00
Drop P_DIRTY, and MDB_WRITEMAP dirty/spill lists
mt_workid = mt_txnid when WRITEMAP, so dirty pages == "spilled"
pages and mdb_page_flush() does nothing.
-
81984ab2
by Howard Chu at 2020-10-10T13:00:01+01:00
Fix 418ea8b94e SEGV on spilled ovpg
Don't spill an ovpg that is referenced in a cursor
-
499866ab
by Howard Chu at 2020-10-10T13:00:16+01:00
ITS#8699 more for cursor_del ITS#8622
Set C_DEL flag on reinit'd subcursor
-
97291744
by Hallvard Furuseth at 2020-10-10T13:00:27+01:00
Keep MC_OVPG() == NULL when not MDB_REMAPPING()
Needed since 418ea8b94e14567ba2be9f9772f38f563a0d7e9c introduced
option MDB_REMAP_CHUNKS.
-
24f437df
by Hallvard Furuseth at 2020-10-10T13:00:42+01:00
Less hungry mdb_pages_xkeep()
Skip pages that are dirty only in an ancestor txn
-
61b5b627
by Hallvard Furuseth at 2020-10-10T13:00:52+01:00
Doc fixes
-
d6cf4761
by Hallvard Furuseth at 2020-10-10T13:01:46+01:00
Drop mdb_page_get() arg 'level', it's always NULL
-
8b31a4a6
by Hallvard Furuseth at 2020-10-10T13:02:52+01:00
mdb_page_get() can ignore the toplevel spill list
...when we search dirty list before instead of after spill list.
-
6e1f7485
by Hallvard Furuseth at 2020-10-10T13:03:01+01:00
Rename mdb_env_getflags->envflags, clarify options
The old name resembled existing function mdb_env_get_flags().
-
b4ddec0b
by Hallvard Furuseth at 2020-10-10T13:03:21+01:00
Expose MDB_ENCRYPT flag
-
0158f67c
by moneromooo-monero at 2020-10-10T13:03:36+01:00
ITS#8704 add MDB_PREVMETA flag to mdb_env_open
used to open the previous meta page, in case the latest one
is corrupted
From https://github.com/LMDB/lmdb/pull/12
-
d12ebb65
by Howard Chu at 2020-10-10T13:03:58+01:00
ITS#8704 Add PREVMETA to envflags()
-
789c71c4
by Howard Chu at 2020-10-10T13:04:09+01:00
ITS#8704 Add MDB_PREVMETA support to tools
-
73d75c62
by Hallvard Furuseth at 2020-10-10T13:04:26+01:00
Drop always-false MDB_WRITEMAP test when IS_DIRTY_NW()
-
16839f98
by Hallvard Furuseth at 2020-10-10T13:04:37+01:00
Unref ovpages when deleting them
-
3585a1eb
by Howard Chu at 2020-10-10T13:04:50+01:00
ITS#8704 Fix PREVMETA, rename to PREVSNAPSHOT
and enforce exclusive access to environment. Also fix txn_begin/pick_meta
to use correct meta page, and reset the flag after successful commit.
-
e4cf9502
by Howard Chu at 2020-10-10T13:05:55+01:00
mdb_dbi_open tweak
Always save the terminating NUL of the incoming DB name
Stop using the old mdb_open/mdb_close function names
.. should consider renaming mdb_stat/mdb_drop to mdb_dbi_... too.
-
27c8cee7
by Howard Chu at 2020-10-10T13:06:09+01:00
Add mdb_cursor_is_db()
Return 1 if the cursor is pointing to a named DB record
-
05d5a9d3
by Howard Chu at 2020-10-10T13:06:19+01:00
Doc tweaks
Note about DB names being C strings
-
0e91bde5
by Howard Chu at 2020-10-10T13:06:28+01:00
ITS#8722 fix FIRST_DUP/LAST_DUP cursor bounds check
-
2b397001
by Howard Chu at 2020-10-10T13:09:09+01:00
ITS#8728 fix MDB_VL32 freeing overflow page
-
56017812
by Hallvard Furuseth at 2020-10-10T13:09:39+01:00
XCURSOR_REFRESH() fixups/cleanup
* Check NUMKEYS(), similar to f34b61f9471d1c03fe0517b9d817c50c920e378a
"ITS#8722 fix FIRST_DUP/LAST_DUP cursor bounds check".
* Move XCURSOR_INITED() into XCURSOR_REFRESH(). This adds a check in
mdb_cursor_put, below /* converted, write the original data first */.
* Factor mc_ki[] out to XCURSOR_REFRESH().
* Replace an mc_pg[] with mp which is equal (mdb_cursor_del0).
-
b9488faa
by Hallvard Furuseth at 2020-10-10T13:09:49+01:00
Tweak ITS#8722 fix: Use XCURSOR_REFRESH()
This checks XCURSOR_INITED() and fixes the mn_flags check.
-
d9ef7ace
by Quanah Gibson-Mount at 2020-10-10T13:10:14+01:00
ITS#8612 Fix Solaris builds with liblmdb
This patch fixes liblmdb builds on Solaris and derivatives by defining
_POSIX_PTHREAD_SEMANTICS
-
cf3588ba
by Howard Chu at 2020-10-10T13:10:34+01:00
Add -a append option to mdb_load
To allow reloading of custom-sorted DBs from mdb_dump
-
4d747ff2
by Howard Chu at 2020-10-10T13:10:58+01:00
ITS#8760 fix regression in 0.9.19
-
ec3e4ed9
by Howard Chu at 2020-10-10T13:12:34+01:00
Add mdb_drop tool
-
bdfb1671
by Howard Chu at 2020-10-10T13:12:46+01:00
ITS#8324 More for Win32 NTDLL junk
Use GetProcAddress at runtime, avoid buildtime NTDLL link issues
-
d52328b7
by Howard Chu at 2020-10-10T13:12:59+01:00
ITS#8819 can't use fakepage mp_ptrs directly
-
5a5e056f
by Quanah Gibson-Mount at 2020-10-10T13:15:18+01:00
Happy New Year
-
8218d067
by Howard Chu at 2020-10-10T13:16:34+01:00
ITS#8831 move flag init into readhdr
Avoid stomping on flags from 1st readhr invocation
-
bfe439cd
by Howard Chu at 2020-10-10T13:17:18+01:00
ITS#8844 use getpid() in mdb_env_close0()
-
b6576544
by Howard Chu at 2020-10-10T13:19:04+01:00
ITS#8756 remove loose pg from dirty list in freelist_save
-
279cc7b8
by Howard Chu at 2020-10-10T13:20:33+01:00
ITS#8891 fix M$ WINAPI typedefs
-
0612992e
by Howard Chu at 2020-10-10T13:20:47+01:00
ITS#8908 DOC: GET_MULTIPLE etc don't return the key
Unnecessary since these are DUPs, the key will always be the same
-
4efa54e5
by moneromooo-monero at 2020-10-10T13:20:57+01:00
ITS#8857 document mdb_cursor_del does not invalidate the cursor
-
227840fe
by Quanah Gibson-Mount at 2020-10-10T13:21:18+01:00
Happy New Year!
-
0a202f2a
by Howard Chu at 2020-10-10T13:21:36+01:00
Happy New Year
-
09fb1de0
by Howard Chu at 2020-10-10T13:22:09+01:00
IDLs for VL32 must be same size as for 64bit
-
a51fb486
by Howard Chu at 2020-10-10T13:23:39+01:00
ITS#8969 tweak mdb_page_split
Bump up number of keys for which we use fine-grained splitpoint search
-
29f33e7b
by Ka Ho Ng at 2020-10-10T13:23:54+01:00
ITS#8978 Fix mdb_env_open2() failing when getting handle for NTDLL.dll
Always call GetModuleHandleW() with Unicode string, as mdb_fopen() is
calling CreateFileW() already.
-
52fbc389
by Kris Zyp at 2020-10-10T13:24:19+01:00
ITS#9007 don't free loose writemap pages
Broken in ITS#8756
-
cf074e6c
by Howard Chu at 2020-10-10T13:24:30+01:00
ITS#9068 fix backslash escaping
mdb_load wasn't properly inserting escaped backslashes into the data.
mdb_dump wasn't escaping backslashes when generating printable output.
-
4bdf8bf5
by Howard Chu at 2020-10-10T13:24:49+01:00
ITS#8704 add missing opt flags in prev commit
-
37e99c2b
by Howard Chu at 2020-10-10T13:30:09+01:00
ITS#9118 add MAP_NOSYNC for FreeBSD
-
697d52b6
by Howard Chu at 2020-10-10T13:31:00+01:00
Silence spurious fallthru warning
-
1cd0da08
by Quanah Gibson-Mount at 2020-10-10T13:51:45+01:00
Happy New Year!
-
b485f286
by Howard Chu at 2020-10-10T13:51:45+01:00
ITS#9155 lmdb: free mt_spill_pgs in non-nested txn on end
-
dfb3bbed
by Kris Zyp at 2020-10-10T15:20:54+01:00
ITS#9017 LMDB: improve Windows sync commit perf
-
485465b6
by Kris Zyp at 2020-10-10T15:21:32+01:00
ITS#9017 LMDB: allow using fixed file size on Windows
-
7deed692
by Howard Chu at 2020-10-10T15:21:49+01:00
ITS#9017 LMDB: fix off_t usage on Windows
-
9c01725f
by Howard Chu at 2020-10-10T15:22:00+01:00
ITS#9017 doxygen comment for MDB_FIXEDSIZE
-
034a7e98
by Howard Chu at 2020-10-10T15:22:12+01:00
ITS#9017 cleanup Windows off_t
-
8bcc050f
by Howard Chu at 2020-10-10T15:24:15+01:00
ITS#9278 fix robust mutex cleanup for FreeBSD
FreeBSD 11 supports robust process-shared POSIX mutexes,
but requires them to be explicitly destroyed before munmap
-
5c0dda76
by Howard Chu at 2020-10-10T16:12:33+01:00
Preliminary raw partition support
Autodetects that a block device is being used.
-
a7df9e63
by Howard Chu at 2020-10-10T16:21:57+01:00
More RAWPART support
Use mmap to read and initialize the meta pages, raw device
may not support read/write syscalls.
-
de08119a
by Howard Chu at 2020-10-10T16:26:24+01:00
Add mdb_env_set_pagesize()
-
1738a2a7
by Howard Chu at 2020-10-10T16:29:01+01:00
Fix fallthru warning
-
1002664c
by Howard Chu at 2020-10-11T01:32:30+01:00
Fix rawpart flag collision
-
d1814f7e
by Howard Chu at 2020-10-11T01:45:45+01:00
ITS#9017 fixes for encryption
-
8dc526c5
by Howard Chu at 2020-10-11T13:56:52+01:00
ITS#9364 rework crypto API
And add support for per-page checksums. Reserve space for checksum
at tail of page. Pass pgno+txnid as IV input for encryption.
-
0bc8a4e9
by Howard Chu at 2020-10-11T14:07:26+01:00
ITS#9364 add error code texts
-
93c72a77
by Howard Chu at 2020-10-11T17:29:54+01:00
ITS#9364 add sample for authenticated encryption
-
34fd2815
by Howard Chu at 2020-10-11T18:17:07+01:00
ITS#9364 tweak sample
Cheat with OpenSSL 1.1 internal structures to avoid malloc/free per page
-
21d21a09
by Howard Chu at 2020-10-11T18:19:10+01:00
ITS#9364 tweak crypto sample again
-
12c63d29
by Howard Chu at 2020-10-12T03:09:48+01:00
ITS#9364 use crypto table properly
-
b220a665
by Howard Chu at 2020-10-12T21:57:05+01:00
ITS#9364 Add crypto support to all tools
Using dynamically loaded crypto modules
-
8e8371d1
by Howard Chu at 2020-10-12T22:28:27+01:00
ITS#9364 Add docs for crypto modules
-
fccd990c
by Howard Chu at 2020-10-12T22:55:51+01:00
ITS#9364 fix doxygen comment
-
311f071c
by Howard Chu at 2020-10-23T17:48:53+01:00
Support db_pagesize in mdb_load
Since setting was added in de08119a296a4e8569fa04d7bfcbc7b3c2b41f2f
-
4a61bbd8
by Howard Chu at 2020-10-23T20:35:41+01:00
ITS#9376 Fixes for repeated deletes with xcursor
On DUPSORT DBs, must initialize xcursor regardless of whether
caller requested its data. Also in cursor_prev must check whether
cursor index is still within range before using it.
-
576ccd10
by Kris Zyp at 2020-10-30T16:25:40+00:00
ITS#9371 Fix unknown size of void compilation errors
-
d85fe32d
by Kris Zyp at 2020-10-30T16:27:16+00:00
ITS#9372 Default to using POSIX semaphores on MacOS
Unless robust is specified (then use SysV)
-
3a940d68
by Quanah Gibson-Mount at 2021-01-12T19:20:36+00:00
Happy New Year!
-
336d7171
by Howard Chu at 2021-02-09T23:39:15+00:00
ITS#9461 refix ITS#9376
Was setting C_DEL flag gratuitously
-
e9166d02
by Howard Chu at 2021-02-11T11:35:36+00:00
ITS#9461 fix typo
-
99730069
by Quanah Gibson-Mount at 2021-02-18T16:25:45+00:00
ITS#9469 - Typo fixes
-
6ad29167
by Howard Chu at 2021-03-14T14:34:07+00:00
ITS#9376 simplify
-
fcf44d3f
by Howard Chu at 2021-03-14T14:34:13+00:00
ITS#9500 fix regression from ITS#8662
-
557ab606
by Howard Chu at 2021-04-09T14:12:41+01:00
ITS#9496 fix mdb_env_open bug from #8704
Broken in 3585a1eb977326c7e178c53f4eef1fdc81b46e63
-
52836cdb
by Howard Chu at 2021-06-07T15:55:06+01:00
ITS#9574 add mdb_drop to .gitignore
-
e2b82098
by Kris Zyp at 2021-07-28T22:56:08+01:00
ITS#9618 fix Windows WRITEMAP flush
Revert back to using standard FlushViewOfFile/FlushFileBuffers
to sync data with WRITEMAP mode on Windows
-
64fc67f4
by Kris Zyp at 2022-05-13T17:16:29+01:00
ITS#9385 fix using MDB_NOSUBDIR with nonexistent file
-
0179cfab
by Joakim Hassila at 2022-06-09T22:50:39+01:00
ITS#9861 fix readonly regression from #9017
-
ad3f8367
by NikoPLP at 2022-09-01T17:41:50+01:00
ITS#9910 fix undefined MDB_FDATASYNC on MacOSX
Broken by d85fe32 ITS#9372
-
97e7e9ac
by Howard Chu at 2022-09-21T17:07:36+01:00
ITS#9524 fix loose page tracking
Fixes commit 0e17ba43a818f6bdab7759586e247bae12692c25, loose pages
that have been dropped from dirty list should no longer be counted.
-
e51e6b82
by Howard Chu at 2022-09-21T20:18:34+01:00
ITS#9910 fix typo
in ad3f8367b0ef913dbff074ddd0fdcbcaa86fdbb0
-
17e13f7c
by Mike Hommey at 2022-09-23T02:38:14+01:00
ITS#9030 - Use sys/cachectl.h rather than asm/cachectl.h on mips
It also contains the cacheflush function declaration.
-
405ca710
by Mike Hommey at 2022-09-27T17:29:46+01:00
ITS#9919 - Mark infrequently used functions as cold rather than manually putting them in a separate section
-
4031bdba
by Howard Chu at 2022-11-28T14:33:06+00:00
ITS#9806 LMDB page_split: key threshold depends on page size
32 was chosen for page size of 4KB. Not large nough for 16KB pages.
-
8e3cab0f
by Howard Chu at 2022-11-28T23:37:12+00:00
ITS#9916 liblmdb: use alternate MDB_page2 struct for some accesses
fakepage pointers are only guaranteed to be 2-byte aligned. Use a
2-byte aligned struct definition when referencing 2-byte page members
if a page pointer possibly points to a fakepage.
-
b9db2582
by Howard Chu at 2022-11-28T23:56:43+00:00
ITS#9920 must account for size of authentication data
When computing amount of free space or fill factor in a page
-
6264f539
by Howard Chu at 2022-12-15T09:38:23+00:00
ITS#9961 LMDB: fix MSVC error
-
406311ae
by Howard Chu at 2023-08-27T15:50:51+01:00
ITS#10095 partial revert of ITS#9278 2fd44e325195ae81664eb5dc36e7d265927c5ebc
The patch was incorrect and introduced numerous race conditions.
The original problem was a FreeBSD bug, subsequently fixed:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269277
-
74197007
by Howard Chu at 2023-11-05T17:34:03+00:00
ITS#10125 mdb_load: fix cursor reinit in Append mode
-
22a41169
by Clément Renault at 2023-11-27T16:25:15+00:00
ITS#10137 LMDB: Allow users to define MDB_IDL_LOGN
-
ab27be5f
by Howard Chu at 2023-12-25T23:33:43+00:00
crypto demo: fixup OpenSSL 3 compat
-
b36e177c
by Howard Chu at 2023-12-26T01:43:42+00:00
More crypto fixups
-
9d45a80b
by Howard Chu at 2024-01-09T17:19:36+00:00
ITS#9378 Add explicit replay logging
Logs essential ops so they can be replayed.
Ignores read ops for now.
-
009dd916
by Howard Chu at 2024-01-09T17:42:58+00:00
ITS#9378 Add replay tool
Reads a replay log and executes all the write ops
-
0f8ee264
by Howard Chu at 2024-03-26T14:52:20+00:00
ITS#9037 mdb_page_search: fix error code when DBI record is missing
Use the more relevant MDB_BAD_DBI instead of MDB_NOTFOUND error code
-
dd2ad2fd
by Howard Chu at 2024-04-04T07:17:23+01:00
ITS#10198 Win32 mdb_strerror - stop passing "ignored" parameter
The M$ docs say the parameter is ignored, but it actually isn't,
and will cause a SEGV if the pointed memory isn't an init'd va_list.
-
4a25e069
by Howard Chu at 2024-05-02T16:33:22+01:00
ITS#10212 LMDB: init txnid for read-only DBs
-
a6e8631e
by Howard Chu at 2024-05-03T20:44:38+01:00
ITS#10212 LMDB: better fix
-
87dd0740
by Zach Vonler at 2024-06-03T21:17:13+01:00
ITS#10222 LMDB: Updated mdb_dump man page
The -a option to mdb_load makes the previous text obsolete.
-
c883e8f7
by Howard Chu at 2024-06-03T21:17:19+01:00
LMDB: tweak mdb_load.1 manpage
Add missing -a option to Synopsis
-
ce6f8e2d
by Howard Chu at 2024-06-17T17:06:19+01:00
ITS#9378 don't try to print oversized keys in debug msg
-
fd3c2ada
by Andras at 2024-07-30T14:28:54+01:00
ITS#10244 win32: Fix passed ptr type
From dfb3bbed656132456001c5aaca246fd4430e5ef5 ITS#9017
-
d6100582
by Howard Chu at 2024-09-16T21:11:08+01:00
ITS#9920 lmdb: fix page_split of encrypted page
-
6cbb42aa
by Howard Chu at 2024-09-17T00:11:22+01:00
ITS#9920 lmdb: cleanup prev commit
-
acab3df0
by Howard Chu at 2024-09-25T18:23:31+01:00
LMDB: Add a separate mlm_setup0() to separate loading from setup
-
49726aa3
by Howard Chu at 2024-09-25T20:05:15+01:00
Another fix for OpenSSL 3.0+
Should rewrite this module to use libsodium instead.
-
e895f5fd
by Howard Chu at 2024-10-14T19:39:32+01:00
ITS#9920 crypto: use libsodium instead of OpenSSL
Note: even though the same algorithms were used, the data produced by
this module doesn't work with the OpenSSL-based module and vice versa.
-
c277aed1
by Howard Chu at 2024-10-14T19:40:26+01:00
ITS#9920 lmdb: fix data races in rpage decryption
-
1e7891c0
by Howard Chu at 2024-10-16T17:36:18+01:00
ITS#9920 lmdb: fix page offset when converting subpage to real page
offset needs to account for additional space at page tail
-
14c7ff33
by Howard Chu at 2024-10-16T22:47:42+01:00
Move the crypto module helpers into main liblmdb.
Just makes things easier than using the individual mdb_env_set APIs.
-
b3fc03ba
by Howard Chu at 2024-10-16T22:50:06+01:00
Delete unused module code
-
25635d82
by Howard Chu at 2024-10-16T23:11:20+01:00
Cleanup redundant include
-
defcb167
by Howard Chu at 2024-10-16T23:29:05+01:00
Keep module code in a separate object file
That way programs that don't use these functions won't needlessly
depend on -ldl
-
63091b38
by Gary Wicker at 2024-10-26T21:25:48+01:00
ITS#10275 mdb_load: add -Q option to use NOSYNC for faster loading
-
fc757af2
by kero at 2025-01-28T17:24:07+00:00
ITS#10296 lmdb: fix fdatasync on MacOS
Patch from kero, with corrections by hyc
-
9ec98ca0
by Howard Chu at 2025-02-19T09:14:26+00:00
ITS#10296 lmdb: fix typo in prev commit
-
b6c4293f
by Howard Chu at 2025-02-21T04:42:03+00:00
ITS#10024 lmdb: fix MDB_PREVSNAPSHOT txnid initialization
-
71fe8350
by Howard Chu at 2025-04-07T16:46:52+01:00
More for rawpart
It was ignoring the mapsize recorded in the meta page, and was
redundantly mapping the meta pages.
-
2b77f6ff
by jinyaoguo at 2025-06-10T20:41:32+01:00
ITS#10342 lmdb: fix potential memleak in child txn_begin
-
b4aeb8cf
by Mike Moritz at 2025-06-10T20:56:20+01:00
ITS#10346 lmdb: fix compacting copy with large values
-
9e8ee07d
by Howard Chu at 2025-06-12T15:16:43+01:00
ITS#10355 lmdb mplay: don't assign to stdin/stdout
-
d12c97e2
by Howard Chu at 2025-10-06T16:52:11+01:00
ITS#10396 lmdb: fix mdb_cursor_del0 with multiple DUPSORT cursors
Use the correct stack index when adjusting other cursors pointing to
the affected page and the DB has a subDB. Broken in ITS#8406.
-
b961aca8
by Kris Zyp at 2025-10-15T18:03:32+01:00
ITS#9564 lmdb: fix race condition freeing spilled pages at end of transaction
Move the freeing of the spilled pages list inside the protection of the
transaction mutex so there is no race condition with another transaction
-
8ba07ad7
by Howard Chu at 2025-12-16T17:33:38+00:00
ITS#8988 lmdb: make all keys and data 2-byte aligned
This is an incompatible DB format change. Previously, only a single
pad byte was used if key+data was an odd size. Now, separate padding
is used for both odd keys and odd data sizes.
Note: also compile with -DMISALIGNED_OK=0 on x86 to avoid all
misaligned pgno accesses.
-
7b136c42
by Howard Chu at 2026-01-06T20:53:01+00:00
ITS#10421 mdb_load: check for malicious input
-
22206c0f
by Ali Caglayan at 2026-01-13T16:50:45+00:00
ITS#10419 LMDB: add support for NetBSD
-
be217bf2
by Ali Caglayan at 2026-01-13T16:50:48+00:00
ITS#10420 LMDB: add support for Haiku
-
425525fb
by Howard Chu at 2026-02-03T16:48:47+00:00
ITS#9224 lmdb: add support for PREPARE/2-phase commit
-
10161b20
by Kerollmops at 2026-04-03T16:26:58+01:00
ITS#10395 LMDB: Allow multiple nested read txns from a write txn
-
b0facd02
by Howard Chu at 2026-04-15T15:14:37+01:00
ITS#10054 lmdb: break up large overflow page writes
We were ignoring MAX_WRITE when a single overflow page was larger.
Now we guarantee that all writes are <= MAX_WRITE (1GB).
-
7025c4ea
by Howard Chu at 2026-04-15T15:24:01+01:00
ITS#10054 lmdb: more for prev commit
-
06680017
by Philipp Storz at 2026-04-15T17:33:05+01:00
ITS#8386 lmdb: be a bit more precise that mdb_get retrieves data in intro.doc
-
5b3df476
by Howard Chu at 2026-04-15T18:18:44+01:00
ITS#8824 mdb_dump: cleanup check for MDB_SUCCESS
-
e30a2d16
by Howard Chu at 2026-04-15T19:15:43+01:00
ITS#10108 mdb_dump: fix comment about -a option
No change in behavior, manpage doc was always correct.
-
bd9cd548
by Howard Chu at 2026-04-15T19:47:58+01:00
ITS#10454 lmdb: can't rely on O_DSYNC on MacOS
So we must explicitly sync writes to the metapage.
-
b2cfdd23
by Howard Chu at 2026-04-15T20:03:06+01:00
ITS#8739 lmdb: No fdatasync on FreeBSD 11.0 and older
-
0da8bdd9
by Howard Chu at 2026-04-21T16:39:49+01:00
ITS#10275 mdb_load: add -Q to usage message
-
4fadb707
by Howard Chu at 2026-04-21T16:43:09+01:00
ITS#9223 LMDB: add incremental dump/load
-
e11d5a05
by Howard Chu at 2026-04-22T09:34:27+01:00
ITS#9223 LMDB: cleanup prev commit
Fix age check of meta pages.
Use MAX_WRITE consistently in copy functions.
-
43670420
by Howard Chu at 2026-04-22T11:26:00+01:00
ITS#8165 LMDB: add soname, lib version
-
0734803d
by Howard Chu at 2026-04-22T12:45:11+01:00
ITS#8165 more for prev commit
Fixup .so symlinks, fixup install, add MacOSX linker option
-
d0fcfd3d
by Howard Chu at 2026-04-22T17:24:28+01:00
ITS#8174 LMDB: fixes for mdb_drop(MAIN_DBI)
-
a0cb775d
by Howard Chu at 2026-04-22T17:43:41+01:00
mdb_dump: fix symbol clash on Windows
rename byte() to dobyte()
-
63698faf
by Howard Chu at 2026-04-22T19:22:56+01:00
ITS#9027 LMDB: expose address of memory map
Returned in MDB_envinfo.
-
81697bc2
by Lorenz Bauer at 2026-04-22T19:32:45+01:00
ITS#8590 LMDB: Use F_SETNOSIGPIPE on OS X
It seems like OS X delivers SIGPIPE to the whole process, instead of the generating thread,
as on other UNIXes. Therefore the current code sometimes works, but mostly doesn't, since
the call to sigwait doesn't happen quickly enough.
Instead of masking SIGPIPE, we use an OS X specific fcntl to disable SIGPIPE for that particular fd.
-
c607a4b9
by Howard Chu at 2026-04-23T10:33:01+01:00
ITS#9223 more cleanup for prev commit
-
9aa3ac00
by Howard Chu at 2026-04-23T11:44:34+01:00
ITS#9619 LMDB: fix mdb_env_copy2(MDB_COMPACT) for overflow pages
Wasn't resetting txnid in page header
-
cf52db2b
by Howard Chu at 2026-04-23T18:55:06+01:00
ITS#8579 LMDB: all descriptors should have O_CLOEXEC
There's nothing useful that can be done with them if they're kept around.
-
bf5c4e0f
by Howard Chu at 2026-04-24T16:05:40+01:00
ITS#8192 LMDB: define new error codes to avoid errno abuse
And avoid confusion with Windows error codes
-
ba6e0018
by Howard Chu at 2026-04-24T18:07:42+01:00
ITS#8192 fix prev commit
-
4cd8e451
by James Rouzier at 2026-04-24T20:01:52+01:00
ITS#8250 LMDB: add option MDB_ROTXN_RESET flag for txn_begin
Create a readonly txn in a reset state, it cannot be used until
mdb_txn_renew() is called.
-
7a1f36d5
by Nir Soffer at 2026-04-24T20:19:46+01:00
ITS#8803 LMDB: add tool option to disable locking
For use with environments that use their own locking mechanism
instead of LMDB's internal locking.
-
ed917c6c
by Howard Chu at 2026-04-26T15:07:40+01:00
Revert "ITS#8250 LMDB: add option MDB_ROTXN_RESET flag for txn_begin"
This reverts commit 4cd8e451679511c8fbeff68f8a97cbe7b1268b48.
Cost/benefit makes no sense.
-
134e5ace
by Howard Chu at 2026-04-27T14:59:00+01:00
ITS#7772 LMDB: fix sub-page growth
Check for available space before deciding to grow the sub-page.
The test program will still leave some unused space, but after the
first iteration the extra space will be used instead of growing more.
-
4e8a093a
by Kerollmops at 2026-04-27T15:18:24+01:00
ITS#10454 LMDB: fix prev commit for Mac OSX + WRITEMAP
-
25f9efab
by Howard Chu at 2026-04-27T17:28:19+01:00
ITS#9388 LMDB: fix mdb_stat page counts for dupsort DBs
-
0ff5b99e
by Howard Chu at 2026-04-27T18:42:49+01:00
ITS#8335 LMDB: reject MDB_MULTIPLE put with 0 items
Also check for overflow of count and size.
-
fb4737e9
by Howard Chu at 2026-04-27T19:31:44+01:00
ITS#10203 LMDB: add lmdb.pc to Makefile
-
340f0459
by Markus Junginger at 2026-04-27T19:49:12+01:00
ITS#9291 LMDB: quick sanity check on env open
Validate root page numbers and page sum against file size while opening env.
-
597e77a1
by Howard Chu at 2026-04-28T17:09:52+01:00
Creating LMDB 1.0 release branch
-
f8ec414d
by Howard Chu at 2026-04-29T18:29:43+01:00
ITS#9619 LMDB: more for prev commit
Also needed to set overflow pgno.
-
11ebc033
by Christopher Zimmermann at 2026-05-04T14:48:56+01:00
ITS#9011 LMDB: add mdb_txn_flags()
-
1924ae9b
by Howard Chu at 2026-05-04T14:49:07+01:00
Whitespace cleanup
-
c2b1cab5
by Howard Chu at 2026-05-04T14:50:46+01:00
ITS#9011 LMDB: fix typo in prev commit
-
6966f369
by Quanah Gibson-Mount at 2026-05-06T14:43:25+00:00
Add changes file for LMDB 1.0 series
-
f3ef35bb
by Josh Soref at 2026-05-06T21:18:55+01:00
ITS#8605 - spelling fixes
-
f57fb274
by Howard Chu at 2026-05-06T21:24:10+01:00
ITS#9009 LMDB: update some version and copyright stamps
-
9903af91
by Quanah Gibson-Mount at 2026-05-12T17:03:36+00:00
Merge branch 'mdb.RE/1.0' into ITS9009