diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2015-08-05 18:20:35 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2015-08-05 18:20:35 +1000 |
commit | 5289a0ffd6f78a0798c6b79115ac7b734836b01e (patch) | |
tree | fb784ee3d9408bf2d27ccee377335f1983b5b749 | |
parent | da99fbb759a5c30cbfa836e7996c9994d9586e86 (diff) | |
download | mongo-5289a0ffd6f78a0798c6b79115ac7b734836b01e.tar.gz |
Deal with rnd == NULL in test/format.
-rw-r--r-- | test/format/util.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/format/util.c b/test/format/util.c index ba4d92af7fe..dff5ab43571 100644 --- a/test/format/util.c +++ b/test/format/util.c @@ -186,7 +186,7 @@ val_gen(WT_RAND_STATE *rnd, uint8_t *val, size_t *sizep, uint64_t keyno) * Start the data with a 10-digit number. * * For row and non-repeated variable-length column-stores, change the - * leading number to ensure every data item is unique. For repeated + * leading number to ensure every data item is unique. For repeated * variable-length column-stores (that is, to test run-length encoding), * use the same data value all the time. */ @@ -368,6 +368,13 @@ rng(WT_RAND_STATE *rnd) uint32_t r; /* + * Threaded operations have their own RNG information, otherwise we + * use the default. + */ + if (rnd == NULL) + rnd = &g.rnd; + + /* * We can entirely reproduce a run based on the random numbers used * in the initial run, plus the configuration files. It would be * nice to just log the initial RNG seed, rather than logging every |