← Back to team overview

maria-developers team mailing list archive

Re: ha_innobase::info_low() n_rows hack

 

Hello!

On Mon, Sep 11, 2017 at 4:37 PM, Sergei Golubchik <serg@xxxxxxxxxxx> wrote:
> Hi, Aleksey!
>
> On Sep 11, Aleksey Midenkov wrote:
>> In ha_innobase::info_low() there is following dirty hack:
>>
>> if (n_rows == 0 && !(flag & HA_STATUS_TIME)) {
>>         n_rows++;
>> }
>>
>> It is very old (from 5.0 or earlier) and bug-prone. Because in
>> ha_innobase::open():
>>
>> info(HA_STATUS_NO_LOCK | HA_STATUS_VARIABLE | HA_STATUS_CONST);
>>
>> every opened empty table will be non-empty!
>
> Is that a problem?

Don't you find it at least misleading? ha_innobase::open() is
exclusive (process-wide) operation and it lies about non-empty table.


Follow ups

References