|
|
@ -3791,7 +3791,8 @@ mdb_env_open2(MDB_env *env) |
|
|
|
* else use the size recorded in the existing env. |
|
|
|
* else use the size recorded in the existing env. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
env->me_mapsize = newenv ? DEFAULT_MAPSIZE : meta.mm_mapsize; |
|
|
|
env->me_mapsize = newenv ? DEFAULT_MAPSIZE : meta.mm_mapsize; |
|
|
|
} else if (env->me_mapsize < meta.mm_mapsize) { |
|
|
|
} else { |
|
|
|
|
|
|
|
if (env->me_mapsize < meta.mm_mapsize) { |
|
|
|
/* If the configured size is smaller, make sure it's
|
|
|
|
/* If the configured size is smaller, make sure it's
|
|
|
|
* still big enough. Silently round up to minimum if not. |
|
|
|
* still big enough. Silently round up to minimum if not. |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -3799,6 +3800,9 @@ mdb_env_open2(MDB_env *env) |
|
|
|
if (env->me_mapsize < minsize) |
|
|
|
if (env->me_mapsize < minsize) |
|
|
|
env->me_mapsize = minsize; |
|
|
|
env->me_mapsize = minsize; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (env->me_mapsize != meta.mm_mapsize) |
|
|
|
|
|
|
|
env->me_flags |= MDB_RESIZING; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
rc = mdb_env_map(env, meta.mm_address, newenv || env->me_mapsize != meta.mm_mapsize); |
|
|
|
rc = mdb_env_map(env, meta.mm_address, newenv || env->me_mapsize != meta.mm_mapsize); |
|
|
|
if (rc) |
|
|
|
if (rc) |
|
|
|