List:Commits« Previous MessageNext Message »
From:Jorgen Loland Date:December 16 2010 9:26am
Subject:Re: bzr commit into mysql-trunk-bugfixing branch (jorgen.loland:3427)
Bug#58456
View as plain text  
On 12/15/2010 05:59 PM, Evgeny Potemkin wrote:
> Hi Jorgen,
>
> The fix is good, but should be slightly adjusted, IMO. Please see the
> explanation below.
>
> Regards, Evgen.
>
> On 12/08/10 12:58, Jorgen Loland wrote:
>> === modified file 'sql/sql_select.cc'
>> --- a/sql/sql_select.cc 2010-12-06 13:12:51 +0000
>> +++ b/sql/sql_select.cc 2010-12-08 09:58:55 +0000
>> @@ -9653,8 +9653,8 @@ static bool make_join_select(JOIN *join,
>> /* Use quick key read if it's a constant and it's not used
>> with key reading */
>> if (tab->needed_reg.is_clear_all()&& tab->type != JT_EQ_REF
>> - && tab->type != JT_FT&& (tab->type != JT_REF ||
>> - (uint) tab->ref.key == tab->quick->index))
>> + && tab->type != JT_FT&& tab->type != JT_CONST&&
>> + (tab->type != JT_REF || (uint)tab->ref.key == tab->quick->index))
> Originally the chosen AM was REF and REF is actually allowed to use
> tab->quick under some circumstances.
> Same should be applied to CONST.

Are you suggesting that I change

tab->type != JT_CONST
to
(tab->type != JT_CONST || (uint)tab->ref.key == tab->quick->index)
?

-- 
Jørgen Løland | Senior Software Engineer | +47 73842138
Oracle MySQL
Trondheim, Norway
Thread
bzr commit into mysql-trunk-bugfixing branch (jorgen.loland:3427) Bug#58456Jorgen Loland8 Dec
  • Re: bzr commit into mysql-trunk-bugfixing branch (jorgen.loland:3427)Bug#58456Olav Sandstaa8 Dec
  • Re: bzr commit into mysql-trunk-bugfixing branch (jorgen.loland:3427)Bug#58456Evgeny Potemkin15 Dec
    • Re: bzr commit into mysql-trunk-bugfixing branch (jorgen.loland:3427)Bug#58456Jorgen Loland16 Dec