summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-05-12 19:50:51 -0600
committerunknown <sasha@mysql.sashanet.com>2001-05-12 19:50:51 -0600
commitb7b7eb9c05f3036da3f90b5cad03a3b47d1f7aa2 (patch)
tree9a5be3c1de61f22213e62a51418e4cb6820cdc33 /include
parent64984296241873f90e39d744b59690c7b3b408bb (diff)
downloadmariadb-git-b7b7eb9c05f3036da3f90b5cad03a3b47d1f7aa2.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() include/my_sys.h: option to free_root() not to do my_free() include/my_tree.h: reset_tree() mysql-test/r/count_distinct2.result: added group by test mysql-test/t/count_distinct2.test: group by test + fixed bug - need to drop table mysys/my_alloc.c: mark_blocks_free() mysys/tree.c: reset_tree() sql/item_sum.cc: in count distinct reset_tree instead of delete_tree
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 */