List:Internals« Previous MessageNext Message »
From:Sergey Petrunya Date:January 15 2010 1:03pm
Subject:Re: suspicious arguments to one print_plan() call in the optimizer
View as plain text  
Hi,

On Tue, Jan 12, 2010 at 09:18:01PM +0200, Timour Katchaounov wrote:
>> best_extension_by_limited_search() in MySQL 5.1, is:
>>
>>   DBUG_EXECUTE("opt", print_plan(join, idx, read_time, record_count, idx,
>>                                  "SOFAR:"););
>>
>> This looks weird, because it seems to have swapped variables (local  
>> variable "record_count" is used for print_plan()'s parameter  
>> "read_time", and vice-versa). Another weirdness: it uses local variable 
>> "idx" (=join->const_tables in this case) for print_plan()'s parameter  
>> "current_read_time".
>> I wonder if this is really a correct call.
>>
> Looks inexplicable to me too. Running bzr gannotate sql_select.cc
> tells us that this line is by Sergey Petrunia, so it is worth
> asking him. His on the CC.

I've looked and see no reason for the call to have this form. The call
parameters seem to be in error.

BR
 Sergey
-- 
Sergey Petrunia, Software Developer
Monty Program AB, http://askmonty.org
Blog: http://s.petrunia.net/blog
Thread
suspicious arguments to one print_plan() call in the optimizerGuilhem Bichot12 Jan
  • Re: suspicious arguments to one print_plan() call in the optimizerTimour Katchaounov12 Jan
    • Re: suspicious arguments to one print_plan() call in the optimizerSergey Petrunya15 Jan
      • Re: suspicious arguments to one print_plan() call in the optimizerGuilhem Bichot15 Jan