Commit 0665ec1d authored by Rik Prohaska's avatar Rik Prohaska

tokuftdump should print leaf entry index so that the dump is easier to work with

parent 981200b6
......@@ -248,6 +248,8 @@ static int64_t getRootNode(FT ft) {
}
static int print_le(const void* key, const uint32_t keylen, const LEAFENTRY &le, const uint32_t idx UU(), void *const ai UU()) {
unsigned int *le_index = (unsigned int *) ai;
printf("%u: ", *le_index); *le_index += 1;
print_klpair(stdout, key, keylen, le);
printf("\n");
return 0;
......@@ -537,7 +539,8 @@ static void dump_node(int fd, BLOCKNUM blocknum, FT ft) {
printf(" n_bytes_in_buffer= %" PRIu64 "", BLB_DATA(n, i)->get_disk_size());
printf(" items_in_buffer=%u\n", BLB_DATA(n, i)->num_klpairs());
if (do_dump_data) {
BLB_DATA(n, i)->iterate<void, print_le>(NULL);
unsigned int le_index = 0;
BLB_DATA(n, i)->iterate<void, print_le>(&le_index);
}
}
}
......
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