maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #11065
Re: [Commits] 4b4267288cb: MDEV-14743: Server crashes in Item_func_match::init_search
Hi, Oleksandr!
Two thoughts.
1. Please use
if (!ifm->fixed)
then you'll only need one #ifdef.
2. How does it work with the iterator? if you remove the current element
from the list and then iterator with jump to the next one, won't it
cause one element to be skipped?
On Jan 10, Oleksandr Byelkin wrote:
> revision-id: 4b4267288cb2668717cc70537eb7e79cecaff58a (mariadb-5.5.58-24-g4b4267288cb)
> parent(s): a408e881cf73d06fc92097fce6ef9584e16edf77
> author: Oleksandr Byelkin
> committer: Oleksandr Byelkin
> timestamp: 2018-01-10 12:22:56 +0100
> message:
>
> MDEV-14743: Server crashes in Item_func_match::init_search
>
> Remove non prepared (and so belonging to removed clauses FT functions) from the list.
>
> in later version it will be fixed by building the list during preparation.
>
> diff --git a/sql/sql_base.cc b/sql/sql_base.cc
> index c06c4fcff29..26e302ded35 100644
> --- a/sql/sql_base.cc
> +++ b/sql/sql_base.cc
> @@ -9550,7 +9550,19 @@ int init_ftfuncs(THD *thd, SELECT_LEX *select_lex, bool no_order)
> DBUG_PRINT("info",("Performing FULLTEXT search"));
>
> while ((ifm=li++))
> - ifm->init_search(no_order);
> +#if MYSQL_VERSION_ID < 100213
> + if (ifm->fixed)
> +#endif
> + ifm->init_search(no_order);
> +#if MYSQL_VERSION_ID < 100213
> + else
> + /*
> + it mean that clause where was FT function was removed, so we have
> + to remove the function from the list.
> + */
> + li.remove();
> +#endif
> +
> }
> return 0;
> }
Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx
Follow ups