MySQL  8.0.18
Source Code Documentation
handlerton Struct Reference

handlerton is a singleton structure - one instance per storage engine - to provide access to storage engine functionality that works on the "global" level (unlike handler class that works on a per-table basis). More...

#include <handler.h>

Public Attributes

SHOW_COMP_OPTION state
 Historical marker for if the engine is available or not. More...
 
enum legacy_db_type db_type
 Historical number used for frm file to determine the correct storage engine. More...
 
uint slot
 Each storage engine has it's own memory area (actually a pointer) in the thd, for storing per-connection information. More...
 
uint savepoint_offset
 To store per-savepoint data storage engine is provided with an area of a requested size (0 is ok here). More...
 
close_connection_t close_connection
 
kill_connection_t kill_connection
 
pre_dd_shutdown_t pre_dd_shutdown
 
savepoint_set_t savepoint_set
 
savepoint_rollback_t savepoint_rollback
 
savepoint_rollback_can_release_mdl_t savepoint_rollback_can_release_mdl
 
savepoint_release_t savepoint_release
 
commit_t commit
 
rollback_t rollback
 
prepare_t prepare
 
recover_t recover
 
commit_by_xid_t commit_by_xid
 
rollback_by_xid_t rollback_by_xid
 
create_t create
 
drop_database_t drop_database
 
panic_t panic
 
start_consistent_snapshot_t start_consistent_snapshot
 
flush_logs_t flush_logs
 
show_status_t show_status
 
partition_flags_t partition_flags
 
is_valid_tablespace_name_t is_valid_tablespace_name
 
get_tablespace_t get_tablespace
 
alter_tablespace_t alter_tablespace
 
get_tablespace_filename_ext_t get_tablespace_filename_ext
 
upgrade_tablespace_t upgrade_tablespace
 
upgrade_space_version_t upgrade_space_version
 
get_tablespace_type_t get_tablespace_type
 
get_tablespace_type_by_name_t get_tablespace_type_by_name
 
upgrade_logs_t upgrade_logs
 
finish_upgrade_t finish_upgrade
 
fill_is_table_t fill_is_table
 
dict_init_t dict_init
 
ddse_dict_init_t ddse_dict_init
 
dict_register_dd_table_id_t dict_register_dd_table_id
 
dict_cache_reset_t dict_cache_reset
 
dict_cache_reset_tables_and_tablespaces_t dict_cache_reset_tables_and_tablespaces
 
dict_recover_t dict_recover
 
dict_get_server_version_t dict_get_server_version
 
dict_set_server_version_t dict_set_server_version
 
is_reserved_db_name_t is_reserved_db_name
 
uint32 flags
 Global handler flags. More...
 
binlog_func_t binlog_func
 
binlog_log_query_t binlog_log_query
 
acl_notify_t acl_notify
 
discover_t discover
 
find_files_t find_files
 
table_exists_in_engine_t table_exists_in_engine
 
make_pushed_join_t make_pushed_join
 
is_supported_system_table_t is_supported_system_table
 
sdi_create_t sdi_create
 
sdi_drop_t sdi_drop
 
sdi_get_keys_t sdi_get_keys
 
sdi_get_t sdi_get
 
sdi_set_t sdi_set
 
sdi_delete_t sdi_delete
 
const char ** file_extensions
 Null-ended array of file extentions that exist for the storage engine. More...
 
is_dict_readonly_t is_dict_readonly
 
rm_tmp_tables_t rm_tmp_tables
 
get_cost_constants_t get_cost_constants
 
replace_native_transaction_in_thd_t replace_native_transaction_in_thd
 
notify_exclusive_mdl_t notify_exclusive_mdl
 
notify_alter_table_t notify_alter_table
 
rotate_encryption_master_key_t rotate_encryption_master_key
 
get_table_statistics_t get_table_statistics
 
get_index_column_cardinality_t get_index_column_cardinality
 
get_tablespace_statistics_t get_tablespace_statistics
 
post_ddl_t post_ddl
 
post_recover_t post_recover
 
Clone_interface_t clone_interface
 Clone data transfer interfaces. More...
 
uint32 license
 Flag for Engine License. More...
 
void * data
 Location for engines to keep personal structures. More...
 
lock_hton_log_t lock_hton_log
 
unlock_hton_log_t unlock_hton_log
 
collect_hton_log_info_t collect_hton_log_info
 
uint32 foreign_keys_flags
 Flags describing details of foreign key support by storage engine. More...
 
check_fk_column_compat_t check_fk_column_compat
 
LEX_CSTRING fk_name_suffix
 Suffix for auto-generated foreign key names for tables using this storage engine. More...
 
prepare_secondary_engine_t prepare_secondary_engine
 Pointer to a function that prepares a secondary engine for executing a statement. More...
 
optimize_secondary_engine_t optimize_secondary_engine
 Pointer to a function that optimizes the current statement for execution on the secondary storage engine represented by this handlerton. More...
 
compare_secondary_engine_cost_t compare_secondary_engine_cost
 Pointer to a function that estimates the cost of executing a join in a secondary storage engine. More...
 
se_before_commit_t se_before_commit
 
se_after_commit_t se_after_commit
 
se_before_rollback_t se_before_rollback
 
Page_track_t page_track
 Page tracking interface. More...
 

Detailed Description

handlerton is a singleton structure - one instance per storage engine - to provide access to storage engine functionality that works on the "global" level (unlike handler class that works on a per-table basis).

usually handlerton instance is defined statically in ha_xxx.cc as

static handlerton { ... } xxx_hton;

savepoint_*, prepare, recover, and *_by_xid pointers can be 0.

Member Data Documentation

◆ acl_notify

acl_notify_t handlerton::acl_notify

◆ alter_tablespace

alter_tablespace_t handlerton::alter_tablespace

◆ binlog_func

binlog_func_t handlerton::binlog_func

◆ binlog_log_query

binlog_log_query_t handlerton::binlog_log_query

◆ check_fk_column_compat

check_fk_column_compat_t handlerton::check_fk_column_compat

◆ clone_interface

Clone_interface_t handlerton::clone_interface

Clone data transfer interfaces.

◆ close_connection

close_connection_t handlerton::close_connection

◆ collect_hton_log_info

collect_hton_log_info_t handlerton::collect_hton_log_info

◆ commit

commit_t handlerton::commit

◆ commit_by_xid

commit_by_xid_t handlerton::commit_by_xid

◆ compare_secondary_engine_cost

compare_secondary_engine_cost_t handlerton::compare_secondary_engine_cost

Pointer to a function that estimates the cost of executing a join in a secondary storage engine.

See also
compare_secondary_engine_cost_t for function signature.

◆ create

create_t handlerton::create

◆ data

void* handlerton::data

Location for engines to keep personal structures.

◆ db_type

enum legacy_db_type handlerton::db_type

Historical number used for frm file to determine the correct storage engine.

This is going away and new engines will just use "name" for this.

◆ ddse_dict_init

ddse_dict_init_t handlerton::ddse_dict_init

◆ dict_cache_reset

dict_cache_reset_t handlerton::dict_cache_reset

◆ dict_cache_reset_tables_and_tablespaces

dict_cache_reset_tables_and_tablespaces_t handlerton::dict_cache_reset_tables_and_tablespaces

◆ dict_get_server_version

dict_get_server_version_t handlerton::dict_get_server_version

◆ dict_init

dict_init_t handlerton::dict_init

◆ dict_recover

dict_recover_t handlerton::dict_recover

◆ dict_register_dd_table_id

dict_register_dd_table_id_t handlerton::dict_register_dd_table_id

◆ dict_set_server_version

dict_set_server_version_t handlerton::dict_set_server_version

◆ discover

discover_t handlerton::discover

◆ drop_database

drop_database_t handlerton::drop_database

◆ file_extensions

const char** handlerton::file_extensions

Null-ended array of file extentions that exist for the storage engine.

Used by frm_error() and the default handler::rename_table and delete_table methods in handler.cc.

For engines that have two file name extentions (separate meta/index file and data file), the order of elements is relevant. First element of engine file name extentions array should be meta/index file extention. Second element - data file extention. This order is assumed by prepare_for_repair() when REPAIR TABLE ... USE_FRM is issued.

For engines that don't have files, file_extensions is NULL.

Currently, the following alternatives are used:

  • file_extensions == NULL;
  • file_extensions[0] != NULL, file_extensions[1] == NULL;
  • file_extensions[0] != NULL, file_extensions[1] != NULL, file_extensions[2] == NULL;

◆ fill_is_table

fill_is_table_t handlerton::fill_is_table

◆ find_files

find_files_t handlerton::find_files

◆ finish_upgrade

finish_upgrade_t handlerton::finish_upgrade

◆ fk_name_suffix

LEX_CSTRING handlerton::fk_name_suffix

Suffix for auto-generated foreign key names for tables using this storage engine.

If such suffix is specified by SE then its generated foreign key names follow (table name)(SE-specific FK name suffix)(FK number) pattern. Length of such suffix should not exceed MAX_FK_NAME_SUFFIX_LENGTH bytes. If no suffix is specified then FK_NAME_DEFAULT_SUFFIX is used as default.

◆ flags

uint32 handlerton::flags

Global handler flags.

◆ flush_logs

flush_logs_t handlerton::flush_logs

◆ foreign_keys_flags

uint32 handlerton::foreign_keys_flags

Flags describing details of foreign key support by storage engine.

◆ get_cost_constants

get_cost_constants_t handlerton::get_cost_constants

◆ get_index_column_cardinality

get_index_column_cardinality_t handlerton::get_index_column_cardinality

◆ get_table_statistics

get_table_statistics_t handlerton::get_table_statistics

◆ get_tablespace

get_tablespace_t handlerton::get_tablespace

◆ get_tablespace_filename_ext

get_tablespace_filename_ext_t handlerton::get_tablespace_filename_ext

◆ get_tablespace_statistics

get_tablespace_statistics_t handlerton::get_tablespace_statistics

