summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorsasha@mysql.sashanet.com <>2001-05-12 19:50:51 -0600
committersasha@mysql.sashanet.com <>2001-05-12 19:50:51 -0600
commitef27ec42c2a6b361e7c158bc5974ea3dd5301804 (patch)
tree9a5be3c1de61f22213e62a51418e4cb6820cdc33 /include
parentb2977103af66508bf5697a2fe778c94293408338 (diff)
downloadmariadb-git-ef27ec42c2a6b361e7c158bc5974ea3dd5301804.tar.gz
option to free_root() to not my_free() the blocks
fixed bug/updated count_distinct2 test changed reset in count distinct to avoid calls to my_free()
Diffstat (limited to 'include')
-rw-r--r--include/my_sys.h6
-rw-r--r--include/my_tree.h3
2 files changed, 8 insertions, 1 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index 44faddad405..b5d59d2e801 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -108,7 +108,11 @@ extern int NEAR my_errno; /* Last error in mysys */
/* root_alloc flags */
#define MY_KEEP_PREALLOC 1
-
+#define MY_MARK_BLOCKS_FREE 2 /* do not my_free() blocks,
+ just move used into free list
+ and mark all blocks as fully free
+ */
+
/* defines when allocating data */
#ifdef SAFEMALLOC
diff --git a/include/my_tree.h b/include/my_tree.h
index d4d28644a39..be95e3ff4d2 100644
--- a/include/my_tree.h
+++ b/include/my_tree.h
@@ -62,6 +62,9 @@ void init_tree(TREE *tree,uint default_alloc_size, int element_size,
qsort_cmp2 compare, my_bool with_delete,
void (*free_element)(void*));
void delete_tree(TREE*);
+void reset_tree(TREE*);
+ /* similar to delete tree, except we do not my_free() blocks in mem_root
+ */
#define is_tree_inited(tree) ((tree)->root != 0)
/* Functions on leafs */