List:Commits« Previous MessageNext Message »
From:Øystein Grøvlen Date:June 8 2011 7:23am
Subject:Re: bzr commit into mysql-trunk branch (roy.lyseng:3379) Bug#12316645
View as plain text  
Hi,

Approved.
I have one nit-pick:  While I generally agree that the ? operator might 
make assignments clearer than if statements, I do not think this is 
particularly readable:

> +    /*
> +      Cannot use join buffering if either
> +       1. Join buffering is disabled by the user, or
> +       2. Outer joined table, and join buffering disabled for outer join, or
> +       3. Semi-joined table, and join buffering disabled for semi-join, or
> +       4. Unlinked cache is forced and there are multiple inner tables of
> +          this outer join.
> +    */
> +    tab->use_join_cache=
> +       (thd->variables.optimizer_join_cache_level == 0 ||              // 1
> +        ((tab->table->map&  join->outer_join)&&                
>        // 2
> +         thd->variables.optimizer_join_cache_level<= 2) ||            // 2
> +        (tab->emb_sj_nest != NULL&&                                    //
> 3
> +         thd->variables.optimizer_join_cache_level<= 2) ||            // 3
> +        (force_unlinked_cache&&                                        // 4
> +         tl->in_outer_join_nest()&&                                    //
> 4
> +         tl->embedding->nested_join->join_list.elements>  1)) ?       
> // 4
> +      JOIN_CACHE::ALG_NONE :  // Indicates that join buffering cannot be used
> +      JOIN_CACHE::ALG_BNL | JOIN_CACHE::ALG_BKA | JOIN_CACHE::ALG_BKA_UNIQUE;

When if-statements are that complex this becomes a bit difficult to 
read, IMHO.

Also, I urge you to in some way document the deficiencies in the cost 
model that we discussed in relation to this bug.

--
Øystein
Thread
bzr commit into mysql-trunk branch (roy.lyseng:3379) Bug#12316645Roy Lyseng7 Jun
  • Re: bzr commit into mysql-trunk branch (roy.lyseng:3379) Bug#12316645Øystein Grøvlen8 Jun
    • Re: bzr commit into mysql-trunk branch (roy.lyseng:3379) Bug#12316645Roy Lyseng8 Jun