From: Howard Chu Date: Sat, 16 Jan 2016 17:11:36 +0000 (+0000) Subject: ITS#8324 fix c4e31434c7773ee54f2ffdeb545e5740f56492a1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a6ccef73ed288271f9b5871909d14a2e481c81ae;p=openldap ITS#8324 fix c4e31434c7773ee54f2ffdeb545e5740f56492a1 Actually, there is no guarantee that Windows will map newly written data, so we need VirtualAlloc even for non-WRITEMAP. --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 16544d5672..e3eef1cc21 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -2429,7 +2429,7 @@ mdb_page_alloc(MDB_cursor *mc, int num, MDB_page **mp) goto fail; } #ifdef _WIN32 - if (env->me_flags & MDB_WRITEMAP) { + if (!(env->me_flags & MDB_RDONLY)) { void *p; p = (MDB_page *)(env->me_map + env->me_psize * pgno); p = VirtualAlloc(p, env->me_psize * num, MEM_COMMIT,