diff --git a/libraries/liblmdb/CHANGES b/libraries/liblmdb/CHANGES index db89b7e5c7..e2bf743312 100644 --- a/libraries/liblmdb/CHANGES +++ b/libraries/liblmdb/CHANGES @@ -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 diff --git a/libraries/liblmdb/COPYRIGHT b/libraries/liblmdb/COPYRIGHT index 10d7b3204f..f076556eb5 100644 --- a/libraries/liblmdb/COPYRIGHT +++ b/libraries/liblmdb/COPYRIGHT @@ -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 diff --git a/libraries/liblmdb/lmdb.h b/libraries/liblmdb/lmdb.h index 2f25470487..fd4419cb61 100644 --- a/libraries/liblmdb/lmdb.h +++ b/libraries/liblmdb/lmdb.h @@ -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 diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index e12af4482a..1e71e3b635 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -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) {