summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2009-01-07 23:30:10 +0100
committerMattias Jonsson <mattias.jonsson@sun.com>2009-01-07 23:30:10 +0100
commit5b6829ac6eb2b7cca9946dd361a1b7b643579a37 (patch)
tree3e63a3ecd2b87fbd250eec1c83e776f01a323d4e /sql/ha_partition.cc
parentf1ab6323913dfc9173ff19c4f986619de2727ce6 (diff)
parent4effc0bc9a28ef7bd0065f22f6d8468e70ab4aaf (diff)
downloadmariadb-git-5b6829ac6eb2b7cca9946dd361a1b7b643579a37.tar.gz
merge
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r--sql/ha_partition.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 9617b9941bc..0e36a868b3e 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -4815,7 +4815,7 @@ int ha_partition::info(uint flag)
/*
Calculates statistical variables
records: Estimate of number records in table
- We report sum (always at least 2)
+ We report sum (always at least 2 if not empty)
deleted: Estimate of number holes in the table due to
deletes
We report sum
@@ -4854,13 +4854,13 @@ int ha_partition::info(uint flag)
stats.check_time= file->stats.check_time;
}
} while (*(++file_array));
- if (stats.records < 2 &&
+ if (stats.records && stats.records < 2 &&
!(m_file[0]->ha_table_flags() & HA_STATS_RECORDS_IS_EXACT))
stats.records= 2;
if (stats.records > 0)
stats.mean_rec_length= (ulong) (stats.data_file_length / stats.records);
else
- stats.mean_rec_length= 1; //? What should we set here
+ stats.mean_rec_length= 0;
}
if (flag & HA_STATUS_CONST)
{