Use explicit MDB_RDONLY flag
vmware
Howard Chu 12 years ago
parent c67ea9c060
commit 5ef56b437e
  1. 2
      libraries/libmdb/mdb_stat.c
  2. 2
      libraries/libmdb/mdb_stata.c

@ -38,7 +38,7 @@ int main(int argc,char * argv[])
printf("mdb_env_open failed, error %d\n", rc);
goto env_close;
}
rc = mdb_txn_begin(env, NULL, 1, &txn);
rc = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn);
if (rc) {
printf("mdb_txn_begin failed, error %d\n", rc);
goto env_close;

@ -36,7 +36,7 @@ int main(int argc,char * argv[])
printf("mdb_env_open failed, error %d\n", rc);
goto env_close;
}
rc = mdb_txn_begin(env, NULL, 1, &txn);
rc = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn);
if (rc) {
printf("mdb_txn_begin failed, error %d\n", rc);
goto env_close;

Loading…
Cancel
Save