00001 /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- 00002 * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: 00003 * 00004 * Copyright (C) 2008 Sun Microsystems, Inc. 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; version 2 of the License. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00018 */ 00019 00020 #pragma once 00021 00022 #include <drizzled/base.h> 00023 #include <time.h> 00024 00025 namespace drizzled 00026 { 00027 00028 class ha_statistics 00029 { 00030 public: 00031 uint64_t data_file_length; /* Length off data file */ 00032 uint64_t max_data_file_length; /* Length off data file */ 00033 uint64_t index_file_length; 00034 uint64_t max_index_file_length; 00035 uint64_t delete_length; /* Free bytes */ 00036 uint64_t auto_increment_value; 00037 /* 00038 The number of records in the table. 00039 0 - means the table has exactly 0 rows 00040 other - if (table_flags() & HA_STATS_RECORDS_IS_EXACT) 00041 the value is the exact number of records in the table 00042 else 00043 it is an estimate 00044 */ 00045 ha_rows records; 00046 ha_rows deleted; /* Deleted records */ 00047 uint32_t mean_rec_length; /* physical reclength */ 00048 uint32_t block_size; /* index block size */ 00049 time_t create_time; /* When table was created */ 00050 time_t check_time; 00051 time_t update_time; 00052 00053 ha_statistics(): 00054 data_file_length(0), max_data_file_length(0), 00055 index_file_length(0), delete_length(0), auto_increment_value(0), 00056 records(0), deleted(0), mean_rec_length(0), block_size(0), 00057 create_time(0), check_time(0), update_time(0) 00058 {} 00059 }; 00060 00061 } /* namespace drizzled */ 00062