List:Commits« Previous MessageNext Message »
From:Øystein Grøvlen Date:April 21 2010 8:21am
Subject:Re: bzr commit into mysql-6.0-codebase-bugfixing branch
(roy.lyseng:3790) WL#5266
View as plain text  
Roy Lyseng wrote:
 > Hi Øystein,
 >
 > thanks for reviewing.

Your suggested changes and explanations looks good to me. I have only
one comment, see below.

--
Øystein

 >
 > Øystein Grøvlen wrote:

...

 >>  > -bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect
 >> *subq_pred)
 >>  > +bool convert_subquery_to_semijoin(JOIN *parent_join,
 >>  > +                                  Item_exists_subselect *subq_pred)
 >>  >  {
 >>  >    SELECT_LEX *parent_lex= parent_join->select_lex;
 >>  >    TABLE_LIST *emb_tbl_nest= NULL;
 >>  >    List<TABLE_LIST> *emb_join_list=
&parent_lex->top_join_list;
 >>  >    THD *thd= parent_join->thd;
 >>  > -  DBUG_ENTER("convert_subq_to_sj");
 >>  > +  DBUG_ENTER("convert_subquery_to_semijoin");
 >>  >
 >>  > +  // Shorthand pointer used for IN subqueries
 >>  > +  Item_in_subselect *in_subq_pred =
 >>  > +      subq_pred->substype() == Item_subselect::IN_SUBS ?
 >>  > +                                  (Item_in_subselect *)subq_pred :
 >>  > +                                  NULL;
 >>
 >> Do you really need this pointer outside the if-block for
 >> IN-equalities?
 >
 > It is needed quite a few places.

Yes, but are not all those places are within the block of
   if (subq_pred->substype() == Item_subselect::IN_SUBS)

If so, the pointer could be declared within that block and
unconditionally be initialized to the down-casted subq_pred pointer.
Thread
bzr commit into mysql-6.0-codebase-bugfixing branch (roy.lyseng:3790) WL#5266Roy Lyseng5 Mar
  • Re: bzr commit into mysql-6.0-codebase-bugfixing branch(roy.lyseng:3790) WL#5266Jørgen Løland10 Mar
    • Re: bzr commit into mysql-6.0-codebase-bugfixing branch(roy.lyseng:3790) WL#5266Roy Lyseng19 Apr
  • Re: bzr commit into mysql-6.0-codebase-bugfixing branch(roy.lyseng:3790) WL#5266Øystein Grøvlen15 Apr
    • Re: bzr commit into mysql-6.0-codebase-bugfixing branch(roy.lyseng:3790) WL#5266Øystein Grøvlen15 Apr
    • Re: bzr commit into mysql-6.0-codebase-bugfixing branch(roy.lyseng:3790) WL#5266Roy Lyseng19 Apr
      • Re: bzr commit into mysql-6.0-codebase-bugfixing branch(roy.lyseng:3790) WL#5266Øystein Grøvlen21 Apr
        • Re: bzr commit into mysql-6.0-codebase-bugfixing branch(roy.lyseng:3790) WL#5266Roy Lyseng21 Apr
  • Re: bzr commit into mysql-6.0-codebase-bugfixing branch(roy.lyseng:3790) WL#5266Evgeny Potemkin16 Apr
    • Re: bzr commit into mysql-6.0-codebase-bugfixing branch(roy.lyseng:3790) WL#5266Roy Lyseng20 Apr