MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Konstantin Osipov Date:October 9 2008 3:13pm
Subject:Re: bzr commit into mysql-5.0-bugteam branch (gshchepa:2703) Bug#38499
View as plain text  
* Gleb Shchepa <gshchepa@stripped> [08/10/09 19:03]:
>  2703 Gleb Shchepa	2008-10-09
>       Bug#38499: flush tables and multitable table update with
>                  derived table cause crash
>       
>       When a multi-UPDATE command fails to lock some table, and
>       subsequently succeeds, the tables need to be reopened if
>       they were altered. But the reopening procedure failed for
>       derived tables.
>       
>       Extra cleanup has been added.

OK to push.

>  
> +    lex->unit.cleanup();
> +
> +    if (thd->derived_tables)
> +    {
> +      /*
> +        To not to hog memory (as a result of the 
> +        unit->reinit_exec_mechanism() call below):
> +      */
> +      lex->unit.cleanup();

Double call to unit.cleanup().

Do you need to check for thd->derived_tables?

> +
> +      for (SELECT_LEX *sl= lex->all_selects_list;
> +          sl;
> +          sl= sl->next_select_in_list())
> +      {
> +        SELECT_LEX_UNIT *unit= sl->master_unit();
> +        unit->reinit_exec_mechanism(); // reset unit->prepared flags
> +        /*
> +          Reset 'clean' flag back to force normal execution of
> +          unit->cleanup() in Prepared_statement::cleanup_stmt()
> +          (call to lex->unit.cleanup() above sets this flag to TRUE).
> +        */
> +        unit->unclean();
> +      }
> +    }
> +

-- 
Thread
bzr commit into mysql-5.0-bugteam branch (gshchepa:2703) Bug#38499Gleb Shchepa9 Oct
  • Re: bzr commit into mysql-5.0-bugteam branch (gshchepa:2703) Bug#38499Konstantin Osipov9 Oct