List:Commits« Previous MessageNext Message »
From:Sergei Golubchik Date:July 10 2007 6:45pm
Subject:Re: bk commit into 5.1 tree (svoj:1.2538) BUG#29445
View as plain text  
Hi!

On Jul 10, Sergey Vojtovich wrote:
> ChangeSet@stripped, 2007-07-10 15:37:39+05:00, svoj@stripped +3 -0
>   BUG#29445 - match ... against () never returns
>   
>   Part 1:
>   Do not perform index search for a plus-word with truncation operator
>   in case there are other plus-words in expression.
>   
>   Specifically this optimization was enforced for expression like
>   "+word1 +word2*", but wasn't enforced for expression like
>   "+word1 word2*".
> 
> diff -Nrup a/storage/myisam/ft_boolean_search.c b/storage/myisam/ft_boolean_search.c
> --- a/storage/myisam/ft_boolean_search.c	2007-06-01 00:28:00 +05:00
> +++ b/storage/myisam/ft_boolean_search.c	2007-07-10 15:37:37 +05:00
> @@ -474,7 +474,8 @@ static void _ftb_init_index_search(FT_IN
>             ftbe->up->flags|= FTB_FLAG_TRUNC, ftbe=ftbe->up)
>        {
>          if (ftbe->flags & FTB_FLAG_NO ||                     /* 2 */
> -             ftbe->up->ythresh - ftbe->up->yweaks >1)        /* 1 */
> +            ftbe->up->ythresh - ftbe->up->yweaks >
> +            test(ftbe->flags & FTB_FLAG_YES))                /* 1 */
>          {
>            FTB_EXPR *top_ftbe=ftbe->up;
>            ftbw->docid[0]=HA_OFFSET_ERROR;

Okay, good.
But notice, this is inside a for() loop going up the expression tree,
and the comment says "in 1 and 2, +/- need not be on the same expr.
level, but can be on any upper level, as in +word +(trunc1* trunc2*)".

Please add a test case for this (you can use fulltext.test for
inspiration :).

ok to push with a test case.

Regards / Mit vielen Grüssen,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@stripped>
 / /|_/ / // /\ \/ /_/ / /__  Principal Software Developer
/_/  /_/\_, /___/\___\_\___/  MySQL GmbH, Radlkoferstr. 2, D-81373 München
       <___/                  Geschäftsführer: Kaj Arnö - HRB
München 162140
Thread
bk commit into 5.1 tree (svoj:1.2538) BUG#29445Sergey Vojtovich10 Jul
  • Re: bk commit into 5.1 tree (svoj:1.2538) BUG#29445Sergei Golubchik10 Jul