From 15ccd10c7f2bfcb9c3b5f97484a12e5c178c8b3f Mon Sep 17 00:00:00 2001 From: Mayank Agarwal Date: Mon, 20 May 2013 14:45:22 -0700 Subject: [PATCH] A nit to db_stress to terminate generated value at proper length Summary: Will help while debugging if the generated value is truncated at proper length. Test Plan: make db_stress;/db_stress --max_key=10000 --db=/tmp/mcr --threads=1 --ops_per_thread=10000 Reviewers: dhruba, vamsi Reviewed By: vamsi Differential Revision: https://reviews.facebook.net/D10845 --- tools/db_stress.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/db_stress.cc b/tools/db_stress.cc index aa95b30f8..eb4a1f892 100644 --- a/tools/db_stress.cc +++ b/tools/db_stress.cc @@ -869,6 +869,7 @@ class StressTest { for (size_t i=sizeof(uint32_t); i < value_sz; i++) { v[i] = (char)(rand ^ i); } + v[value_sz] = '\0'; return value_sz; // the size of the value set. }