◆ get_tablespace_type

get_tablespace_type_t handlerton::get_tablespace_type

◆ get_tablespace_type_by_name

get_tablespace_type_by_name_t handlerton::get_tablespace_type_by_name

◆ is_dict_readonly

is_dict_readonly_t handlerton::is_dict_readonly

◆ is_reserved_db_name

is_reserved_db_name_t handlerton::is_reserved_db_name

◆ is_supported_system_table

is_supported_system_table_t handlerton::is_supported_system_table

◆ is_valid_tablespace_name

is_valid_tablespace_name_t handlerton::is_valid_tablespace_name

◆ kill_connection

kill_connection_t handlerton::kill_connection

◆ license

uint32 handlerton::license

Flag for Engine License.

◆ lock_hton_log

lock_hton_log_t handlerton::lock_hton_log

◆ make_pushed_join

make_pushed_join_t handlerton::make_pushed_join

◆ notify_alter_table

notify_alter_table_t handlerton::notify_alter_table

◆ notify_exclusive_mdl

notify_exclusive_mdl_t handlerton::notify_exclusive_mdl

◆ optimize_secondary_engine

optimize_secondary_engine_t handlerton::optimize_secondary_engine

Pointer to a function that optimizes the current statement for execution on the secondary storage engine represented by this handlerton.

See also
optimize_secondary_engine_t for function signature.

◆ page_track

Page_track_t handlerton::page_track

Page tracking interface.

◆ panic

panic_t handlerton::panic

◆ partition_flags

partition_flags_t handlerton::partition_flags

◆ post_ddl

post_ddl_t handlerton::post_ddl

◆ post_recover

post_recover_t handlerton::post_recover

◆ pre_dd_shutdown

pre_dd_shutdown_t handlerton::pre_dd_shutdown

◆ prepare

prepare_t handlerton::prepare

◆ prepare_secondary_engine

prepare_secondary_engine_t handlerton::prepare_secondary_engine

Pointer to a function that prepares a secondary engine for executing a statement.

See also
prepare_secondary_engine_t for function signature.

◆ recover

recover_t handlerton::recover

◆ replace_native_transaction_in_thd

replace_native_transaction_in_thd_t handlerton::replace_native_transaction_in_thd

◆ rm_tmp_tables

rm_tmp_tables_t handlerton::rm_tmp_tables

◆ rollback

rollback_t handlerton::rollback

◆ rollback_by_xid

rollback_by_xid_t handlerton::rollback_by_xid

◆ rotate_encryption_master_key

rotate_encryption_master_key_t handlerton::rotate_encryption_master_key

◆ savepoint_offset

uint handlerton::savepoint_offset

To store per-savepoint data storage engine is provided with an area of a requested size (0 is ok here).

savepoint_offset must be initialized statically to the size of the needed memory to store per-savepoint information. After xxx_init it is changed to be an offset to savepoint storage area and need not be used by storage engine. see binlog_hton and binlog_savepoint_set/rollback for an example.

◆ savepoint_release

savepoint_release_t handlerton::savepoint_release

◆ savepoint_rollback

savepoint_rollback_t handlerton::savepoint_rollback

◆ savepoint_rollback_can_release_mdl

savepoint_rollback_can_release_mdl_t handlerton::savepoint_rollback_can_release_mdl

◆ savepoint_set

savepoint_set_t handlerton::savepoint_set

◆ sdi_create

sdi_create_t handlerton::sdi_create

◆ sdi_delete

sdi_delete_t handlerton::sdi_delete

◆ sdi_drop

sdi_drop_t handlerton::sdi_drop

◆ sdi_get

sdi_get_t handlerton::sdi_get

◆ sdi_get_keys

sdi_get_keys_t handlerton::sdi_get_keys

◆ sdi_set

sdi_set_t handlerton::sdi_set

◆ se_after_commit

se_after_commit_t handlerton::se_after_commit

◆ se_before_commit

se_before_commit_t handlerton::se_before_commit

◆ se_before_rollback

se_before_rollback_t handlerton::se_before_rollback

◆ show_status

show_status_t handlerton::show_status

◆ slot

uint handlerton::slot

Each storage engine has it's own memory area (actually a pointer) in the thd, for storing per-connection information.

It is accessed as

thd->ha_data[xxx_hton.slot]

slot number is initialized by MySQL after xxx_init() is called.

◆ start_consistent_snapshot

start_consistent_snapshot_t handlerton::start_consistent_snapshot

◆ state

SHOW_COMP_OPTION handlerton::state

Historical marker for if the engine is available or not.

◆ table_exists_in_engine

table_exists_in_engine_t handlerton::table_exists_in_engine

◆ unlock_hton_log

unlock_hton_log_t handlerton::unlock_hton_log

◆ upgrade_logs

upgrade_logs_t handlerton::upgrade_logs

◆ upgrade_space_version

upgrade_space_version_t handlerton::upgrade_space_version

◆ upgrade_tablespace

upgrade_tablespace_t handlerton::upgrade_tablespace

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