~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_tree.h

Merged in latest plugin-slot-reorg.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#endif
21
21
 
22
22
#include <drizzled/base.h>              /* get 'enum ha_rkey_function' */
 
23
#include <mysys/my_sys.h>
23
24
 
24
25
/* Worst case tree is half full. This gives use 2^(MAX_TREE_HEIGHT/2) leafs */
25
26
#define MAX_TREE_HEIGHT 64
71
72
#define is_tree_inited(tree) ((tree)->root != 0)
72
73
 
73
74
        /* Functions on leafs */
74
 
TREE_ELEMENT *tree_insert(TREE *tree,void *key, uint32_t key_size, 
 
75
TREE_ELEMENT *tree_insert(TREE *tree,void *key, uint32_t key_size,
75
76
                          void *custom_arg);
76
77
void *tree_search(TREE *tree, void *key, void *custom_arg);
77
78
int tree_walk(TREE *tree,tree_walk_action action,
78
79
              void *argument, TREE_WALK visit);
79
80
int tree_delete(TREE *tree, void *key, uint32_t key_size, void *custom_arg);
80
 
void *tree_search_key(TREE *tree, const void *key, 
 
81
void *tree_search_key(TREE *tree, const void *key,
81
82
                      TREE_ELEMENT **parents, TREE_ELEMENT ***last_pos,
82
83
                      enum ha_rkey_function flag, void *custom_arg);
83
 
void *tree_search_edge(TREE *tree, TREE_ELEMENT **parents, 
 
84
void *tree_search_edge(TREE *tree, TREE_ELEMENT **parents,
84
85
                        TREE_ELEMENT ***last_pos, int child_offs);
85
 
void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs, 
 
86
void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs,
86
87
                       int r_offs);
87
 
ha_rows tree_record_pos(TREE *tree, const void *key, 
 
88
ha_rows tree_record_pos(TREE *tree, const void *key,
88
89
                     enum ha_rkey_function search_flag, void *custom_arg);
89
90
 
90
91
#define TREE_ELEMENT_EXTRA_SIZE (sizeof(TREE_ELEMENT) + sizeof(void*))