diff options
author | Mattias Jonsson <mattiasj@mysql.com> | 2008-07-07 22:42:19 +0200 |
---|---|---|
committer | Mattias Jonsson <mattiasj@mysql.com> | 2008-07-07 22:42:19 +0200 |
commit | d11d5cfca87f25cad0f5b0af90616afe9290dece (patch) | |
tree | e1224dcd11282eb716f4192d492e0370811a9c4e /sql/ha_partition.h | |
parent | 50853ac31a5f158d02c986a9eec5144cf20d00b9 (diff) | |
download | mariadb-git-d11d5cfca87f25cad0f5b0af90616afe9290dece.tar.gz |
Bug#35745: SELECT COUNT(*) is not correct for some partitioned tables.
problem was that ha_partition::records was not implemented, thus
using the default handler::records, which is not correct if the engine
does not support HA_STATS_RECORDS_IS_EXACT.
Solution was to implement ha_partition::records as a wrapper around
the underlying partitions records.
The rows column in explain partitions will now include the total
number of records in the partitioned table.
(recommit after removing out-commented code)
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r-- | sql/ha_partition.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h index ac00581fae0..2ec700978bc 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -531,6 +531,7 @@ public: underlying handlers must have the same implementation for it to work. */ virtual uint8 table_cache_type(); + virtual ha_rows records(); /* ------------------------------------------------------------------------- |