summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorjimw@mysql.com <>2005-06-17 21:44:17 +0200
committerjimw@mysql.com <>2005-06-17 21:44:17 +0200
commit176143413e713d0ce78cc11f909abe8c5d1c4340 (patch)
treead6efdce69deb802627c189485df5498a88a437c /myisam
parent9b3d0b85a3c372ac7ac8be0cbec859cba8f13a57 (diff)
downloadmariadb-git-176143413e713d0ce78cc11f909abe8c5d1c4340.tar.gz
Fix hang/crash with Boolean full-text search against an unindexed field for
which the query contained more words than we allocated space. (Bug #7858)
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 62c68322595..8045ddd4657 100644
--- a/myisam/ft_boolean_search.c
+++ b/myisam/ft_boolean_search.c
@@ -398,7 +398,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/(min(ft_min_word_len,2)+1);
+ res=ftb->queue.max_elements=1+query_len/2;
if (!(ftb->queue.root=
(byte **)alloc_root(&ftb->mem_root, (res+1)*sizeof(void*))))
goto err;