diff options
author | unknown <serg@serg.mylan> | 2003-11-03 23:18:55 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2003-11-03 23:18:55 +0100 |
commit | 3d589199fba0115085ce2c1505e77bc37b6d4427 (patch) | |
tree | 394d996d42fa00462067fe81835c93a729a8713f /myisam | |
parent | 180c1d7103e4fe27aa98137b1cb4781bd831c4a7 (diff) | |
download | mariadb-git-3d589199fba0115085ce2c1505e77bc37b6d4427.tar.gz |
fixed a bug in boolean fts where a word queue was created based on min_word_len, while with trunc* operator one could get shorter words
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/ft_boolean_search.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c index 6a7b7531d4d..72c54bd0c5b 100644 --- a/myisam/ft_boolean_search.c +++ b/myisam/ft_boolean_search.c @@ -308,7 +308,7 @@ FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, byte *query, Hack: instead of init_queue, we'll use reinit queue to be able to alloc queue with alloc_root() */ - res=ftb->queue.max_elements=1+query_len/(ft_min_word_len+1); + res=ftb->queue.max_elements=1+query_len/(min(ft_min_word_len,2)+1); ftb->queue.root=(byte **)alloc_root(&ftb->mem_root, (res+1)*sizeof(void*)); reinit_queue(& ftb->queue, res, 0, 0, (int (*)(void*,byte*,byte*))FTB_WORD_cmp, 0); |