From: Roy Lyseng Date: January 21 2011 4:03pm Subject: Re: bzr commit into mysql-trunk branch (tor.didriksen:3328) List-Archive: http://lists.mysql.com/commits/129355 Message-Id: <4D39AE41.6000504@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Thank you for the odd-looking review. On 21.01.11 13.59, Tor Didriksen wrote: > #At file:///export/home/didrik/repo/next-mr-opt-backporting-bug57431/ based on revid:tor.didriksen@stripped > > 3328 Tor Didriksen 2011-01-21 > review comments > > modified: > sql/sql_select.cc > === modified file 'sql/sql_select.cc' > --- a/sql/sql_select.cc 2011-01-21 12:53:09 +0000 > +++ b/sql/sql_select.cc 2011-01-21 12:59:00 +0000 > @@ -17094,13 +17094,16 @@ sub_select_sjm(JOIN *join, JOIN_TAB *joi > { > /* Do full scan of the materialized table */ > JOIN_TAB *last_tab= join_tab + (sjm->table_count - 1); > - > - > Item *save_cond= last_tab->select_cond; > st_join_table *save_last_inner= last_tab->last_inner; > + > + // Why are we overwriting information in last_tab here? I am adding a comment in next commit. > last_tab->set_select_cond(sjm->join_cond, __LINE__); > last_tab->last_inner= NULL; > + > rc= sub_select(join, last_tab, end_of_records); > + > + // And why do we need to restore previous information? Because I wanted a minimal impact patch. However, there seems to be no good reason for doing this, so I am removing the restoration code, and moving the clearing to the init section. > last_tab->set_select_cond(save_cond, __LINE__); > last_tab->last_inner= save_last_inner; > DBUG_RETURN(rc); Regards, Roy