Commit e052b005 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#3821 simplfy the db-update sample code refs[t:3821]

git-svn-id: file:///svn/toku/tokudb@33426 c7de825b-a66e-492c-adef-691d508d4ae1
parent 65eaa7fd
...@@ -148,9 +148,9 @@ int main(int argc, char *argv[]) { ...@@ -148,9 +148,9 @@ int main(int argc, char *argv[]) {
long rows_per_txn = 1000; long rows_per_txn = 1000;
long rows_per_report = 100000; long rows_per_report = 100000;
int key_range = 100000; int key_range = 100000;
bool do_update_callback = false; bool do_update_callback = true;
bool do_txn = true; bool do_txn = false;
u_int64_t cachesize = 0; u_int64_t cachesize = 32000000;
u_int32_t pagesize = 0; u_int32_t pagesize = 0;
int i; int i;
...@@ -177,7 +177,7 @@ int main(int argc, char *argv[]) { ...@@ -177,7 +177,7 @@ int main(int argc, char *argv[]) {
continue; continue;
} }
if (strcmp(arg, "--txn") == 0 && i+1 < argc) { if (strcmp(arg, "--txn") == 0 && i+1 < argc) {
do_txn = atoi(argv[++i]); do_txn = atoi(argv[++i]) != 0;
continue; continue;
} }
if (strcmp(arg, "--pagesize") == 0 && i+1 < argc) { if (strcmp(arg, "--pagesize") == 0 && i+1 < argc) {
...@@ -188,8 +188,8 @@ int main(int argc, char *argv[]) { ...@@ -188,8 +188,8 @@ int main(int argc, char *argv[]) {
cachesize = atol(argv[++i]); cachesize = atol(argv[++i]);
continue; continue;
} }
if (strcmp(arg, "--update_callback") == 0) { if (strcmp(arg, "--update_callback") == 0 && i+1 < argc) {
do_update_callback = true; do_update_callback = atoi(argv[++i]) != 0;
continue; continue;
} }
......
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