summaryrefslogtreecommitdiff
path: root/storage/myisam/ft_parser.c
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2017-05-17 00:34:48 +0300
committerMonty <monty@mariadb.org>2017-05-17 00:34:48 +0300
commit6378c95ee07cccc2f2187b2caddc4496e14827d9 (patch)
tree1e7b9066e15288e3471f0c800e5dda820d3d0daf /storage/myisam/ft_parser.c
parent314350a722e65081472113c53657ad239f3bef72 (diff)
downloadmariadb-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 'storage/myisam/ft_parser.c')
-rw-r--r--storage/myisam/ft_parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/myisam/ft_parser.c b/storage/myisam/ft_parser.c
index c8d99b68e8a..fc3a649dd53 100644
--- a/storage/myisam/ft_parser.c
+++ b/storage/myisam/ft_parser.c
@@ -59,7 +59,7 @@ FT_WORD * ft_linearize(TREE *wtree, MEM_ROOT *mem_root)
docstat.sum=0;
tree_walk(wtree,(tree_walk_action)&walk_and_copy,&docstat,left_root_right);
}
- delete_tree(wtree);
+ delete_tree(wtree, 0);
if (!wlist)
DBUG_RETURN(NULL);
@@ -277,7 +277,7 @@ static int ft_add_word(MYSQL_FTPARSER_PARAM *param,
w.len= word_len;
if (!tree_insert(wtree, &w, 0, wtree->custom_arg))
{
- delete_tree(wtree);
+ delete_tree(wtree, 0);
DBUG_RETURN(1);
}
DBUG_RETURN(0);