Commit 323d9dec authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#3520 lock tree test coverage refs[t:3520]

git-svn-id: file:///svn/toku/tokudb@42988 c7de825b-a66e-492c-adef-691d508d4ae1
parent e2e0fd9e
...@@ -424,7 +424,7 @@ payload_copy(toku_lock_tree* tree, ...@@ -424,7 +424,7 @@ payload_copy(toku_lock_tree* tree,
return r; return r;
} }
static inline int static inline void
p_makecopy(toku_lock_tree* tree, toku_point** ppoint) { p_makecopy(toku_lock_tree* tree, toku_point** ppoint) {
assert(ppoint); assert(ppoint);
int r; int r;
...@@ -438,7 +438,6 @@ p_makecopy(toku_lock_tree* tree, toku_point** ppoint) { ...@@ -438,7 +438,6 @@ p_makecopy(toku_lock_tree* tree, toku_point** ppoint) {
point->key_payload, point->key_len); point->key_payload, point->key_len);
assert_zero(r); assert_zero(r);
*ppoint = temp_point; *ppoint = temp_point;
return r;
} }
/* Provides access to a selfread tree for a particular transaction. /* Provides access to a selfread tree for a particular transaction.
...@@ -873,7 +872,6 @@ static inline int ...@@ -873,7 +872,6 @@ static inline int
lt_alloc_extreme(toku_lock_tree* tree, toku_range* to_insert, bool alloc_left, BOOL* alloc_right) { lt_alloc_extreme(toku_lock_tree* tree, toku_range* to_insert, bool alloc_left, BOOL* alloc_right) {
assert(to_insert && alloc_right); assert(to_insert && alloc_right);
bool copy_left = FALSE; bool copy_left = FALSE;
int r;
/* The pointer comparison may speed up the evaluation in some cases, /* The pointer comparison may speed up the evaluation in some cases,
but it is not strictly needed */ but it is not strictly needed */
...@@ -885,21 +883,11 @@ lt_alloc_extreme(toku_lock_tree* tree, toku_range* to_insert, bool alloc_left, B ...@@ -885,21 +883,11 @@ lt_alloc_extreme(toku_lock_tree* tree, toku_range* to_insert, bool alloc_left, B
} }
if (alloc_left) { if (alloc_left) {
r = p_makecopy(tree, &to_insert->ends.left); p_makecopy(tree, &to_insert->ends.left);
if (0) {
died1:
if (alloc_left)
p_free(tree, to_insert->ends.left);
return r;
}
if (r != 0)
return r;
} }
if (*alloc_right) { if (*alloc_right) {
assert(!copy_left); assert(!copy_left);
r = p_makecopy(tree, &to_insert->ends.right); p_makecopy(tree, &to_insert->ends.right);
if (r != 0)
goto died1;
} }
else if (copy_left) else if (copy_left)
to_insert->ends.right = to_insert->ends.left; to_insert->ends.right = to_insert->ends.left;
......
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