48
49
E(mdb_env_set_mapsize(env, 10485760));
49
50
E(mdb_env_open(env, "./testdb", MDB_FIXEDMAP /*|MDB_NOSYNC*/, 0664));
50
52
E(mdb_txn_begin(env, NULL, 0, &txn));
51
E(mdb_open(txn, NULL, 0, &dbi));
53
E(mdb_dbi_open(txn, NULL, 0, &dbi));
53
55
key.mv_size = sizeof(int);
58
58
printf("Adding %d values\n", count);
60
60
sprintf(sval, "%03x %d foo bar", values[i], values[i]);
61
64
if (RES(MDB_KEYEXIST, mdb_put(txn, dbi, &key, &data, MDB_NOOVERWRITE))) {
63
66
data.mv_size = sizeof(sval);