summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@oracle.com>2011-08-08 12:16:15 +0300
committerMarko Mäkelä <marko.makela@oracle.com>2011-08-08 12:16:15 +0300
commit5962cadcfae4f8b7842578ab308798a9b5295a32 (patch)
treed78eba66adb714bd61ca52a2d75bb3f5dcaff230 /storage
parent34a71efca71845e626d9e1712fe0aadb9ef27110 (diff)
parent6f8a80270c4f1004bfbe9bdb9e5fbce8f0e03981 (diff)
downloadmariadb-git-5962cadcfae4f8b7842578ab308798a9b5295a32.tar.gz
Merge mysql-5.1 to mysql-5.5.
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/handler/ha_innodb.cc19
1 files changed, 13 insertions, 6 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index aaff354c89d..f8e96d5fa60 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -7898,6 +7898,8 @@ ha_innobase::info_low(
if (flag & HA_STATUS_VARIABLE) {
+ ulint page_size;
+
dict_table_stats_lock(ib_table, RW_S_LATCH);
n_rows = ib_table->stat_n_rows;
@@ -7940,14 +7942,19 @@ ha_innobase::info_low(
prebuilt->autoinc_last_value = 0;
}
+ page_size = dict_table_zip_size(ib_table);
+ if (page_size == 0) {
+ page_size = UNIV_PAGE_SIZE;
+ }
+
stats.records = (ha_rows)n_rows;
stats.deleted = 0;
- stats.data_file_length = ((ulonglong)
- ib_table->stat_clustered_index_size)
- * UNIV_PAGE_SIZE;
- stats.index_file_length = ((ulonglong)
- ib_table->stat_sum_of_other_index_sizes)
- * UNIV_PAGE_SIZE;
+ stats.data_file_length
+ = ((ulonglong) ib_table->stat_clustered_index_size)
+ * page_size;
+ stats.index_file_length =
+ ((ulonglong) ib_table->stat_sum_of_other_index_sizes)
+ * page_size;
dict_table_stats_unlock(ib_table, RW_S_LATCH);