Commit 285f28d5 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:4145] merging compilation fix

git-svn-id: file:///svn/toku/tokudb@37028 c7de825b-a66e-492c-adef-691d508d4ae1
parent 9b3163c8
...@@ -23,7 +23,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { ...@@ -23,7 +23,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) {
const int num_threads = cli_args->num_update_threads; const int num_threads = cli_args->num_update_threads;
struct arg myargs[num_threads]; struct arg myargs[num_threads];
for (int i = 0; i < num_threads; i++) { for (int i = 0; i < num_threads; i++) {
arg_init(&myargs[i], n, dbp, env); arg_init(&myargs[i], n, dbp, env, cli_args);
// make the guy that updates the db // make the guy that updates the db
myargs[i].operation = update_op; myargs[i].operation = update_op;
} }
......
...@@ -150,6 +150,7 @@ struct scan_cb_extra { ...@@ -150,6 +150,7 @@ struct scan_cb_extra {
bool fast; bool fast;
int64_t curr_sum; int64_t curr_sum;
int64_t num_elements; int64_t num_elements;
int elts[20];
}; };
static int static int
...@@ -160,6 +161,7 @@ scan_cb(const DBT *a, const DBT *b, void *arg_v) { ...@@ -160,6 +161,7 @@ scan_cb(const DBT *a, const DBT *b, void *arg_v) {
assert(cb_extra); assert(cb_extra);
assert(b->size >= sizeof(int)); assert(b->size >= sizeof(int));
cb_extra->curr_sum += *(int *)b->data; cb_extra->curr_sum += *(int *)b->data;
cb_extra->elts[cb_extra->num_elements] = *(int*)b->data;
cb_extra->num_elements++; cb_extra->num_elements++;
return cb_extra->fast ? TOKUDB_CURSOR_CONTINUE : 0; return cb_extra->fast ? TOKUDB_CURSOR_CONTINUE : 0;
} }
...@@ -194,6 +196,9 @@ static int scan_op_and_maybe_check_sum(DB_ENV *UU(env), DB **dbp, DB_TXN *txn, A ...@@ -194,6 +196,9 @@ static int scan_op_and_maybe_check_sum(DB_ENV *UU(env), DB **dbp, DB_TXN *txn, A
} }
if (check_sum && e.curr_sum) { if (check_sum && e.curr_sum) {
printf("e.curr_sum: %"PRId64" e.num_elements: %"PRId64" \n", e.curr_sum, e.num_elements); printf("e.curr_sum: %"PRId64" e.num_elements: %"PRId64" \n", e.curr_sum, e.num_elements);
for (int i = 0; i < 20; ++i) {
printf("%d\t%d\n", i, e.elts[i]);
}
assert(false); assert(false);
} }
return r; return r;
......
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