summaryrefslogtreecommitdiff
path: root/myisam/ft_stopwords.c
diff options
context:
space:
mode:
Diffstat (limited to 'myisam/ft_stopwords.c')
-rw-r--r--myisam/ft_stopwords.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/myisam/ft_stopwords.c b/myisam/ft_stopwords.c
index 4c13a845b42..ce08fee9e1e 100644
--- a/myisam/ft_stopwords.c
+++ b/myisam/ft_stopwords.c
@@ -51,8 +51,8 @@ int ft_init_stopwords(const char **sws)
if( (sw.len= (uint) strlen(sw.pos=*sws)) < MIN_WORD_LEN) continue;
if(!tree_insert(stopwords3, &sw, 0))
{
- delete_tree(stopwords3);
- return -1;
+ delete_tree(stopwords3); /* purecov: inspected */
+ return -1; /* purecov: inspected */
}
}
return 0;
@@ -66,3 +66,12 @@ int is_stopword(char *word, uint len)
return tree_search(stopwords3,&sw) != NULL;
}
+
+void ft_free_stopwords()
+{
+ if (stopwords3)
+ {
+ delete_tree(stopwords3); /* purecov: inspected */
+ stopwords3=0;
+ }
+}