From: Roy Lyseng Date: April 11 2011 9:13am Subject: Re: bzr commit into mysql-trunk branch (roy.lyseng:3358) Bug#11822517 List-Archive: http://lists.mysql.com/commits/135168 Message-Id: <4DA2C62A.6050900@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit On 11.04.11 10.05, Øystein Grøvlen wrote: >>> > + static uint determine_search_depth(JOIN* join, uint search_depth); >>> >>> I assume this is static in order to be able to call it from the >>> initialization list. I think I would prefer, making this a non-static >>> member function, remove the join parameter, and moving the >>> initialization to the body of the constructor. >> >> It means that search_depth will no longer be const in the class. Is that >> Ok? > > Good point. > It is OK with me, but I will leave it to you to decide. I think I keep it static. Copying it to the new class becomes pretty meaningless if it is modifiable, in particular when we have the argument current_search_depth supplied to the member functions as well. I made the determine_search_depth() function independent of join, btw, by adding table_count as argument. >>> > + DBUG_ASSERT((join_tables& join->const_table_map) == 0); >>> >>> I do not think this assert is meaningful. Given the assignement >>> above, it should always be true. >> >> It will become meaningful when the second patch is added ;) > > I think that means that the assert really belongs to the second patch. Of course :) Thanks, Roy