diff options
author | Konstantin Osipov <kostja@sun.com> | 2009-12-16 11:33:54 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2009-12-16 11:33:54 +0300 |
commit | 980e8b413e89175d8fc7f867415712589bead9ff (patch) | |
tree | 765dbf44bc16c28e3d63a3439bed89b86e4b92fc /storage | |
parent | d1dfce06b254548e108deabfe8a7e6b759984d5d (diff) | |
parent | 376cf4275f28f6b8167eaf19b2c66dee41fbc5c5 (diff) | |
download | mariadb-git-980e8b413e89175d8fc7f867415712589bead9ff.tar.gz |
Merge next-mr -> next-4284.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/archive/ha_archive.cc | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc index 2ff4a5daff5..30528b538d6 100644 --- a/storage/archive/ha_archive.cc +++ b/storage/archive/ha_archive.cc @@ -1521,21 +1521,29 @@ int ha_archive::info(uint flag) DBUG_PRINT("ha_archive", ("Stats rows is %d\n", (int)stats.records)); /* Costs quite a bit more to get all information */ - if (flag & HA_STATUS_TIME) + if (flag & (HA_STATUS_TIME | HA_STATUS_CONST | HA_STATUS_VARIABLE)) { MY_STAT file_stat; // Stat information for the data file (void) my_stat(share->data_file_name, &file_stat, MYF(MY_WME)); - stats.data_file_length= file_stat.st_size; - stats.create_time= (ulong) file_stat.st_ctime; - stats.update_time= (ulong) file_stat.st_mtime; - stats.mean_rec_length= stats.records ? - stats.data_file_length / stats.records : table->s->reclength; - stats.max_data_file_length= MAX_FILE_SIZE; + if (flag & HA_STATUS_TIME) + stats.update_time= (ulong) file_stat.st_mtime; + if (flag & HA_STATUS_CONST) + { + stats.max_data_file_length= share->rows_recorded * stats.mean_rec_length; + stats.max_data_file_length= MAX_FILE_SIZE; + stats.create_time= (ulong) file_stat.st_ctime; + } + if (flag & HA_STATUS_VARIABLE) + { + stats.delete_length= 0; + stats.data_file_length= file_stat.st_size; + stats.index_file_length=0; + stats.mean_rec_length= stats.records ? + stats.data_file_length / stats.records : table->s->reclength; + } } - stats.delete_length= 0; - stats.index_file_length=0; if (flag & HA_STATUS_AUTO) { |