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
main
Mayank Agarwal 12 years ago
parent 8a59ed9bc7
commit 15ccd10c7f
  1. 1
      tools/db_stress.cc

@ -869,6 +869,7 @@ class StressTest {
for (size_t i=sizeof(uint32_t); i < value_sz; i++) { for (size_t i=sizeof(uint32_t); i < value_sz; i++) {
v[i] = (char)(rand ^ i); v[i] = (char)(rand ^ i);
} }
v[value_sz] = '\0';
return value_sz; // the size of the value set. return value_sz; // the size of the value set.
} }

Loading…
Cancel
Save