Hi, Igor!

On Apr 24, Igor Babaev wrote:
> On 04/24/2011 01:51 AM, Sergei Golubchik wrote:
> > In 5.3, record_count* is moved to a separate line, so it should just
> > be
> > 
> >   tmp= min(tmp,s->worst_seeks);
> > 
> > But it uses table->file->read_time(). Which is defined as
> > 
> >   virtual double read_time(uint index, uint ranges, ha_rows rows)
> >     { return rows2double(ranges+rows); }
> 
> In the implementation of innodb/xtradb (ha_innobase::read_time)
> if the parameter rows = 0 , the function returns 0 :(
> 
>       if (rows <= 2) {
> 
>               return((double) rows);
>       }
> 
> > so, when ranges=1 and we pass rows=min(tmp,s->worst_seeks)-1, we get
> > the same value of min(tmp,s->worst_seeks) as the result.

I agree that this -1 is a hack and that logically it should be removed.
But it may affect plans and fail quite a few test cases.

If it is ok - feel free to fix it and remove -1.

Regards,
Sergei

_______________________________________________
Mailing list: https://launchpad.net/~maria-developers
Post to     : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to