45#define HA_RECOVER_DEFAULT 1
46#define HA_RECOVER_BACKUP 2
47#define HA_RECOVER_FORCE 4
48#define HA_RECOVER_QUICK 8
49#define HA_RECOVER_OFF 16
83 const char *
table_type()
const override {
return "MyISAM"; }
110 [[maybe_unused]])
const override {
117 int close(
void)
override;
151 int reset(
void)
override;
185 uint table_changes)
override;
197 void *seq_init_param,
uint n_ranges,
199 bool *force_default_mrr,
app_data_ptr new_data(u_int n, char *val, cons_type consensus)
Used to store optimizer cost estimates.
Definition: handler.h:3706
Definition: handler.h:7047
Base class to be used by handlers different shares.
Definition: handler.h:3956
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:853
ulong flags
dupp key and pack flags
Definition: key.h:118
Definition: ha_myisam.h:65
Myisam_handler_share()
Definition: ha_myisam.h:67
~Myisam_handler_share() override=default
MYISAM_SHARE * m_share
Definition: ha_myisam.h:69
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:168
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
Definition: ha_myisam.h:72
int enable_indexes(uint mode) override
Enable indexes again.
Definition: ha_myisam.cc:1296
MI_INFO * file
Definition: ha_myisam.h:73
int extra_opt(enum ha_extra_function operation, ulong cache_size) override
Definition: ha_myisam.cc:1707
int rnd_pos(uchar *buf, uchar *pos) override
Definition: ha_myisam.cc:1608
int disable_indexes(uint mode) override
Disable indexes for a while.
Definition: ha_myisam.cc:1251
void start_bulk_insert(ha_rows rows) override
Definition: ha_myisam.cc:1390
int info(uint) override
General method to gather info from handler.
Definition: ha_myisam.cc:1619
int write_row(uchar *buf) override
Write a row.
Definition: ha_myisam.cc:815
int index_end() override
Definition: ha_myisam.cc:1503
bool is_crashed() const override
Check if the table is crashed.
Definition: ha_myisam.cc:1471
DsMrr_impl ds_mrr
Definition: ha_myisam.h:209
int extra(enum ha_extra_function operation) override
Storage engine specific implementation of ha_extra()
Definition: ha_myisam.cc:1692
void get_auto_increment(ulonglong offset, ulonglong increment, ulonglong nb_desired_values, ulonglong *first_value, ulonglong *nb_reserved_values) override
Reserves an interval of auto_increment values from the handler.
Definition: ha_myisam.cc:1813
int check(THD *thd, HA_CHECK_OPT *check_opt) override
Definition: ha_myisam.cc:829
ha_rows multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq, void *seq_init_param, uint n_ranges, uint *bufsz, uint *flags, bool *force_default_mrr, Cost_estimate *cost) override
Get cost and other information about MRR scan over a known list of ranges.
Definition: ha_myisam.cc:2023
int external_lock(THD *thd, int lock_type) override
Is not invoked for non-transactional temporary tables.
Definition: ha_myisam.cc:1717
void position(const uchar *record) override
Definition: ha_myisam.cc:1614
int assign_to_keycache(THD *thd, HA_CHECK_OPT *check_opt) override
Definition: ha_myisam.cc:1136
Item * idx_cond_push(uint keyno, Item *idx_cond) override
Push down an index condition to the handler.
Definition: ha_myisam.cc:2048
int open(const char *name, int mode, uint test_if_locked, const dd::Table *table_def) override
Definition: ha_myisam.cc:697
char * index_file_name
Definition: ha_myisam.h:75
uint max_supported_key_part_length(HA_CREATE_INFO *create_info) const override
Definition: ha_myisam.h:109
int multi_range_read_next(char **range_info) override
Get next record in MRR scan.
Definition: ha_myisam.cc:2019
uint max_supported_keys() const override
Definition: ha_myisam.h:107
int index_next_same(uchar *buf, const uchar *key, uint keylen) override
Definition: ha_myisam.cc:1586
void update_create_info(HA_CREATE_INFO *create_info) override
Update create info as part of ALTER TABLE.
Definition: ha_myisam.cc:1733
int index_read_idx_map(uchar *buf, uint index, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag) override
Positions an index cursor to the index specified in argument.
Definition: ha_myisam.cc:1530
ulonglong table_flags() const override
Definition: ha_myisam.h:90
int preload_keys(THD *thd, HA_CHECK_OPT *check_opt) override
Definition: ha_myisam.cc:1176
int multi_range_read_init(RANGE_SEQ_IF *seq, void *seq_init_param, uint n_ranges, uint mode, HANDLER_BUFFER *buf) override
Multi Range Read interface.
Definition: ha_myisam.cc:2012
THR_LOCK_DATA ** store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type) override
Is not invoked for non-transactional temporary tables.
Definition: ha_myisam.cc:1725
int index_read_last_map(uchar *buf, const uchar *key, key_part_map keypart_map) override
The following functions works like index_read, but it find the last row with the current key value or...
Definition: ha_myisam.cc:1544
ulong index_flags(uint inx, uint, bool) const override
Definition: ha_myisam.h:95
int end_bulk_insert() override
Definition: ha_myisam.cc:1426
int index_read_map(uchar *buf, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag) override
Positions an index cursor to the index specified in the handle ('active_index').
Definition: ha_myisam.cc:1517
int rename_table(const char *from, const char *to, const dd::Table *from_table_def, dd::Table *to_table_def) override
Default rename_table() and delete_table() rename/delete files with a given name and extensions from h...
Definition: ha_myisam.cc:1808
int rnd_init(bool scan) override
rnd_init() can be called two times without rnd_end() in between (it only makes sense if scan=1).
Definition: ha_myisam.cc:1597
int delete_row(const uchar *buf) override
Definition: ha_myisam.cc:1481
bool is_index_algorithm_supported(enum ha_key_alg key_alg) const override
Check if SE supports specific key algorithm.
Definition: ha_myisam.h:87
bool auto_repair() const override
Check if the table can be automatically repaired.
Definition: ha_myisam.h:178
ha_rows multi_range_read_info(uint keyno, uint n_ranges, uint keys, uint *bufsz, uint *flags, Cost_estimate *cost) override
Get cost and other information about MRR scan over some sequence of ranges.
Definition: ha_myisam.cc:2037
int delete_all_rows(void) override
Delete all rows in a table.
Definition: ha_myisam.cc:1711
int index_next(uchar *buf) override
Definition: ha_myisam.cc:1558
int analyze(THD *thd, HA_CHECK_OPT *check_opt) override
Definition: ha_myisam.cc:908
FT_INFO * ft_init_ext(uint flags, uint inx, String *key) override
Definition: ha_myisam.h:138
int update_row(const uchar *old_data, uchar *new_data) override
Update a single row.
Definition: ha_myisam.cc:1476
int ft_read(uchar *buf) override
Definition: ha_myisam.cc:1886
MI_INFO * file_ptr(void)
Definition: ha_myisam.h:186
uint checksum() const override
Definition: ha_myisam.cc:1898
enum ha_key_alg get_default_index_algorithm() const override
Get default key algorithm for SE.
Definition: ha_myisam.h:84
int rnd_end() override
Definition: ha_myisam.cc:1512
ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key) override
Find number of records in a range.
Definition: ha_myisam.cc:1881
bool can_enable_indexes
Definition: ha_myisam.h:76
handler * clone(const char *name, MEM_ROOT *mem_root) override
Definition: ha_myisam.cc:636
int delete_table(const char *name, const dd::Table *table_def) override
Delete a table.
Definition: ha_myisam.cc:1713
char * data_file_name
Definition: ha_myisam.h:75
int repair(THD *thd, MI_CHECK ¶m, bool optimize)
Definition: ha_myisam.cc:999
int close(void) override
Definition: ha_myisam.cc:795
int index_last(uchar *buf) override
Definition: ha_myisam.cc:1579
int index_init(uint idx, bool sorted) override
Definition: ha_myisam.cc:1496
~ha_myisam() override=default
ha_myisam(handlerton *hton, TABLE_SHARE *table_arg)
Definition: ha_myisam.cc:622
uint max_supported_key_length() const override
Definition: ha_myisam.h:108
int indexes_are_disabled(void) override
Check if indexes are disabled.
Definition: ha_myisam.cc:1372
int index_first(uchar *buf) override
Definition: ha_myisam.cc:1572
ulonglong int_table_flags
Definition: ha_myisam.h:74
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info, dd::Table *table_def) override
Create table (implementation).
Definition: ha_myisam.cc:1742
const char * table_type() const override
The following can be called without an open handler.
Definition: ha_myisam.h:83
int index_prev(uchar *buf) override
Definition: ha_myisam.cc:1565
bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes) override
Part of old, deprecated in-place ALTER API.
Definition: ha_myisam.cc:1900
int ft_init() override
Definition: ha_myisam.h:133
bool check_and_repair(THD *thd) override
Check and repair the table if necessary.
Definition: ha_myisam.cc:1447
friend ICP_RESULT index_cond_func_myisam(void *arg)
Definition: ha_myisam.cc:1486
int reset(void) override
Reset state of file to after 'open'.
Definition: ha_myisam.cc:1696
int rnd_next(uchar *buf) override
Definition: ha_myisam.cc:1602
int optimize(THD *thd, HA_CHECK_OPT *check_opt) override
Definition: ha_myisam.cc:979
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4412
TABLE_SHARE * table_share
Definition: handler.h:4419
FT_INFO * ft_handler
Definition: handler.h:4497
TABLE * table
Definition: handler.h:4420
A table definition from the master.
Definition: rpl_utility.h:248
static MEM_ROOT mem_root
Definition: client_plugin.cc:110
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:222
Some definitions for full-text indices.
FT_INFO * ft_init_search(uint, void *, uint, uchar *, uint, const CHARSET_INFO *, uchar *)
Definition: ft_static.cc:64
const char * myisam_recover_names[]
Definition: ha_myisam.cc:73
ulonglong myisam_recover_options
Definition: ha_myisam.cc:64
int check_definition(MI_KEYDEF *t1_keyinfo, MI_COLUMNDEF *t1_recinfo, uint t1_keys, uint t1_recs, MI_KEYDEF *t2_keyinfo, MI_COLUMNDEF *t2_recinfo, uint t2_keys, uint t2_recs, bool strict)
Definition: ha_myisam.cc:431
TYPELIB myisam_recover_typelib
Definition: ha_myisam.cc:75
int table2myisam(TABLE *table_arg, MI_KEYDEF **keydef_out, MI_COLUMNDEF **recinfo_out, uint *records_out)
Definition: ha_myisam.cc:238
const char * myisam_stats_method_names[]
Definition: ha_myisam.cc:78
ICP_RESULT index_cond_func_myisam(void *arg)
Definition: ha_myisam.cc:1486
#define HA_RECOVER_OFF
Definition: ha_myisam.h:49
static int flags[50]
Definition: hp_test1.cc:40
static uint keys
Definition: hp_test2.cc:46
#define HA_SPATIAL
Spatial key.
Definition: my_base.h:508
ha_key_alg
Definition: my_base.h:97
@ HA_KEY_ALG_RTREE
Definition: my_base.h:108
@ HA_KEY_ALG_BTREE
Definition: my_base.h:107
@ HA_KEY_ALG_FULLTEXT
Definition: my_base.h:110
ha_rkey_function
Definition: my_base.h:78
ulong key_part_map
Definition: my_base.h:1007
my_off_t ha_rows
Definition: my_base.h:1140
ha_extra_function
Definition: my_base.h:184
enum icp_result ICP_RESULT
Values returned by index_cond_func_xxx functions.
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
unsigned char uchar
Definition: my_inttypes.h:52
This file should be included when using myisam functions.
#define MI_MAX_KEY_LENGTH
Definition: myisam.h:64
#define MI_MAX_KEY
Definition: myisam.h:56
static int record
Definition: mysqltest.cc:188
Definition: buf0block_hint.cc:30
mode
Definition: file_handle.h:60
required string key
Definition: replication_asynchronous_connection_failover.proto:60
#define HA_READ_NEXT
Definition: handler.h:526
#define HA_KEY_SCAN_NOT_ROR
Definition: handler.h:576
#define HA_KEYREAD_ONLY
Definition: handler.h:571
#define HA_READ_ORDER
Definition: handler.h:542
#define HA_READ_RANGE
Definition: handler.h:549
#define HA_DO_INDEX_COND_PUSHDOWN
Definition: handler.h:577
#define HA_READ_PREV
Definition: handler.h:530
Our own string classes, used pervasively throughout the executor.
case opt name
Definition: sslopt-case.h:33
Definition: ft_global.h:72
struct _ft_vft * please
Definition: ft_global.h:73
Definition: handler.h:3645
Definition: handler.h:3632
Struct to hold information about the table that should be created.
Definition: handler.h:3045
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
Definition: myisamdef.h:252
Definition: myisamdef.h:177
Definition: handler.h:3653
This structure is shared between different table objects.
Definition: table.h:690
KEY * key_info
Definition: table.h:746
uchar * record[2]
Definition: table.h:1442
Definition: thr_lock.h:124
void(* reinit_search)(FT_INFO *)
Definition: ft_global.h:53
handlerton is a singleton structure - one instance per storage engine - to provide access to storage ...
Definition: handler.h:2622
Definition: my_base.h:1124
thr_lock_type
Definition: thr_lock.h:51
unsigned int uint
Definition: uca9-dump.cc:75
static uint64_t cache_size
Definition: xcom_cache.cc:362