From a6ccef73ed288271f9b5871909d14a2e481c81ae Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 16 Jan 2016 17:11:36 +0000 Subject: [PATCH] ITS#8324 fix c4e31434c7773ee54f2ffdeb545e5740f56492a1 Actually, there is no guarantee that Windows will map newly written data, so we need VirtualAlloc even for non-WRITEMAP. --- libraries/liblmdb/mdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 16544d5..e3eef1c 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,