Merge remote-tracking branch 'origin/mdb.RE/0.9'

This commit is contained in:
Quanah Gibson-Mount 2019-02-13 16:58:49 +00:00
commit 6c5b7f7583
4 changed files with 8 additions and 6 deletions

View file

@ -1,6 +1,8 @@
LMDB 0.9 Change Log
LMDB 0.9.24 Engineering
ITS#8969 Tweak mdb_page_split
ITS#8975 WIN32 fix writemap set_mapsize crash
LMDB 0.9.23 Release (2018/12/19)
ITS#8756 Fix loose pages in dirty list

View file

@ -1,4 +1,4 @@
Copyright 2011-2018 Howard Chu, Symas Corp.
Copyright 2011-2019 Howard Chu, Symas Corp.
All rights reserved.
Redistribution and use in source and binary forms, with or without

View file

@ -135,7 +135,7 @@
*
* @author Howard Chu, Symas Corporation.
*
* @copyright Copyright 2011-2018 Howard Chu, Symas Corp. All rights reserved.
* @copyright Copyright 2011-2019 Howard Chu, Symas Corp. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted only as authorized by the OpenLDAP

View file

@ -5,7 +5,7 @@
* BerkeleyDB API, but much simplified.
*/
/*
* Copyright 2011-2018 Howard Chu, Symas Corp.
* Copyright 2011-2019 Howard Chu, Symas Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -3991,9 +3991,9 @@ mdb_env_map(MDB_env *env, void *addr)
* and won't map more than the file size.
* Just set the maxsize right now.
*/
if (SetFilePointer(env->me_fd, sizelo, &sizehi, 0) != (DWORD)sizelo
if (!(flags & MDB_WRITEMAP) && (SetFilePointer(env->me_fd, sizelo, &sizehi, 0) != (DWORD)sizelo
|| !SetEndOfFile(env->me_fd)
|| SetFilePointer(env->me_fd, 0, NULL, 0) != 0)
|| SetFilePointer(env->me_fd, 0, NULL, 0) != 0))
return ErrCode();
}
@ -8749,7 +8749,7 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno
* the split so the new page is emptier than the old page.
* This yields better packing during sequential inserts.
*/
if (nkeys < 20 || nsize > pmax/16 || newindx >= nkeys) {
if (nkeys < 32 || nsize > pmax/16 || newindx >= nkeys) {
/* Find split point */
psize = 0;
if (newindx <= split_indx || newindx >= nkeys) {