diff options
author | Monty <monty@mariadb.org> | 2017-05-17 00:34:48 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2017-05-17 00:34:48 +0300 |
commit | 6378c95ee07cccc2f2187b2caddc4496e14827d9 (patch) | |
tree | 1e7b9066e15288e3471f0c800e5dda820d3d0daf /include/my_tree.h | |
parent | 314350a722e65081472113c53657ad239f3bef72 (diff) | |
download | mariadb-git-6378c95ee07cccc2f2187b2caddc4496e14827d9.tar.gz |
Fix that end_bulk_insert() doesn't write to to-be-deleted files
This affected mainly MyISAM and Aria engines.
Also fixed that end_bulk_insert() detects errors from
internal mi_end_bulk_insert() and ma_end_bulk_insert()
- delete_tree() and delete_tree_element() now has an
extra argument that marks if future calls to
tree->free should be ignored.
- tree->free changed to function returning int, to be
able to signal errors.
- Restored deleting flag in MyISAM that was accidently
disabled in mi_extra(PREPARE_FOR_DROP)
Diffstat (limited to 'include/my_tree.h')
-rw-r--r-- | include/my_tree.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/my_tree.h b/include/my_tree.h index 02cab02b52e..e175492431e 100644 --- a/include/my_tree.h +++ b/include/my_tree.h @@ -48,7 +48,7 @@ typedef uint32 element_count; typedef int (*tree_walk_action)(void *,element_count,void *); typedef enum { free_init, free_free, free_end } TREE_FREE; -typedef void (*tree_element_free)(void*, TREE_FREE, void *); +typedef int (*tree_element_free)(void*, TREE_FREE, void *); typedef struct st_tree_element { struct st_tree_element *left,*right; @@ -77,8 +77,8 @@ void init_tree(TREE *tree, size_t default_alloc_size, size_t memory_limit, int size, qsort_cmp2 compare, tree_element_free free_element, void *custom_arg, myf my_flags); -void delete_tree(TREE*); -void reset_tree(TREE*); +int delete_tree(TREE*, my_bool abort); +int 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) |