Fix memtable construction in tests

This commit is contained in:
Igor Canadi
2014-01-14 15:32:37 -08:00
parent 055e6df45b
commit 7f3e417f59
3 changed files with 14 additions and 8 deletions

View File

@@ -22,10 +22,11 @@ namespace rocksdb {
static std::string PrintContents(WriteBatch* b) {
InternalKeyComparator cmp(BytewiseComparator());
auto factory = std::make_shared<SkipListFactory>();
MemTable* mem = new MemTable(cmp, factory.get());
Options options;
options.memtable_factory = factory;
MemTable* mem = new MemTable(cmp, options);
mem->Ref();
std::string state;
Options options;
Status s = WriteBatchInternal::InsertInto(b, mem, &options);
int count = 0;
Iterator* iter = mem->NewIterator();