Re: [Maria-developers] [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@mariadb.org
Hi, Sergei! Am 12.01.2018 um 17:37 schrieb Sergei Golubchik:
Hi, Oleksandr!
Two thoughts.
1. Please use
if (!ifm->fixed)
then you'll only need one #ifdef. OK, then I'll use __unlikely() also.
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? I do not know why, there was used normal iterator which allow removal, actually it should be List_iterator_fast. But as far as it is normal removing should work (it just step back current position, so next will be correct)
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@mariadb.org
_______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
participants (2)
-
Oleksandr Byelkin
-
Sergei Golubchik