Commit 97d77b9e authored by John Esmet's avatar John Esmet

FT-273 Fixup a bug and a few tests

parent ac4e71ef
......@@ -387,7 +387,8 @@ static void ft_init(FT ft, FT_OPTIONS options, CACHEFILE cf) {
toku_list_init(&ft->live_ft_handles);
ft->cmp.create(options->compare_fun, &ft->descriptor);
// intuitively, the comparator points to the FT's cmp descriptor
ft->cmp.create(options->compare_fun, &ft->cmp_descriptor);
ft->update_fun = options->update_fun;
if (ft->cf != NULL) {
......
......@@ -420,7 +420,6 @@ test_serialize_nonleaf(int valsize, int nelts, double entropy, int ser_runs, int
toku_free(ft);
toku_free(ndd);
toku_free(ndd2);
cmp.destroy();
r = close(fd); assert(r != -1);
}
......
......@@ -1125,12 +1125,12 @@ test_serialize_nonleaf(enum ftnode_verify_type bft, bool do_clone) {
toku_block_free(ft_h->blocktable, BLOCK_ALLOCATOR_TOTAL_HEADER_RESERVE);
toku_blocktable_destroy(&ft_h->blocktable);
ft_h->cmp.destroy();
toku_free(ft_h->h);
toku_free(ft_h);
toku_free(ft);
toku_free(src_ndd);
toku_free(dest_ndd);
cmp.destroy();
r = close(fd); assert(r != -1);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment