MySQL 8.0.39
Source Code Documentation
TableStatsRecord Class Reference

Represent the record of innodb_table_stats table. More...

#include <dict0stats.h>

Public Member Functions

 TableStatsRecord ()
 Constructor. More...
 
 ~TableStatsRecord ()
 Destructor. More...
 
void set_data (const byte *data, ulint col_offset, ulint len)
 Set the data for the innodb_table_stats record. More...
 
char * get_tbl_name () const
 Get the table name from innodb_table_stats record. More...
 
void set_tbl_name (const byte *data, ulint len)
 Set the table name for the innodb_table_stats record. More...
 
char * get_db_name () const
 Get the db name from the innodb_table_stats record. More...
 
void set_db_name (const byte *data, ulint len)
 Set the db name for the innodb_table_stats record. More...
 
uint64_t get_n_rows () const
 Get the n_rows from the innodb_table_stats record. More...
 
void set_n_rows (uint64_t no_of_rows)
 Set the n_rows for the innodb_table_stats record. More...
 
ulint get_clustered_index_size () const
 Get the clustered index size from innodb_table_stats record. More...
 
void set_clustered_index_size (ulint clust_size)
 Set the clustered index size for the innodb_table_stats record. More...
 
ulint get_sum_of_other_index_size () const
 Get the sum of other index size. More...
 
void set_sum_of_other_index_size (ulint sum_of_other_index_size)
 Set the sum of sec index size. More...
 

Static Public Attributes

static constexpr unsigned DB_NAME_COL_NO = 0
 Column number of innodb_table_stats.database_name. More...
 
static constexpr unsigned TABLE_NAME_COL_NO = 1
 Column number of innodb_table_stats.table_name. More...
 
static constexpr unsigned N_ROWS_COL_NO = 3
 Column number of innodb_table_stats.n_rows. More...
 
static constexpr unsigned CLUST_INDEX_SIZE_COL_NO = 4
 Column number of innodb_table_stats.clustered_index_size. More...
 
static constexpr unsigned SUM_OF_OTHER_INDEX_SIZE_COL_NO = 5
 Column number of innodb_table_stats.sum_of_other_index_sizes. More...
 

Private Attributes

char * m_db_name
 Database name. More...
 
char * m_tbl_name
 Table name. More...
 
uint64_t m_n_rows
 Number of rows. More...
 
ulint m_clustered_index_size
 Clustered index size. More...
 
ulint m_sum_of_other_index_sizes
 Sum of other index size. More...
 
mem_heap_tm_heap
 Heap to store db_name, tbl_name for the record. More...
 

Detailed Description

Represent the record of innodb_table_stats table.

Constructor & Destructor Documentation

◆ TableStatsRecord()

TableStatsRecord::TableStatsRecord ( )

Constructor.

◆ ~TableStatsRecord()

TableStatsRecord::~TableStatsRecord ( )

Destructor.

Member Function Documentation

◆ get_clustered_index_size()

ulint TableStatsRecord::get_clustered_index_size ( ) const

Get the clustered index size from innodb_table_stats record.

Return values
sizeof the clustered index.

◆ get_db_name()

char * TableStatsRecord::get_db_name ( ) const

Get the db name from the innodb_table_stats record.

Return values
dbname of the table stats record.

◆ get_n_rows()

uint64_t TableStatsRecord::get_n_rows ( ) const

Get the n_rows from the innodb_table_stats record.

Return values
n_rowsfrom the record.

◆ get_sum_of_other_index_size()

ulint TableStatsRecord::get_sum_of_other_index_size ( ) const

Get the sum of other index size.

Return values
sumof secondary index size.

◆ get_tbl_name()

char * TableStatsRecord::get_tbl_name ( ) const

Get the table name from innodb_table_stats record.

Return values
tablename of the table_stats record.

◆ set_clustered_index_size()

void TableStatsRecord::set_clustered_index_size ( ulint  clust_size)

Set the clustered index size for the innodb_table_stats record.

Parameters
[in]clust_sizeclustered index size.

◆ set_data()

void TableStatsRecord::set_data ( const byte data,
ulint  col_offset,
ulint  len 
)

Set the data for the innodb_table_stats record.

Parameters
[in]datadata to be set in the record
[in]col_offsetcolumn offset
[in]lenlength of the data.

◆ set_db_name()

void TableStatsRecord::set_db_name ( const byte data,
ulint  len 
)

Set the db name for the innodb_table_stats record.

Parameters
[in]datadata to be set
[in]lenlength of the data.

◆ set_n_rows()

void TableStatsRecord::set_n_rows ( uint64_t  no_of_rows)

Set the n_rows for the innodb_table_stats record.

Parameters
[in]no_of_rowsnumber of rows.

◆ set_sum_of_other_index_size()

void TableStatsRecord::set_sum_of_other_index_size ( ulint  sum_of_other_index_size)

Set the sum of sec index size.

Parameters
[in]sum_of_other_index_sizesum of secondary index size.

◆ set_tbl_name()

void TableStatsRecord::set_tbl_name ( const byte data,
ulint  len 
)

Set the table name for the innodb_table_stats record.

Parameters
[in]datadata to be set in the record
[in]lenlength of the data.

Member Data Documentation

◆ CLUST_INDEX_SIZE_COL_NO

constexpr unsigned TableStatsRecord::CLUST_INDEX_SIZE_COL_NO = 4
staticconstexpr

Column number of innodb_table_stats.clustered_index_size.

◆ DB_NAME_COL_NO

constexpr unsigned TableStatsRecord::DB_NAME_COL_NO = 0
staticconstexpr

Column number of innodb_table_stats.database_name.

◆ m_clustered_index_size

ulint TableStatsRecord::m_clustered_index_size
private

Clustered index size.

◆ m_db_name

char* TableStatsRecord::m_db_name
private

Database name.

◆ m_heap

mem_heap_t* TableStatsRecord::m_heap
private

Heap to store db_name, tbl_name for the record.

◆ m_n_rows

uint64_t TableStatsRecord::m_n_rows
private

Number of rows.

◆ m_sum_of_other_index_sizes

ulint TableStatsRecord::m_sum_of_other_index_sizes
private

Sum of other index size.

◆ m_tbl_name

char* TableStatsRecord::m_tbl_name
private

Table name.

◆ N_ROWS_COL_NO

constexpr unsigned TableStatsRecord::N_ROWS_COL_NO = 3
staticconstexpr

Column number of innodb_table_stats.n_rows.

◆ SUM_OF_OTHER_INDEX_SIZE_COL_NO

constexpr unsigned TableStatsRecord::SUM_OF_OTHER_INDEX_SIZE_COL_NO = 5
staticconstexpr

Column number of innodb_table_stats.sum_of_other_index_sizes.

◆ TABLE_NAME_COL_NO

constexpr unsigned TableStatsRecord::TABLE_NAME_COL_NO = 1
staticconstexpr

Column number of innodb_table_stats.table_name.


The documentation for this class was generated from the following files: