diff options
author | Igor Babaev <igor@askmonty.org> | 2010-12-19 00:44:39 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2010-12-19 00:44:39 -0800 |
commit | 65af63b038cb2ccc0503d6f67f6b70a8e9e438a0 (patch) | |
tree | be759a5029bdf90fe3c979451a954d42f4f6388b /include/my_tree.h | |
parent | 91f950b1c68089cee799adffdf0abb7ff639b579 (diff) | |
download | mariadb-git-65af63b038cb2ccc0503d6f67f6b70a8e9e438a0.tar.gz |
Addressed the feedback from the review of Monty on the cumulative patch for
mwl#21.
Diffstat (limited to 'include/my_tree.h')
-rw-r--r-- | include/my_tree.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/my_tree.h b/include/my_tree.h index ca207932c73..3aeef20e0ad 100644 --- a/include/my_tree.h +++ b/include/my_tree.h @@ -30,6 +30,15 @@ extern "C" { #define tree_set_pointer(element,ptr) *((uchar **) (element+1))=((uchar*) (ptr)) +/* + A tree with its flag set to TREE_ONLY_DUPS behaves differently on inserting + an element that is not in the tree: + the element is not added at all, but instead tree_insert() returns a special + address TREE_ELEMENT_UNIQUE as an indication that the function has not failed + due to lack of memory. +*/ + +#define TREE_ELEMENT_UNIQUE ((TREE_ELEMENT *) 1) #define TREE_NO_DUPS 1 #define TREE_ONLY_DUPS 2 |