diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2014-05-29 11:22:26 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2014-05-29 11:22:26 +1000 |
commit | 0698139a520463498d4f5c7e6b8c6e30bfd91e13 (patch) | |
tree | f1220bbe9212a1ed54ef9c983052abc77a631354 /bench | |
parent | 487a6f00da4c08820016dd53db168723b4f054fa (diff) | |
download | mongo-0698139a520463498d4f5c7e6b8c6e30bfd91e13.tar.gz |
Allow all byte values when wtperf randomizes its values: we will occasionally generate "special" values such as the ones that start with the LSM tombstone.
refs #1032
Diffstat (limited to 'bench')
-rw-r--r-- | bench/wtperf/wtperf.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bench/wtperf/wtperf.c b/bench/wtperf/wtperf.c index d2c9c6c057e..2b5059c2010 100644 --- a/bench/wtperf/wtperf.c +++ b/bench/wtperf/wtperf.c @@ -129,14 +129,13 @@ randomize_value(CONFIG *cfg, char *value_buf) * Each time we're called overwrite value_buf[0] and one other * randomly chosen byte (other than the trailing NUL). * Make sure we don't write a NUL: keep the value the same length. - * Keep the bytes printable: that makes debugging easier. */ i = __wt_random() % (cfg->value_sz - 1); while (value_buf[i] == '\0' && i > 0) --i; if (i > 0) { - value_buf[0] = 'A' + (__wt_random() % ('z' - 'A' + 1)); - value_buf[i] = 'A' + (__wt_random() % ('z' - 'A' + 1)); + value_buf[0] = (__wt_random() % 255) + 1; + value_buf[i] = (__wt_random() % 255) + 1; } return; } |