summaryrefslogtreecommitdiff
path: root/include/my_tree.h
diff options
context:
space:
mode:
authorsvoj@april.(none) <>2006-04-19 15:13:50 +0500
committersvoj@april.(none) <>2006-04-19 15:13:50 +0500
commit06ce215f103cf83aee63a9e24340e15ee8ca1ee8 (patch)
tree5bb95b29ccad280aca995617952fa4dd8c747dc3 /include/my_tree.h
parentda6210ee61ed204d1b327081d5258f13eec5072d (diff)
downloadmariadb-git-06ce215f103cf83aee63a9e24340e15ee8ca1ee8.tar.gz
BUG#18160 - Memory-/HEAP Table endless growing indexes
Updating data in HEAP table with BTREE index results in wrong index_length counter value, which keeps growing after each update. When inserting new record into tree counter is incremented by: sizeof(TREE_ELEMENT) + key_size + tree->size_of_element But when deleting element from tree it doesn't decrement counter by key_size: sizeof(TREE_ELEMENT) + tree->size_of_element This fix makes accurate allocated memory counter for tree. That is decrease counter by key_size when deleting tree element.
Diffstat (limited to 'include/my_tree.h')
-rw-r--r--include/my_tree.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/my_tree.h b/include/my_tree.h
index 14d8593b6dc..03dc9d5c829 100644
--- a/include/my_tree.h
+++ b/include/my_tree.h
@@ -84,7 +84,7 @@ TREE_ELEMENT *tree_insert(TREE *tree,void *key, uint key_size,
void *tree_search(TREE *tree, void *key, void *custom_arg);
int tree_walk(TREE *tree,tree_walk_action action,
void *argument, TREE_WALK visit);
-int tree_delete(TREE *tree, void *key, void *custom_arg);
+int tree_delete(TREE *tree, void *key, uint key_size, void *custom_arg);
void *tree_search_key(TREE *tree, const void *key,
TREE_ELEMENT **parents, TREE_ELEMENT ***last_pos,
enum ha_rkey_function flag, void *custom_arg);