MySQL 8.4.2
Source Code Documentation
HA_CREATE_INFO Struct Reference

Struct to hold information about the table that should be created. More...

#include <handler.h>

Public Member Functions

void init_create_options_from_share (const TABLE_SHARE *share, uint64_t used_fields)
 Fill HA_CREATE_INFO to be used by ALTER as well as upgrade code. More...
 

Public Attributes

const CHARSET_INFOtable_charset {nullptr}
 
const CHARSET_INFOdefault_table_charset {nullptr}
 
bool schema_read_only {false}
 
LEX_STRING connect_string {nullptr, 0}
 
const char * password {nullptr}
 
const char * tablespace {nullptr}
 
LEX_STRING comment {nullptr, 0}
 
LEX_STRING compress {nullptr, 0}
 Algorithm (and possible options) to be used for InnoDB's transparent page compression. More...
 
LEX_STRING encrypt_type {nullptr, 0}
 This attribute is used for InnoDB's transparent page encryption. More...
 
LEX_CSTRING secondary_engine {nullptr, 0}
 Secondary engine of the table. More...
 
bool secondary_load {false}
 Secondary engine load status. More...
 
const char * data_file_name {nullptr}
 
const char * index_file_name {nullptr}
 
const char * alias {nullptr}
 
ulonglong max_rows {0}
 
ulonglong min_rows {0}
 
ulonglong auto_increment_value {0}
 
ulong table_options {0}
 
ulong avg_row_length {0}
 
uint64_t used_fields {0}
 
std::uint32_t key_block_size {0}
 
uint stats_sample_pages {0}
 
enum_stats_auto_recalc stats_auto_recalc {HA_STATS_AUTO_RECALC_DEFAULT}
 
SQL_I_List< Table_refmerge_list
 
handlertondb_type {nullptr}
 
enum row_type row_type = ROW_TYPE_DEFAULT
 Row type of the table definition. More...
 
uint null_bits {0}
 
uint options {0}
 
uint merge_insert_method {0}
 
ha_storage_media storage_media {HA_SM_DEFAULT}
 
bool m_hidden {false}
 
bool m_transactional_ddl {false}
 
LEX_CSTRING engine_attribute = NULL_CSTR
 
LEX_CSTRING secondary_engine_attribute = NULL_CSTR
 
ulonglong m_implicit_tablespace_autoextend_size {0}
 
bool m_implicit_tablespace_autoextend_size_change {true}
 

Detailed Description

Struct to hold information about the table that should be created.

Member Function Documentation

◆ init_create_options_from_share()

void HA_CREATE_INFO::init_create_options_from_share ( const TABLE_SHARE share,
uint64_t  used_fields 
)

Fill HA_CREATE_INFO to be used by ALTER as well as upgrade code.

This function separates code from mysql_prepare_alter_table() to be used by upgrade code as well to reduce code duplication. For ALTER code path, this lets new create options override the old ones.

Parameters
[in]shareTABLE_SHARE object
[in]used_fieldsIf a given create option is not flagged, old value be copied from the TABLE_SHARE.

Member Data Documentation

◆ alias

const char* HA_CREATE_INFO::alias {nullptr}

◆ auto_increment_value

ulonglong HA_CREATE_INFO::auto_increment_value {0}

◆ avg_row_length

ulong HA_CREATE_INFO::avg_row_length {0}

◆ comment

LEX_STRING HA_CREATE_INFO::comment {nullptr, 0}

◆ compress

LEX_STRING HA_CREATE_INFO::compress {nullptr, 0}

Algorithm (and possible options) to be used for InnoDB's transparent page compression.

If this attribute is set then it is hint to the storage engine to try and compress the data using the specified algorithm where possible. Note: this value is interpreted by the storage engine only. and ignored by the Server layer.

◆ connect_string

LEX_STRING HA_CREATE_INFO::connect_string {nullptr, 0}

◆ data_file_name

const char* HA_CREATE_INFO::data_file_name {nullptr}

◆ db_type

handlerton* HA_CREATE_INFO::db_type {nullptr}

◆ default_table_charset

const CHARSET_INFO* HA_CREATE_INFO::default_table_charset {nullptr}

◆ encrypt_type

LEX_STRING HA_CREATE_INFO::encrypt_type {nullptr, 0}

This attribute is used for InnoDB's transparent page encryption.

If this attribute is set then it is hint to the storage engine to encrypt the data. Note: this value is interpreted by the storage engine only. and ignored by the Server layer.

◆ engine_attribute

LEX_CSTRING HA_CREATE_INFO::engine_attribute = NULL_CSTR

◆ index_file_name

const char* HA_CREATE_INFO::index_file_name {nullptr}

◆ key_block_size

std::uint32_t HA_CREATE_INFO::key_block_size {0}

◆ m_hidden

bool HA_CREATE_INFO::m_hidden {false}

◆ m_implicit_tablespace_autoextend_size

ulonglong HA_CREATE_INFO::m_implicit_tablespace_autoextend_size {0}

◆ m_implicit_tablespace_autoextend_size_change

bool HA_CREATE_INFO::m_implicit_tablespace_autoextend_size_change {true}

◆ m_transactional_ddl

bool HA_CREATE_INFO::m_transactional_ddl {false}

◆ max_rows

ulonglong HA_CREATE_INFO::max_rows {0}

◆ merge_insert_method

uint HA_CREATE_INFO::merge_insert_method {0}

◆ merge_list

SQL_I_List<Table_ref> HA_CREATE_INFO::merge_list

◆ min_rows

ulonglong HA_CREATE_INFO::min_rows {0}

◆ null_bits

uint HA_CREATE_INFO::null_bits {0}

◆ options

uint HA_CREATE_INFO::options {0}

◆ password

const char* HA_CREATE_INFO::password {nullptr}

◆ row_type

enum row_type HA_CREATE_INFO::row_type = ROW_TYPE_DEFAULT

Row type of the table definition.

Defaults to ROW_TYPE_DEFAULT for all non-ALTER statements. For ALTER TABLE defaults to ROW_TYPE_NOT_USED (means "keep the current").

Can be changed either explicitly by the parser. If nothing specified inherits the value of the original table (if present).

◆ schema_read_only

bool HA_CREATE_INFO::schema_read_only {false}

◆ secondary_engine

LEX_CSTRING HA_CREATE_INFO::secondary_engine {nullptr, 0}

Secondary engine of the table.

Is nullptr if no secondary engine defined.

◆ secondary_engine_attribute

LEX_CSTRING HA_CREATE_INFO::secondary_engine_attribute = NULL_CSTR

◆ secondary_load

bool HA_CREATE_INFO::secondary_load {false}

Secondary engine load status.

◆ stats_auto_recalc

enum_stats_auto_recalc HA_CREATE_INFO::stats_auto_recalc {HA_STATS_AUTO_RECALC_DEFAULT}

◆ stats_sample_pages

uint HA_CREATE_INFO::stats_sample_pages {0}

◆ storage_media

ha_storage_media HA_CREATE_INFO::storage_media {HA_SM_DEFAULT}

◆ table_charset

const CHARSET_INFO* HA_CREATE_INFO::table_charset {nullptr}

◆ table_options

ulong HA_CREATE_INFO::table_options {0}

◆ tablespace

const char* HA_CREATE_INFO::tablespace {nullptr}

◆ used_fields

uint64_t HA_CREATE_INFO::used_fields {0}

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