diff options
author | unknown <serg@serg.mysql.com> | 2003-01-27 12:12:12 +0100 |
---|---|---|
committer | unknown <serg@serg.mysql.com> | 2003-01-27 12:12:12 +0100 |
commit | 73e6cc4fe4163a955d67eb2ae66a0b0e1ff70d19 (patch) | |
tree | 308c05953601ebed05ef43d4038d1baf7fd15fdb /myisam | |
parent | dee921691d71f61978f324c8cb65690360107ab5 (diff) | |
download | mariadb-git-73e6cc4fe4163a955d67eb2ae66a0b0e1ff70d19.tar.gz |
fixes for SHOW VARIABLES and --ft-stopword-list
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/ft_stopwords.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/myisam/ft_stopwords.c b/myisam/ft_stopwords.c index 30a1f6e5dc8..126dddf0e5f 100644 --- a/myisam/ft_stopwords.c +++ b/myisam/ft_stopwords.c @@ -36,7 +36,7 @@ static int FT_STOPWORD_cmp(void* cmp_arg __attribute__((unused)), static void FT_STOPWORD_free(FT_STOPWORD *w, TREE_FREE action, void *arg __attribute__((unused))) { - if (action == free_free && ft_stopword_file) + if (action == free_free) my_free(w->pos, MYF(0)); } @@ -55,7 +55,9 @@ int ft_init_stopwords() if (!(stopwords3=(TREE *)my_malloc(sizeof(TREE),MYF(0)))) return -1; init_tree(stopwords3,0,0,sizeof(FT_STOPWORD),(qsort_cmp2)&FT_STOPWORD_cmp, - 0, (tree_element_free)&FT_STOPWORD_free, NULL); + 0, + (ft_stopword_file ? (tree_element_free)&FT_STOPWORD_free : 0), + NULL); } if (ft_stopword_file) @@ -102,6 +104,7 @@ err0: if (ft_add_stopword(*sws)) return -1; } + ft_stopword_file="(built-in)"; /* for SHOW VARIABLES */ } return 0; } |