diff --git a/libraries/libmdb/mdb_stat.c b/libraries/libmdb/mdb_stat.c index 6007510..97bd8d4 100644 --- a/libraries/libmdb/mdb_stat.c +++ b/libraries/libmdb/mdb_stat.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; diff --git a/libraries/libmdb/mdb_stata.c b/libraries/libmdb/mdb_stata.c index f8b2fe5..7cfebb4 100644 --- a/libraries/libmdb/mdb_stata.c +++ b/libraries/libmdb/mdb_stata.c @@ -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;