Commit 648535fd authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

{{{test-recover3.tdb}}} now runs. Addresses #558.

git-svn-id: file:///svn/tokudb@3255 c7de825b-a66e-492c-adef-691d508d4ae1
parent 07591bd1
...@@ -440,13 +440,17 @@ void toku_verify_counts (BRTNODE node) { ...@@ -440,13 +440,17 @@ void toku_verify_counts (BRTNODE node) {
assert(node->u.l.buffer); assert(node->u.l.buffer);
unsigned int sum=0; unsigned int sum=0;
unsigned int count=0; unsigned int count=0;
GPMA_ITERATE(node->u.l.buffer, idx, dlen, dvadata, u_int32_t fp=0;
GPMA_ITERATE(node->u.l.buffer, idx, dlen, ddata,
({ ({
count++; count++;
sum+=(PMA_ITEM_OVERHEAD + dlen); sum+=(PMA_ITEM_OVERHEAD + dlen);
fp += toku_calccrc32_kvpair_struct(ddata);
})); }));
assert(count==toku_gpma_n_entries(node->u.l.buffer)); assert(count==toku_gpma_n_entries(node->u.l.buffer));
assert(sum==node->u.l.n_bytes_in_buffer); assert(sum==node->u.l.n_bytes_in_buffer);
u_int32_t fps = node->rand4fingerprint *fp;
assert(fps==node->local_fingerprint);
} else { } else {
unsigned int sum = 0; unsigned int sum = 0;
int i; int i;
......
...@@ -490,7 +490,7 @@ int move_indices (GPMA from, struct mempool *from_mempool, ...@@ -490,7 +490,7 @@ int move_indices (GPMA from, struct mempool *from_mempool,
struct gitem item = from->items[idx]; struct gitem item = from->items[idx];
items[i]=item; items[i]=item;
from->items[idx].data = 0; from->items[idx].data = 0;
fp += toku_crc32(toku_null_crc, item.data, item.len); fp += toku_calccrc32_kvpair_struct(item.data);
sizediff += PMA_ITEM_OVERHEAD + item.len; sizediff += PMA_ITEM_OVERHEAD + item.len;
assert(kv_pair_size(item.data)==item.len); assert(kv_pair_size(item.data)==item.len);
} }
......
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