summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorserg@serg.mysql.com <>2002-04-18 18:44:18 +0000
committerserg@serg.mysql.com <>2002-04-18 18:44:18 +0000
commit2e6b3c267372aab4f0d5d2da7a0dee9c83f240c4 (patch)
tree3ad18af758595fdc9b8408fe54afa489d9cb87df /myisam
parente1a6d0e13df8da8b91369ed198a149d7cec86cbf (diff)
downloadmariadb-git-2e6b3c267372aab4f0d5d2da7a0dee9c83f240c4.tar.gz
ftb bug fixed
Diffstat (limited to 'myisam')
-rw-r--r--myisam/ft_boolean_search.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c
index 10b5044826f..5daa6919052 100644
--- a/myisam/ft_boolean_search.c
+++ b/myisam/ft_boolean_search.c
@@ -256,7 +256,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=query_len/(ft_min_word_len+1);
+ res=ftb->queue.max_elements=1+query_len/(ft_min_word_len+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, ftb);