Commit 386c8afe authored by John Esmet's avatar John Esmet Committed by Yoni Fogel

refs #5702 fix possible divide by zero error


git-svn-id: file:///svn/toku/tokudb@52638 c7de825b-a66e-492c-adef-691d508d4ae1
parent 9435d0cc
...@@ -286,7 +286,7 @@ static void iibench_rangequery_db(DB *db, DB_TXN *txn, ARG arg, uint64_t max_pk) ...@@ -286,7 +286,7 @@ static void iibench_rangequery_db(DB *db, DB_TXN *txn, ARG arg, uint64_t max_pk)
// Get a random key no greater than max pk // Get a random key no greater than max pk
DBT start_key, end_key; DBT start_key, end_key;
uint64_t start_k = myrandom_r(arg->random_data) % max_pk; uint64_t start_k = myrandom_r(arg->random_data) % (max_pk + 1);
uint64_t end_k = start_k + limit; uint64_t end_k = start_k + limit;
dbt_init(&start_key, &start_k, 8); dbt_init(&start_key, &start_k, 8);
dbt_init(&end_key, &end_k, 8); dbt_init(&end_key, &end_k, 8);
......
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