Merge remote-tracking branch 'origin/mdb.master'

This commit is contained in:
Howard Chu 2014-09-18 02:12:33 +01:00
commit cdcf70eeb6
4 changed files with 15 additions and 4 deletions

View File

@ -4559,6 +4559,7 @@ mdb_env_close0(MDB_env *env, int excl)
free(env->me_dbxs);
free(env->me_path);
free(env->me_dirty_list);
free(env->me_txn0);
mdb_midl_free(env->me_free_pgs);
if (env->me_flags & MDB_ENV_TXKEY) {

View File

@ -233,6 +233,10 @@ int main(int argc, char *argv[])
envname = argv[optind];
rc = mdb_env_create(&env);
if (rc) {
fprintf(stderr, "mdb_env_create failed, error %d %s\n", rc, mdb_strerror(rc));
return EXIT_FAILURE;
}
if (alldbs || subname) {
mdb_env_set_maxdbs(env, 2);

View File

@ -64,8 +64,6 @@ flagbit dbflags[] = {
{ 0, NULL, 0 }
};
static const char hexc[] = "0123456789abcdef";
static void readhdr(void)
{
char *ptr;
@ -345,6 +343,10 @@ int main(int argc, char *argv[])
envname = argv[optind];
rc = mdb_env_create(&env);
if (rc) {
fprintf(stderr, "mdb_env_create failed, error %d %s\n", rc, mdb_strerror(rc));
return EXIT_FAILURE;
}
mdb_env_set_maxdbs(env, 2);

View File

@ -105,6 +105,10 @@ int main(int argc, char *argv[])
envname = argv[optind];
rc = mdb_env_create(&env);
if (rc) {
fprintf(stderr, "mdb_env_create failed, error %d %s\n", rc, mdb_strerror(rc));
return EXIT_FAILURE;
}
if (alldbs || subname) {
mdb_env_set_maxdbs(env, 4);
@ -117,8 +121,8 @@ int main(int argc, char *argv[])
}
if (envinfo) {
rc = mdb_env_stat(env, &mst);
rc = mdb_env_info(env, &mei);
(void)mdb_env_stat(env, &mst);
(void)mdb_env_info(env, &mei);
printf("Environment Info\n");
printf(" Map address: %p\n", mei.me_mapaddr);
printf(" Map size: %"Z"u\n", mei.me_mapsize);