mirror of
https://github.com/MariaDB/server.git
synced 2026-04-24 01:05:30 +02:00
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) myisam/ft_boolean_search.c: Fix calculation of max number of elements -- "words" may not have spaces between them. mysql-test/t/fulltext.test: Modify test to be specific to reported bug (fix for old bug wasn't quite enough) mysql-test/r/fulltext.result: Update results
This commit is contained in:
parent
6de6d3ad5c
commit
61b2a6b083
3 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue