Fix the valgrind issues

This commit is contained in:
Kai Liu
2014-01-03 10:53:21 -08:00
parent 774ed89c24
commit 5e7d5629c7
3 changed files with 29 additions and 13 deletions

View File

@@ -647,7 +647,7 @@ class Harness {
case PLAIN_TABLE_FULL_STR_PREFIX:
support_prev_ = false;
only_support_prefix_seek_ = true;
options_.prefix_extractor = NewNoopTransform();
options_.prefix_extractor = noop_transform.get();
options_.allow_mmap_reads = true;
options_.table_factory.reset(new PlainTableFactory());
constructor_ = new TableConstructor(options_.comparator, true);
@@ -849,8 +849,12 @@ class Harness {
bool support_prev_;
bool only_support_prefix_seek_;
shared_ptr<Comparator> internal_comparator_;
static std::unique_ptr<const SliceTransform> noop_transform;
};
std::unique_ptr<const SliceTransform> Harness::noop_transform(
NewNoopTransform());
static bool Between(uint64_t val, uint64_t low, uint64_t high) {
bool result = (val >= low) && (val <= high);
if (!result) {