summaryrefslogtreecommitdiff
path: root/libraries/liblmdb/mdb.c
AgeCommit message (Collapse)AuthorFilesLines
2016-08-02Comment MDB_pageHallvard Furuseth1-5/+21
2016-08-02Doc fixes: VALID_FLAGS, mm_last_pg, mt_loose_countHallvard Furuseth1-3/+6
2016-08-02mdb_size commentsHallvard Furuseth1-2/+2
2016-08-02MDB_VL32: Switch to mdb_size_t formats PRIu64 & coHallvard Furuseth1-71/+70
Drop macro Y=MDB_FMT_Y, add Yu/Yd=MDB_PRIy(). Replace Y"d..." -> Yd"...", Y"u..." -> Yu"..." / MDB_SCNy(u)"...".
2016-07-23Refactor mdb_page_get()Hallvard Furuseth1-22/+15
2016-07-23Fix MDB_INTEGERKEY doc of integer typesHallvard Furuseth1-1/+1
2016-07-23Fix size_t/formats -> mdb_size_t for MDB_VL32Hallvard Furuseth1-4/+4
2016-07-23Factor some MDB_VL32-related '#if's out to macrosHallvard Furuseth1-65/+38
Add MC_OVPG() + MC_SET_OVPG(), NEED_CMP_CLONG(), MDB_CURSOR_UNREF().
2016-07-23Factor out MDB_SIZE_MAX, MDB_FMT_Y, MDB_FMT_ZHallvard Furuseth1-11/+2
2016-07-14Add error MDB_PROBLEM, replace some MDB_CORRUPTEDHallvard Furuseth1-4/+5
When problem is most likely in txn, not on disk.
2016-06-29ITS#8209 Tweak previous fixesHallvard Furuseth1-7/+12
Some _aligned_malloc() doc seems to think arg NULL = user error. Don't know if posix_memalign() pointer is defined after failure.
2016-06-25ITS#8209 MDB_CP_COMPACT: Handle empty or broken DBHallvard Furuseth1-13/+23
Preserve DB flags (use metapage#1) when main DB is empty. Fail if metapage root != actual root in output file.
2016-06-25ITS#8209 MDB_CP_COMPACT fixesHallvard Furuseth1-66/+67
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.
2016-06-05mdb_env_setup_locks: Plug mutexattr leak on errorHallvard Furuseth1-6/+8
2016-06-03Init "locked" flag for SysV semaphoresHallvard Furuseth1-0/+2
2016-06-02ITS#8339 Solaris 10/11 robust mutex fixesHoward Chu1-1/+9
Check for PTHREAD_MUTEX_ROBUST_NP definition (this doesn't work on Linux/glibc because they used an enum). Zero out mutex before initing.
2016-05-15ITS#8424 init cursor in mdb_env_cwalkHoward Chu1-2/+2
2016-05-10Comment ovpage code in mdb_cursor_put()Hallvard Furuseth1-1/+6
2016-04-26ITS#8412 fix NEXT_DUP after cursor_delHoward Chu1-1/+2
2016-04-18ITS#8406 fix xcursors after cursor_delHoward Chu1-25/+25
Don't leave them uninit'd if they now point at a valid DUP node
2016-04-09mdb_drop optimizationHoward Chu1-1/+10
If we know there are no sub-DBs and no overflow pages, skip leaf scan.
2016-03-28ITS#8393 fix MDB_GET_BOTH on non-dup recordHoward Chu1-1/+1
2016-02-16Tweak MDB_PREV_MULTIPLE for uninit'd cursorHoward Chu1-3/+5
2016-02-15Tweak Win32 errmsg bufferHoward Chu1-3/+4
2016-02-14ITS#8324 Map NTAPI result codes to WIN32 codesHoward Chu1-3/+17
2016-02-04ITS#7992 Fix memleak in prev changeHallvard Furuseth1-1/+1
2016-01-30Happy New YearHoward Chu1-1/+1
2016-01-28Fix MDB_VL32 mdb_cursor_count()/entrycount typesHallvard Furuseth1-3/+3
2016-01-28MDB_VL32 change overflow page scanHoward Chu1-31/+10
Just check the requested page, don't worry about any other pages
2016-01-27MDB_VL32 more for 1ba5adb2ec262405f9207d6015d4f29eea548d25Howard Chu1-1/+1
fix 32bit overflow in set_mapsize
2016-01-26ITS#8324 fix a6ccef73ed288271f9b5871909d14a2e481c81aeHoward Chu1-1/+1
Removing the WRITEMAP test dropped this into the MDB_VL32 code path, which was wrong.
2016-01-24ITS#8355 fix subcursorsHoward Chu1-1/+5
make sure C_DEL gets reset in subcursor after it moves.
2016-01-20WIN64 needs off_t redefined tooHoward Chu1-1/+1
2016-01-16ITS#8324 fix c4e31434c7773ee54f2ffdeb545e5740f56492a1Howard Chu1-1/+1
Actually, there is no guarantee that Windows will map newly written data, so we need VirtualAlloc even for non-WRITEMAP.
2016-01-12ITS#8346 fix typo in prev commitHoward Chu1-1/+1
2016-01-11ITS#8347 fix off-by-one in VL32 purgeHoward Chu1-2/+2
2016-01-11ITS#8346 free last txn0->mt_rpages in env_closeHoward Chu1-1/+3
2016-01-07Add MDB_PREV_MULTIPLEHoward Chu1-0/+22
Logical counterpart to GET_MULTIPLE, NEXT_MULTIPLE
2016-01-02Fixups for env_copy with large filesHoward Chu1-6/+6
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.
2015-12-28MDB_VL32 fix cursor_unref - ignore cursor with empty stackHoward Chu1-1/+1
2015-12-28ITS#8342 MDB_VL32/WIN32 - close file mapping handle in env_closeHoward Chu1-0/+1
2015-12-22MDB_VL32 - Fix me_rpmutex usageHoward Chu1-15/+15
2015-12-22MDB_VL32 - fix prev commitHoward Chu1-2/+2
Only tweak length for read-only envs
2015-12-22MDB_VL32 - fix for Win32 read-only envsHoward Chu1-3/+7
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.
2015-12-22MDB_VL32 - track overflow pages tooHoward Chu1-2/+28
Otherwise they'll fill up the txn's pageref list when traversing a DB with lots of overflow records.
2015-12-22mdb_page_alloc(): Use original snapshot of freeDB.Hallvard Furuseth1-0/+15
I can't help thinking this should be safer, and useful somewhere.
2015-12-22Prep for next commit: C_WRITEMAP, C_ORIG_RDONLY.Hallvard Furuseth1-5/+9
No change in behavior.
2015-12-22Pass cursor to mdb_page_get(), mdb_node_read().Hallvard Furuseth1-35/+35
No change in behavior.
2015-12-21ITS#8324 fix for WRITEMAPHoward Chu1-3/+10
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().
2015-12-20MDB_VL32 support 64 bit DBs on 32 bit processorsHoward Chu1-8/+588