On 04/11/11 11:13 AM, Roy Lyseng wrote:
> On 11.04.11 10.05, Øystein Grøvlen wrote:
>>>> > + static uint determine_search_depth(JOIN* join, uint
>>>> 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
>> 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 :)