while investigating 554, came across this issue of not checking for proper value
This MAY fix 554, but we doubt it.

git-svn-id: file:///svn/tokudb@2953 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Yoni Fogel 2008-03-19 18:01:40 +00:00
parent c3024db098
commit 6153661e2c
2 changed files with 4 additions and 4 deletions

View file

@ -108,13 +108,13 @@ void toku_lth_delete(toku_lth* lth, toku_lock_tree* key) {
toku_lth_elt* prev = head;
toku_lth_elt* current = prev->next_in_bucket;
while (current != head) {
while (current != NULL) {
if (current->value.hash_key == key) break;
prev = current;
current = current->next_in_bucket;
}
/* Must be found. */
assert(current != head);
assert(current);
current->prev_in_iteration->next_in_iteration = current->next_in_iteration;
current->next_in_iteration->prev_in_iteration = current->prev_in_iteration;
prev->next_in_bucket = current->next_in_bucket;

View file

@ -108,13 +108,13 @@ void toku_rth_delete(toku_rth* rth, DB_TXN* key) {
toku_rth_elt* prev = head;
toku_rth_elt* current = prev->next_in_bucket;
while (current != head) {
while (current != NULL) {
if (current->value.hash_key == key) break;
prev = current;
current = current->next_in_bucket;
}
/* Must be found. */
assert(current != head);
assert(current);
current->prev_in_iteration->next_in_iteration = current->next_in_iteration;
current->next_in_iteration->prev_in_iteration = current->prev_in_iteration;
prev->next_in_bucket = current->next_in_bucket;