Commit c0eac18e authored by Dave Wells's avatar Dave Wells Committed by Yoni Fogel

add function delete_n for use by recovery_stress tests refs[t:1977]

git-svn-id: file:///svn/toku/tokudb@14975 c7de825b-a66e-492c-adef-691d508d4ae1
parent 85df1ff8
...@@ -120,7 +120,7 @@ static void UU() ...@@ -120,7 +120,7 @@ static void UU()
env_shutdown(void) { env_shutdown(void) {
int r; int r;
r = env->close(env, 0); r = env->close(env, 0);
CKERR(r); CKERR(r);
} }
static void UU() static void UU()
...@@ -318,7 +318,13 @@ delete_fixed(DB *db1, DB *db2, DB_TXN *txn, int64_t k, u_int32_t flags) { ...@@ -318,7 +318,13 @@ delete_fixed(DB *db1, DB *db2, DB_TXN *txn, int64_t k, u_int32_t flags) {
} }
} }
static void UU()
delete_n(DB *db1, DB *db2, DB_TXN *txn, int firstkey, int n, u_int32_t flags) {
int i;
for (i=0;i<n;i++) {
delete_fixed(db1, db2, txn, firstkey+i, flags);
}
}
static void static void
insert_n(DB *db1, DB *db2, DB_TXN *txn, int firstkey, int n, int offset) { insert_n(DB *db1, DB *db2, DB_TXN *txn, int firstkey, int n, int offset) {
...@@ -405,7 +411,7 @@ verify_sequential_rows(DB* compare_db, int64_t firstkey, int64_t numkeys) { ...@@ -405,7 +411,7 @@ verify_sequential_rows(DB* compare_db, int64_t firstkey, int64_t numkeys) {
k = i + firstkey; k = i + firstkey;
v = generate_val(k); v = generate_val(k);
r1 = c1->c_get(c1, &key1, &val1, DB_NEXT); r1 = c1->c_get(c1, &key1, &val1, DB_NEXT);
assert(r1==0); assert(r1==0);
rval = verify_identical_dbts(&key1, &key2) | rval = verify_identical_dbts(&key1, &key2) |
verify_identical_dbts(&val1, &val2); verify_identical_dbts(&val1, &val2);
assert(rval == 0); assert(rval == 0);
......
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