diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index 7f4d84025..eaae6018e 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -4647,6 +4647,7 @@ void VerifyDBFromDB(std::string& truth_db_name) { if (rand_num < 0) { rand_num = rand_num * (-1); } + assert(range_ != 0); int pos = static_cast(rand_num % range_); for (int i = 0; i < static_cast(type_.size()); i++) { if (pos < type_[i]) {