← Back to team overview

maria-developers team mailing list archive

Re: Probably in a bug in simple_pred()

 

Yes, will look.
On Thu, Jun 04, 2015 at 02:05:11PM +0400, Alexander Barkov wrote:
> Hi Sergey,
> 
> Will you have time to have a look into this please?
> 
> Thanks.
> 
> On 05/28/2015 10:19 PM, Alexander Barkov wrote:
> >Hi Sergey,
> >
> >did you have a chance to have a look into this?
> >
> >Thanks.
> >
> >
> >On 05/26/2015 09:39 AM, Alexander Barkov wrote:
> >>Hi Sergey,
> >>
> >>I probably found a bug in simple_pred() in opt_sum.cc.
> >>
> >>In this piece of code:
> >>
> >>>  case 3:
> >>>    /* field BETWEEN const AND const */
> >>>    item= func_item->arguments()[0]->real_item();
> >>>    if (item->type() == Item::FIELD_ITEM)
> >>>    {
> >>>      args[0]= item;
> >>>      for (int i= 1 ; i <= 2; i++)
> >>>      {
> >>>        item= func_item->arguments()[i]->real_item();
> >>>        if (!item->const_item())
> >>>          return 0;
> >>>        args[i]= item;
> >>>        if (check_item1_shorter_item2(args[0], args[1]))
> >>
> >>Should't it be
> >>
> >>if (check_item1_shorter_item2(args[0], args[i]))
> >>
> >>?
> >>
> >>>          return 0;
> >>>      }
> >>>    }
> >>
> >>If this is a bug, can you please help to make an SQL scrip which would
> >>be affected by this bug?
> >>
> >>Thanks.

-- 
BR
 Sergei
-- 
Sergei Petrunia, Software Developer
MariaDB Corporation | Skype: sergefp | Blog: http://s.petrunia.net/blog




References