From: Sebastian B. <sb...@us...> - 2014-01-19 18:51:51
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25044 Modified Files: index_external.c Log Message: No longer leaves early, if there is a direct match. Index: index_external.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/index_external.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- index_external.c 19 Jan 2014 18:51:10 -0000 1.45 +++ index_external.c 19 Jan 2014 18:51:49 -0000 1.46 @@ -322,11 +322,6 @@ path->node[level].block = block; path->node[level].key_index = i; - /* Leave early if this was a direct match with a separation key. - * In this case, we do not need to descend to the child */ - if (direct_match) - goto out; - if (block == lchild && !tmp->leaf) { fprintf(stderr, "Endless loop detected!\n"); @@ -604,12 +599,12 @@ if (tmp->num_elements == idx->max_elements_per_node) { - /* Now we split the node into two nodes. We keep the median out as we + /* Now we split the node into two nodes. We keep the median in but also * insert it as a separation value for the two nodes on the parent. */ int median = tmp->num_elements / 2; - int start_of_2nd_node = median + 1; + int start_of_2nd_node = median; struct bnode_element *me = bnode_get_ith_element_of_node(idx, tmp, median); struct bnode_element me_copy = *me; |