← Back to team overview

maria-developers team mailing list archive

Re: A serious merge bug in 5.3.

 

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


References