Commit dadcc9a0 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:3914], use c_getf_set instead of c_get

git-svn-id: file:///svn/toku/tokudb@34241 c7de825b-a66e-492c-adef-691d508d4ae1
parent ffc67603
......@@ -80,13 +80,17 @@ static void array_to_long_long (unsigned long long *l, unsigned char *a, int arr
}
}
static int do_nothing (DBT const* UU(key), DBT const* UU(data), void* UU(extrav)) {
return TOKUDB_CURSOR_CONTINUE;
}
static void test_begin_commit(int nqueries) {
int r;
unsigned long long k;
unsigned char kv[keylen];
for (int i = 0; i < nqueries; i++) {
DB_TXN *txn = NULL;
r = env->txn_begin(env, NULL, &txn, 0); assert_zero(r);
r = env->txn_begin(env, NULL, &txn, DB_TXN_SNAPSHOT); assert_zero(r);
DBC *c = NULL;
r = db->cursor(db, txn, &c, 0); assert_zero(r);
......@@ -97,7 +101,7 @@ static void test_begin_commit(int nqueries) {
DBT key, val;
memset(&key, 0, sizeof key); key.data=kv; key.size=8;
memset(&val, 0, sizeof val);
r = c->c_get(c, &key, &val, DB_SET);
r = c->c_getf_set(c, 0, &key, do_nothing, NULL);
assert_zero(r);
(void) __sync_fetch_and_add(&set_count, 1);
r = c->c_close(c); assert_zero(r);
......@@ -105,10 +109,6 @@ static void test_begin_commit(int nqueries) {
}
}
static int do_nothing (DBT const* UU(key), DBT const* UU(data), void* UU(extrav)) {
return TOKUDB_CURSOR_CONTINUE;
}
// read in the entire DB, warming up the cache
// - record maxkey
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment