]> git.sur5r.net Git - openldap/commitdiff
ITS#8324 fix c4e31434c7773ee54f2ffdeb545e5740f56492a1
authorHoward Chu <hyc@openldap.org>
Sat, 16 Jan 2016 17:11:36 +0000 (17:11 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 16 Jan 2016 17:13:25 +0000 (17:13 +0000)
Actually, there is no guarantee that Windows will map newly written
data, so we need VirtualAlloc even for non-WRITEMAP.

libraries/liblmdb/mdb.c

index 16544d56725ce34acdb0921cf17e79b1db5300b7..e3eef1cc210d190bd0c2d3282f7d01181367df96 100644 (file)
@@ -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,