maria-developers team mailing list archive
Mailing list archive
Re: problem with partitioning and our storage engine in 5.2
Zardosht Kasheff <zardosht@xxxxxxxxx> writes:
> What I do not understand is this. Why does the following code at line
> 4734 of ha_partition.cc (at the bottom of this message) simply assume
> that if file->stats.records is 0, that it can blindly return
> HA_ERR_END_OF_FILE? I understand if file->ha_table_flags exposes
> HA_STATS_RECORDS_IS_EXACT, that it can do this, but that is not
> checked here.
The number of records in the table.
0 - means the table has exactly 0 rows
other - if (table_flags() & HA_STATS_RECORDS_IS_EXACT)
the value is the exact number of records in the table
it is an estimate
So 0 is special, and must not be given as an estimate, according to this
comment (which is also in MySQL 5.1).