Hello,
Jorgen Loland a écrit, Le 20.06.2011 12:47:
> Hi Guilhem,
>
> The patch is approved but see suggestion inline.
>
> On 06/17/2011 02:46 PM, Guilhem Bichot wrote:
>> 4) In testcase of BUG#12619868, we had two wrong extra rows
>> "NULL,4" and "NULL,8".
>> - 1 SIMPLE alias2 index NULL col_int_key
>> 4 NULL 15
>> - 1 SIMPLE alias2 ALL NULL NULL NULL
>> NULL 16 Using temporary; Using filesort
>
> + on the first line?
should have - on first SIMPLE line and + on second SIMPLE line.
>> Before the bufxig: as earlier, JOIN::sort_by_table is NULL,
>> because when
>
> bugfix
fixed
>
>> === modified file 'sql/sql_select.cc'
>> --- a/sql/sql_select.cc 2011-06-11 13:38:32 +0000
>> +++ b/sql/sql_select.cc 2011-06-17 12:45:22 +0000
>> @@ -2328,24 +2327,26 @@ JOIN::optimize()
>> sort_and_group= 0;
>> }
>>
>> - // Can't use sort on head table if using join buffering
>> - if (full_join)
>> + select_opts_for_readinfo=
>> + (select_options& (SELECT_DESCRIBE | SELECT_NO_JOIN_CACHE)) |
>> + (select_lex->ftfunc_list->elements ? SELECT_NO_JOIN_CACHE : 0);
>> +
>
> Please move initialization of select_opts_for_readinfo immediately
> before you need it.
done
> You may also move it's declaration down here, but
> that's a question of preference.
Alas, we have a "goto" above, so gcc won't allow the move.