MySQL 8.0.31
Source Code Documentation
ha_myisam Class Reference

#include <ha_myisam.h>

Inheritance diagram for ha_myisam:
[legend]

Public Member Functions

 ha_myisam (handlerton *hton, TABLE_SHARE *table_arg)
 
 ~ha_myisam () override=default
 
handlerclone (const char *name, MEM_ROOT *mem_root) override
 
const char * table_type () const override
 The following can be called without an open handler. More...
 
enum ha_key_alg get_default_index_algorithm () const override
 Get default key algorithm for SE. More...
 
bool is_index_algorithm_supported (enum ha_key_alg key_alg) const override
 Check if SE supports specific key algorithm. More...
 
ulonglong table_flags () const override
 
int index_init (uint idx, bool sorted) override
 
int index_end () override
 
int rnd_end () override
 
ulong index_flags (uint inx, uint, bool) const override
 
uint max_supported_keys () const override
 
uint max_supported_key_length () const override
 
uint max_supported_key_part_length (HA_CREATE_INFO *create_info) const override
 
uint checksum () const override
 
int open (const char *name, int mode, uint test_if_locked, const dd::Table *table_def) override
 
int close (void) override
 
int write_row (uchar *buf) override
 Write a row. More...
 
int update_row (const uchar *old_data, uchar *new_data) override
 Update a single row. More...
 
int delete_row (const uchar *buf) override
 
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'). More...
 
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. More...
 
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 prefix. More...
 
int index_next (uchar *buf) override
 
int index_prev (uchar *buf) override
 
int index_first (uchar *buf) override
 
int index_last (uchar *buf) override
 
int index_next_same (uchar *buf, const uchar *key, uint keylen) override
 
int ft_init () override
 
FT_INFOft_init_ext (uint flags, uint inx, String *key) override
 
int ft_read (uchar *buf) override
 
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). More...
 
int rnd_next (uchar *buf) override
 
int rnd_pos (uchar *buf, uchar *pos) override
 
void position (const uchar *record) override
 
int info (uint) override
 General method to gather info from handler. More...
 
int extra (enum ha_extra_function operation) override
 Storage engine specific implementation of ha_extra() More...
 
int extra_opt (enum ha_extra_function operation, ulong cache_size) override
 
int reset (void) override
 Reset state of file to after 'open'. More...
 
int external_lock (THD *thd, int lock_type) override
 Is not invoked for non-transactional temporary tables. More...
 
int delete_all_rows (void) override
 Delete all rows in a table. More...
 
int disable_indexes (uint mode) override
 Disable indexes for a while. More...
 
int enable_indexes (uint mode) override
 Enable indexes again. More...
 
int indexes_are_disabled (void) override
 Check if indexes are disabled. More...
 
void start_bulk_insert (ha_rows rows) override
 
int end_bulk_insert () override
 
ha_rows records_in_range (uint inx, key_range *min_key, key_range *max_key) override
 Find number of records in a range. More...
 
void update_create_info (HA_CREATE_INFO *create_info) override
 Update create info as part of ALTER TABLE. More...
 
int create (const char *name, TABLE *form, HA_CREATE_INFO *create_info, dd::Table *table_def) override
 Create table (implementation). More...
 
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. More...
 
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. More...
 
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 handlerton::file_extensions. More...
 
int delete_table (const char *name, const dd::Table *table_def) override
 Delete a table. More...
 
int check (THD *thd, HA_CHECK_OPT *check_opt) override
 
int analyze (THD *thd, HA_CHECK_OPT *check_opt) override
 
int repair (THD *thd, HA_CHECK_OPT *check_opt) override
 In this method check_opt can be modified to specify CHECK option to use to call check() upon the table. More...
 
bool check_and_repair (THD *thd) override
 Check and repair the table if necessary. More...
 
bool is_crashed () const override
 Check if the table is crashed. More...
 
bool auto_repair () const override
 Check if the table can be automatically repaired. More...
 
int optimize (THD *thd, HA_CHECK_OPT *check_opt) override
 
int assign_to_keycache (THD *thd, HA_CHECK_OPT *check_opt) override
 
int preload_keys (THD *thd, HA_CHECK_OPT *check_opt) override
 
bool check_if_incompatible_data (HA_CREATE_INFO *info, uint table_changes) override
 Part of old, deprecated in-place ALTER API. More...
 
MI_INFOfile_ptr (void)
 
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. More...
 
int multi_range_read_next (char **range_info) override
 Get next record in MRR scan. More...
 
ha_rows multi_range_read_info_const (uint keyno, RANGE_SEQ_IF *seq, void *seq_init_param, uint n_ranges, uint *bufsz, uint *flags, Cost_estimate *cost) override
 Get cost and other information about MRR scan over a known list of ranges. More...
 
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. More...
 
Itemidx_cond_push (uint keyno, Item *idx_cond) override
 Push down an index condition to the handler. More...
 
- Public Member Functions inherited from handler
void unbind_psi ()
 
void rebind_psi ()
 
void start_psi_batch_mode ()
 Put the handler in 'batch' mode when collecting table io instrumented events. More...
 
void end_psi_batch_mode ()
 End a batch started with start_psi_batch_mode. More...
 
bool end_psi_batch_mode_if_started ()
 If a PSI batch was started, turn if off. More...
 
 handler (handlerton *ht_arg, TABLE_SHARE *share_arg)
 
virtual ~handler (void)
 
virtual std::string explain_extra () const
 Return extra handler specific text for EXPLAIN. More...
 
void init ()
 This is called after create to allow us to set up cached variables. More...
 
void ha_set_record_buffer (Record_buffer *buffer)
 Set a record buffer that the storage engine can use for multi-row reads. More...
 
Record_bufferha_get_record_buffer () const
 Get the record buffer that was set with ha_set_record_buffer(). More...
 
bool ha_is_record_buffer_wanted (ha_rows *const max_rows) const
 Does this handler want to get a Record_buffer for multi-row reads via the ha_set_record_buffer() function? And if so, what is the maximum number of records to allocate space for in the buffer? More...
 
int ha_open (TABLE *table, const char *name, int mode, int test_if_locked, const dd::Table *table_def)
 
int ha_close (void)
 Close handler. More...
 
int ha_index_init (uint idx, bool sorted)
 Initialize use of index. More...
 
int ha_index_end ()
 End use of index. More...
 
int ha_rnd_init (bool scan)
 Initialize table for random read or scan. More...
 
int ha_rnd_end ()
 End use of random access. More...
 
int ha_rnd_next (uchar *buf)
 Read next row via random scan. More...
 
int ha_rnd_pos (uchar *buf, uchar *pos)
 Read row via random scan from position. More...
 
int ha_index_read_map (uchar *buf, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag)
 Read [part of] row via [part of] index. More...
 
int ha_index_read_last_map (uchar *buf, const uchar *key, key_part_map keypart_map)
 
int ha_index_read_idx_map (uchar *buf, uint index, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag)
 Initializes an index and read it. More...
 
int ha_index_next (uchar *buf)
 Reads the next row via index. More...
 
int ha_index_prev (uchar *buf)
 Reads the previous row via index. More...
 
int ha_index_first (uchar *buf)
 Reads the first row via index. More...
 
int ha_index_last (uchar *buf)
 Reads the last row via index. More...
 
int ha_index_next_same (uchar *buf, const uchar *key, uint keylen)
 Reads the next same row via index. More...
 
int ha_reset ()
 Check handler usage and reset state of file to after 'open'. More...
 
int ha_index_or_rnd_end ()
 
Table_flags ha_table_flags () const
 The cached_table_flags is set at ha_open and ha_external_lock. More...
 
int ha_external_lock (THD *thd, int lock_type)
 These functions represent the public interface to users of the handler class, hence they are not virtual. More...
 
int ha_write_row (uchar *buf)
 
int ha_update_row (const uchar *old_data, uchar *new_data)
 Update the current row. More...
 
int ha_delete_row (const uchar *buf)
 
void ha_release_auto_increment ()
 
int ha_check_for_upgrade (HA_CHECK_OPT *check_opt)
 
int ha_check (THD *thd, HA_CHECK_OPT *check_opt)
 to be actually called to get 'check()' functionality More...
 
int ha_repair (THD *thd, HA_CHECK_OPT *check_opt)
 Repair table: public interface. More...
 
void ha_start_bulk_insert (ha_rows rows)
 Start bulk insert. More...
 
int ha_end_bulk_insert ()
 End bulk insert. More...
 
int ha_bulk_update_row (const uchar *old_data, uchar *new_data, uint *dup_key_found)
 Bulk update row: public interface. More...
 
int ha_delete_all_rows ()
 Delete all rows: public interface. More...
 
int ha_truncate (dd::Table *table_def)
 Truncate table: public interface. More...
 
int ha_optimize (THD *thd, HA_CHECK_OPT *check_opt)
 Optimize table: public interface. More...
 
int ha_analyze (THD *thd, HA_CHECK_OPT *check_opt)
 Analyze table: public interface. More...
 
bool ha_check_and_repair (THD *thd)
 Check and repair table: public interface. More...
 
int ha_disable_indexes (uint mode)
 Disable indexes: public interface. More...
 
int ha_enable_indexes (uint mode)
 Enable indexes: public interface. More...
 
int ha_discard_or_import_tablespace (bool discard, dd::Table *table_def)
 Discard or import tablespace: public interface. More...
 
int ha_rename_table (const char *from, const char *to, const dd::Table *from_table_def, dd::Table *to_table_def)
 Rename table: public interface. More...
 
int ha_delete_table (const char *name, const dd::Table *table_def)
 Delete table: public interface. More...
 
void ha_drop_table (const char *name)
 Drop table in the engine: public interface. More...
 
int ha_create (const char *name, TABLE *form, HA_CREATE_INFO *info, dd::Table *table_def)
 Create a table in the engine: public interface. More...
 
int ha_load_table (const TABLE &table)
 Loads a table into its defined secondary storage engine: public interface. More...
 
int ha_unload_table (const char *db_name, const char *table_name, bool error_if_not_loaded)
 Unloads a table from its defined secondary storage engine: public interface. More...
 
virtual int parallel_scan_init (void *&scan_ctx, size_t *num_threads, bool use_reserved_threads)
 Initializes a parallel scan. More...
 
virtual int parallel_scan (void *scan_ctx, void **thread_ctxs, Load_init_cbk init_fn, Load_cbk load_fn, Load_end_cbk end_fn)
 Run the parallel read of data. More...
 
virtual void parallel_scan_end (void *scan_ctx)
 End of the parallel scan. More...
 
bool ha_get_se_private_data (dd::Table *dd_table, bool reset)
 Submit a dd::Table object representing a core DD table having hardcoded data to be filled in by the DDSE. More...
 
void adjust_next_insert_id_after_explicit_value (ulonglong nr)
 
int update_auto_increment ()
 
virtual void print_error (int error, myf errflag)
 Print error that we got from handler function. More...
 
virtual bool get_error_message (int error, String *buf)
 Return an error message specific to this handler. More...
 
uint get_dup_key (int error)
 
virtual bool get_foreign_dup_key (char *child_table_name, uint child_table_name_len, char *child_key_name, uint child_key_name_len)
 Retrieves the names of the table and the key for which there was a duplicate entry in the case of HA_ERR_FOREIGN_DUPLICATE_KEY. More...
 
virtual void change_table_ptr (TABLE *table_arg, TABLE_SHARE *share)
 Change the internal TABLE_SHARE pointer. More...
 
const TABLE_SHAREget_table_share () const
 
virtual double scan_time ()
 
virtual double read_time (uint index, uint ranges, ha_rows rows)
 The cost of reading a set of ranges from the table using an index to access it. More...
 
virtual double index_only_read_time (uint keynr, double records)
 Calculate cost of 'index only' scan for given index and number of records. More...
 
virtual Cost_estimate table_scan_cost ()
 Cost estimate for doing a complete table scan. More...
 
virtual Cost_estimate index_scan_cost (uint index, double ranges, double rows)
 Cost estimate for reading a number of ranges from an index. More...
 
virtual Cost_estimate read_cost (uint index, double ranges, double rows)
 Cost estimate for reading a set of ranges from the table using an index to access it. More...
 
virtual double page_read_cost (uint index, double reads)
 Cost estimate for doing a number of non-sequentially accesses against the storage engine. More...
 
virtual double worst_seek_times (double reads)
 Provide an upper cost-limit of doing a specified number of seek-and-read key lookups. More...
 
virtual longlong get_memory_buffer_size () const
 Return an estimate on the amount of memory the storage engine will use for caching data in memory. More...
 
double table_in_memory_estimate () const
 Return an estimate of how much of the table that is currently stored in main memory. More...
 
double index_in_memory_estimate (uint keyno) const
 Return an estimate of how much of the index that is currently stored in main memory. More...
 
int ha_sample_init (void *&scan_ctx, double sampling_percentage, int sampling_seed, enum_sampling_method sampling_method, const bool tablesample)
 Initialize sampling. More...
 
int ha_sample_next (void *scan_ctx, uchar *buf)
 Get the next record for sampling. More...
 
int ha_sample_end (void *scan_ctx)
 End sampling. More...
 
int ha_multi_range_read_next (char **range_info)
 
int ha_read_range_first (const key_range *start_key, const key_range *end_key, bool eq_range, bool sorted)
 
int ha_read_range_next ()
 
bool has_transactions ()
 
virtual uint extra_rec_buf_length () const
 
virtual bool is_ignorable_error (int error)
 Determine whether an error can be ignored or not. More...
 
virtual bool is_fatal_error (int error)
 Determine whether an error is fatal or not. More...
 
int ha_records (ha_rows *num_rows)
 Wrapper function to call records() in storage engine. More...
 
int ha_records (ha_rows *num_rows, uint index)
 Wrapper function to call records_from_index() in storage engine. More...
 
virtual ha_rows estimate_rows_upper_bound ()
 Return upper bound of current number of records in the table (max. More...
 
virtual enum row_type get_real_row_type (const HA_CREATE_INFO *create_info) const
 Get real row type for the table created based on one specified by user, CREATE TABLE options and SE capabilities. More...
 
virtual void column_bitmaps_signal ()
 Signal that the table->read_set and table->write_set table maps changed The handler is allowed to set additional bits in the above map in this call. More...
 
uint get_index (void) const
 
virtual bool start_bulk_update ()
 
virtual bool start_bulk_delete ()
 
virtual int exec_bulk_update (uint *dup_key_found)
 After this call all outstanding updates must be performed. More...
 
virtual void end_bulk_update ()
 Perform any needed clean-up, no outstanding updates are there at the moment. More...
 
virtual int end_bulk_delete ()
 Execute all outstanding deletes and close down the bulk delete. More...
 
void set_end_range (const key_range *range, enum_range_scan_direction direction)
 Set the end position for a range scan. More...
 
int compare_key (key_range *range)
 Compare if found key (in row) is over max-value. More...
 
int compare_key_icp (const key_range *range) const
 
int compare_key_in_buffer (const uchar *buf) const
 Check if the key in the given buffer (which is not necessarily TABLE::record[0]) is within range. More...
 
virtual FT_INFOft_init_ext_with_hints (uint inx, String *key, Ft_hints *hints)
 
int ha_ft_read (uchar *buf)
 
int ha_read_first_row (uchar *buf, uint primary_key)
 Read first row (only) from a table. More...
 
virtual int rnd_pos_by_record (uchar *record)
 This function only works for handlers having HA_PRIMARY_KEY_REQUIRED_FOR_POSITION set. More...
 
virtual uint32 calculate_key_hash_value (Field **field_array)
 
int ha_extra (enum ha_extra_function operation)
 Request storage engine to do an extra operation: enable,disable or run some functionality. More...
 
virtual const handlertonhton_supporting_engine_pushdown ()
 Get the handlerton of the storage engine if the SE is capable of pushing down some of the AccessPath functionality. More...
 
virtual bool start_read_removal (void)
 Start read (before write) removal on the current table. More...
 
virtual ha_rows end_read_removal (void)
 End read (before write) removal and return the number of rows really written. More...
 
virtual bool was_semi_consistent_read ()
 
virtual void try_semi_consistent_read (bool)
 Tell the engine whether it should avoid unnecessary lock waits. More...
 
virtual void unlock_row ()
 Unlock last accessed row. More...
 
virtual int start_stmt (THD *thd, thr_lock_type lock_type)
 Start a statement when table is locked. More...
 
void set_next_insert_id (ulonglong id)
 
void restore_auto_increment (ulonglong prev_insert_id)
 
virtual void append_create_info (String *packet)
 
virtual void init_table_handle_for_HANDLER ()
 
uint max_record_length () const
 
uint max_keys () const
 
uint max_key_parts () const
 
uint max_key_length () const
 
uint max_key_part_length (HA_CREATE_INFO *create_info) const
 
virtual uint max_supported_record_length () const
 
virtual uint max_supported_key_parts () const
 
virtual uint min_record_length (uint options) const
 
virtual bool low_byte_first () const
 
virtual uint lock_count (void) const
 Get number of lock objects returned in store_lock. More...
 
virtual bool primary_key_is_clustered () const
 Check if the primary key is clustered or not. More...
 
virtual int cmp_ref (const uchar *ref1, const uchar *ref2) const
 Compare two positions. More...
 
virtual const Itemcond_push (const Item *cond)
 Push condition down to the table handler. More...
 
virtual void cancel_pushed_idx_cond ()
 Reset information about pushed index conditions. More...
 
virtual uint number_of_pushed_joins () const
 Reports number of tables included in pushed join which this handler instance is part of. More...
 
virtual const TABLEmember_of_pushed_join () const
 If this handler instance is part of a pushed join sequence returned TABLE instance being root of the pushed query? More...
 
virtual const TABLEparent_of_pushed_join () const
 If this handler instance is a child in a pushed join sequence returned TABLE instance being my parent? More...
 
virtual table_map tables_in_pushed_join () const
 
int ha_index_read_pushed (uchar *buf, const uchar *key, key_part_map keypart_map)
 
int ha_index_next_pushed (uchar *buf)
 
virtual enum_alter_inplace_result check_if_supported_inplace_alter (TABLE *altered_table, Alter_inplace_info *ha_alter_info)
 Check if a storage engine supports a particular alter table in-place. More...
 
bool ha_prepare_inplace_alter_table (TABLE *altered_table, Alter_inplace_info *ha_alter_info, const dd::Table *old_table_def, dd::Table *new_table_def)
 Public functions wrapping the actual handler call. More...
 
bool ha_inplace_alter_table (TABLE *altered_table, Alter_inplace_info *ha_alter_info, const dd::Table *old_table_def, dd::Table *new_table_def)
 Public function wrapping the actual handler call. More...
 
bool ha_commit_inplace_alter_table (TABLE *altered_table, Alter_inplace_info *ha_alter_info, bool commit, const dd::Table *old_table_def, dd::Table *new_table_def)
 Public function wrapping the actual handler call. More...
 
void ha_notify_table_changed (Alter_inplace_info *ha_alter_info)
 Public function wrapping the actual handler call. More...
 
virtual void use_hidden_primary_key ()
 use_hidden_primary_key() is called in case of an update/delete when (table_flags() and HA_PRIMARY_KEY_REQUIRED_FOR_DELETE) is defined but we don't have a primary key More...
 
virtual int bulk_update_row (const uchar *old_data, uchar *new_data, uint *dup_key_found)
 This method is similar to update_row, however the handler doesn't need to execute the updates at this point in time. More...
 
virtual int truncate (dd::Table *table_def)
 Quickly remove all rows from a table. More...
 
virtual int discard_or_import_tablespace (bool discard, dd::Table *table_def)
 Discard or import tablespace. More...
 
virtual void drop_table (const char *name)
 
virtual bool get_se_private_data (dd::Table *dd_table, bool reset)
 
virtual int get_extra_columns_and_keys (const HA_CREATE_INFO *create_info, const List< Create_field > *create_list, const KEY *key_info, uint key_count, dd::Table *table_obj)
 Adjust definition of table to be created by adding implicit columns and indexes necessary for the storage engine. More...
 
virtual bool set_ha_share_ref (Handler_share **arg_ha_share)
 
void set_ha_table (TABLE *table_arg)
 
int get_lock_type () const
 
virtual Partition_handlerget_partition_handler ()
 
bool ha_upgrade_table (THD *thd, const char *dbname, const char *table_name, dd::Table *dd_table, TABLE *table_arg)
 Set se_private_id and se_private_data during upgrade. More...
 
void ha_set_primary_handler (handler *primary_handler)
 Store a pointer to the handler of the primary table that corresponds to the secondary table in this handler. More...
 
handlerha_get_primary_handler () const
 Get a pointer to a handler for the table in the primary storage engine, if this handler is for a table in a secondary storage engine. More...
 
void ha_mv_key_capacity (uint *num_keys, size_t *keys_length) const
 Return max limits for a single set of multi-valued keys. More...
 

Private Member Functions

int repair (THD *thd, MI_CHECK &param, bool optimize)
 

Private Attributes

MI_INFOfile
 
ulonglong int_table_flags
 
char * data_file_name
 
char * index_file_name
 
bool can_enable_indexes
 
DsMrr_impl ds_mrr
 

Friends

ICP_RESULT index_cond_func_myisam (void *arg)
 

Additional Inherited Members

- Public Types inherited from handler
enum  enum_range_scan_direction { RANGE_SCAN_ASC , RANGE_SCAN_DESC }
 
enum  { NONE = 0 , INDEX , RND , SAMPLING }
 
typedef ulonglong Table_flags
 
using Load_init_cbk = std::function< bool(void *cookie, ulong ncols, ulong row_len, const ulong *col_offsets, const ulong *null_byte_offsets, const ulong *null_bitmasks)>
 This callback is called by each parallel load thread at the beginning of the parallel load for the adapter scan. More...
 
using Load_cbk = std::function< bool(void *cookie, uint nrows, void *rowdata, uint64_t partition_id)>
 This callback is called by each parallel load thread when processing of rows is required for the adapter scan. More...
 
using Load_end_cbk = std::function< void(void *cookie)>
 This callback is called by each parallel load thread when processing of rows has ended for the adapter scan. More...
 
typedef void(* my_gcolumn_template_callback_t) (const TABLE *, void *)
 Callback function that will be called by my_prepare_gcolumn_template once the table has been opened. More...
 
- Static Public Member Functions inherited from handler
static bool my_prepare_gcolumn_template (THD *thd, const char *db_name, const char *table_name, my_gcolumn_template_callback_t myc, void *ib_table)
 Callback to allow InnoDB to prepare a template for generated column processing. More...
 
static bool my_eval_gcolumn_expr_with_open (THD *thd, const char *db_name, const char *table_name, const MY_BITMAP *const fields, uchar *record, const char **mv_data_ptr, ulong *mv_length)
 Callback for generated columns processing. More...
 
static bool my_eval_gcolumn_expr (THD *thd, TABLE *table, const MY_BITMAP *const fields, uchar *record, const char **mv_data_ptr, ulong *mv_length)
 Callback for computing generated column values. More...
 
- Public Attributes inherited from handler
handlertonht
 
ucharref
 Pointer to current row. More...
 
uchardup_ref
 Pointer to duplicate row. More...
 
ha_statistics stats
 
range_seq_t mrr_iter
 
RANGE_SEQ_IF mrr_funcs
 
HANDLER_BUFFERmulti_range_buffer
 
uint ranges_in_seq
 
bool mrr_is_output_sorted
 
bool mrr_have_range
 
KEY_MULTI_RANGE mrr_cur_range
 
key_rangeend_range
 End value for a range scan. More...
 
bool m_virt_gcol_in_end_range = false
 Flag which tells if end_range contains a virtual generated column. More...
 
uint errkey
 
uint key_used_on_scan
 
uint active_index
 
uint ref_length
 Length of ref (1-8 or the clustered key length) More...
 
FT_INFOft_handler
 
enum handler:: { ... }  inited
 
bool implicit_emptied
 
const Itempushed_cond
 
Itempushed_idx_cond
 
uint pushed_idx_cond_keyno
 
ulonglong next_insert_id
 next_insert_id is the next value which should be inserted into the auto_increment column: in a inserting-multi-row statement (like INSERT SELECT), for the first row where the autoinc value is not specified by the statement, get_auto_increment() called and asked to generate a value, next_insert_id is set to the next value, then for all other rows next_insert_id is used (and increased each time) without calling get_auto_increment(). More...
 
ulonglong insert_id_for_cur_row
 insert id for the current row (autogenerated; if not autogenerated, it's 0). More...
 
Discrete_interval auto_inc_interval_for_cur_row
 Interval returned by get_auto_increment() and being consumed by the inserter. More...
 
uint auto_inc_intervals_count
 Number of reserved auto-increment intervals. More...
 
PSI_tablem_psi
 Instrumented table associated with this handler. More...
 
std::mt19937 m_random_number_engine
 
double m_sampling_percentage
 
- Protected Member Functions inherited from handler
virtual int records (ha_rows *num_rows)
 Number of rows in table. More...
 
virtual int records_from_index (ha_rows *num_rows, uint index)
 Number of rows in table counted using the secondary index chosen by optimizer. More...
 
virtual int read_range_first (const key_range *start_key, const key_range *end_key, bool eq_range_arg, bool sorted)
 Read first row between two ranges. More...
 
virtual int read_range_next ()
 Read next row between two endpoints. More...
 
virtual int index_read_pushed (uchar *, const uchar *, key_part_map)
 
virtual int index_next_pushed (uchar *)
 
virtual bool prepare_inplace_alter_table (TABLE *altered_table, Alter_inplace_info *ha_alter_info, const dd::Table *old_table_def, dd::Table *new_table_def)
 Allows the storage engine to update internal structures with concurrent writes blocked. More...
 
virtual bool inplace_alter_table (TABLE *altered_table, Alter_inplace_info *ha_alter_info, const dd::Table *old_table_def, dd::Table *new_table_def)
 Alter the table structure in-place with operations specified using HA_ALTER_FLAGS and Alter_inplace_info. More...
 
virtual bool commit_inplace_alter_table (TABLE *altered_table, Alter_inplace_info *ha_alter_info, bool commit, const dd::Table *old_table_def, dd::Table *new_table_def)
 Commit or rollback the changes made during prepare_inplace_alter_table() and inplace_alter_table() inside the storage engine. More...
 
virtual void notify_table_changed (Alter_inplace_info *ha_alter_info)
 Notify the storage engine that the table definition has been updated. More...
 
void ha_statistic_increment (ulonglong System_status_var::*offset) const
 
THDha_thd () const
 
PSI_table_shareha_table_share_psi (const TABLE_SHARE *share) const
 Acquire the instrumented table information from a table share. More...
 
virtual int index_read (uchar *buf, const uchar *key, uint key_len, enum ha_rkey_function find_flag)
 
virtual int index_read_last (uchar *buf, const uchar *key, uint key_len)
 
Handler_shareget_ha_share_ptr ()
 Get an initialized ha_share. More...
 
void set_ha_share_ptr (Handler_share *arg_ha_share)
 Set ha_share to be used by all instances of the same table/partition. More...
 
void lock_shared_ha_data ()
 Take a lock for protecting shared handler data. More...
 
void unlock_shared_ha_data ()
 Release lock for protecting ha_share. More...
 
- Protected Attributes inherited from handler
TABLE_SHAREtable_share
 
TABLEtable
 
Table_flags cached_table_flags {0}
 
ha_rows estimation_rows_to_insert
 
KEY_PART_INFOrange_key_part
 
bool eq_range
 
bool in_range_check_pushed_down
 

Constructor & Destructor Documentation

◆ ha_myisam()

ha_myisam::ha_myisam ( handlerton hton,
TABLE_SHARE table_arg 
)

◆ ~ha_myisam()

ha_myisam::~ha_myisam ( )
overridedefault

Member Function Documentation

◆ analyze()

int ha_myisam::analyze ( THD thd,
HA_CHECK_OPT check_opt 
)
overridevirtual

Reimplemented from handler.

◆ assign_to_keycache()

int ha_myisam::assign_to_keycache ( THD thd,
HA_CHECK_OPT check_opt 
)
overridevirtual

Reimplemented from handler.

◆ auto_repair()

bool ha_myisam::auto_repair ( ) const
inlineoverridevirtual

Check if the table can be automatically repaired.

Return values
trueCan be auto repaired
falseCannot be auto repaired

Reimplemented from handler.

◆ check()

int ha_myisam::check ( THD thd,
HA_CHECK_OPT check_opt 
)
overridevirtual

Reimplemented from handler.

◆ check_and_repair()

bool ha_myisam::check_and_repair ( THD thd)
overridevirtual

Check and repair the table if necessary.

Parameters
thdThread object
Return values
trueError/Not supported
falseSuccess
Note
Called if open_table_from_share fails and is_crashed().

Reimplemented from handler.

◆ check_if_incompatible_data()

bool ha_myisam::check_if_incompatible_data ( HA_CREATE_INFO create_info,
uint  table_changes 
)
overridevirtual

Part of old, deprecated in-place ALTER API.

Reimplemented from handler.

◆ checksum()

uint ha_myisam::checksum ( ) const
overridevirtual

Reimplemented from handler.

◆ clone()

handler * ha_myisam::clone ( const char *  name,
MEM_ROOT mem_root 
)
overridevirtual

Reimplemented from handler.

◆ close()

int ha_myisam::close ( void  )
overridevirtual

Implements handler.

◆ create()

int ha_myisam::create ( const char *  name,
TABLE form,
HA_CREATE_INFO info,
dd::Table table_def 
)
overridevirtual

Create table (implementation).

Parameters
[in]nameTable name.
[in]formTABLE object describing the table to be created.
[in]infoHA_CREATE_INFO describing table.
[in,out]table_defdd::Table object describing the table to be created. This object can be adjusted by storage engine if it supports atomic DDL (i.e. has HTON_SUPPORTS_ATOMIC_DDL flag set). These changes will be persisted in the data-dictionary. Can be NULL for temporary tables created by optimizer.
Return values
0Success.
non-0Error.

Implements handler.

◆ delete_all_rows()

int ha_myisam::delete_all_rows ( void  )
overridevirtual

Delete all rows in a table.

This is called both for cases of truncate and for cases where the optimizer realizes that all rows will be removed as a result of an SQL statement.

If the handler don't support this, then this function will return HA_ERR_WRONG_COMMAND and MySQL will delete the rows one by one.

Reimplemented from handler.

◆ delete_row()

int ha_myisam::delete_row ( const uchar buf)
overridevirtual

Reimplemented from handler.

◆ delete_table()

int ha_myisam::delete_table ( const char *  name,
const dd::Table table_def 
)
overridevirtual

Delete a table.

Used to delete a table. By the time delete_table() has been called all opened references to this table will have been closed (and your globally shared references released. The variable name will just be the name of the table. You will need to remove any files you have created at this point. Called for base as well as temporary tables.

Parameters
nameFull path of table name.
table_defdd::Table describing table being deleted (can be NULL for temporary tables created by optimizer).
Returns
Zero on success, nonzero otherwise.

Reimplemented from handler.

◆ disable_indexes()

int ha_myisam::disable_indexes ( uint  mode)
overridevirtual

Disable indexes for a while.

Parameters
modeMode.
Return values
0Success.
!=0 Error.

Reimplemented from handler.

◆ enable_indexes()

int ha_myisam::enable_indexes ( uint  mode)
overridevirtual

Enable indexes again.

Parameters
modeMode.
Return values
0Success.
!=0 Error.

Reimplemented from handler.

◆ end_bulk_insert()

int ha_myisam::end_bulk_insert ( )
overridevirtual

Reimplemented from handler.

◆ external_lock()

int ha_myisam::external_lock ( THD thd,
int  lock_type 
)
overridevirtual

Is not invoked for non-transactional temporary tables.

Tells the storage engine that we intend to read or write data from the table. This call is prefixed with a call to handler::store_lock() and is invoked only for those handler instances that stored the lock.

Calls to rnd_init / index_init are prefixed with this call. When table IO is complete, we call

external_lock(F_UNLCK)
int external_lock(THD *thd, int lock_type) override
Is not invoked for non-transactional temporary tables.
Definition: ha_myisam.cc:1715

. A storage engine writer should expect that each call to

#define LOCK
Definition: dynamic_loader.cc:626

is followed by a call to

::external_lock(F_UNLCK)

. If it is not, it is a bug in MySQL.

The name and signature originate from the first implementation in MyISAM, which would call fcntl to set/clear an advisory lock on the data file in this method.

Originally this method was used to set locks on file level to enable several MySQL Servers to work on the same data. For transactional engines it has been "abused" to also mean start and end of statements to enable proper rollback of statements and transactions. When LOCK TABLES has been issued the start_stmt method takes over the role of indicating start of statement but in this case there is no end of statement indicator(?).

Called from lock.cc by lock_external() and unlock_external(). Also called from sql_table.cc by copy_data_between_tables().

Parameters
thdthe current thread
lock_typeF_RDLCK, F_WRLCK, F_UNLCK
Returns
non-0 in case of failure, 0 in case of success. When lock_type is F_UNLCK, the return value is ignored.

Reimplemented from handler.

◆ extra()

int ha_myisam::extra ( enum ha_extra_function  operation)
overridevirtual

Storage engine specific implementation of ha_extra()

Parameters
operationthe operation to perform
Returns
0 on success error otherwise

Reimplemented from handler.

◆ extra_opt()

int ha_myisam::extra_opt ( enum ha_extra_function  operation,
ulong  cache_size 
)
overridevirtual

Reimplemented from handler.

◆ file_ptr()

MI_INFO * ha_myisam::file_ptr ( void  )
inline

◆ ft_init()

int ha_myisam::ft_init ( )
inlineoverridevirtual

Reimplemented from handler.

◆ ft_init_ext()

FT_INFO * ha_myisam::ft_init_ext ( uint  flags,
uint  inx,
String key 
)
inlineoverridevirtual

Reimplemented from handler.

◆ ft_read()

int ha_myisam::ft_read ( uchar buf)
overridevirtual

Reimplemented from handler.

◆ get_auto_increment()

void ha_myisam::get_auto_increment ( ulonglong  offset,
ulonglong  increment,
ulonglong  nb_desired_values,
ulonglong first_value,
ulonglong nb_reserved_values 
)
overridevirtual

Reserves an interval of auto_increment values from the handler.

Parameters
offsetoffset (modulus increment)
incrementincrement between calls
nb_desired_valueshow many values we want
[out]first_valuethe first value reserved by the handler
[out]nb_reserved_valueshow many values the handler reserved

offset and increment means that we want values to be of the form offset + N * increment, where N>=0 is integer. If the function sets *first_value to ULLONG_MAX it means an error. If the function sets *nb_reserved_values to ULLONG_MAX it means it has reserved to "positive infinite".

Reimplemented from handler.

◆ get_default_index_algorithm()

enum ha_key_alg ha_myisam::get_default_index_algorithm ( ) const
inlineoverridevirtual

Get default key algorithm for SE.

It is used when user has not provided algorithm explicitly or when algorithm specified is not supported by SE.

Reimplemented from handler.

◆ idx_cond_push()

Item * ha_myisam::idx_cond_push ( uint  keyno,
Item idx_cond 
)
overridevirtual

Push down an index condition to the handler.

The server will use this method to push down a condition it wants the handler to evaluate when retrieving records using a specified index. The pushed index condition will only refer to fields from this handler that is contained in the index (but it may also refer to fields in other handlers). Before the handler evaluates the condition it must read the content of the index entry into the record buffer.

The handler is free to decide if and how much of the condition it will take responsibility for evaluating. Based on this evaluation it should return the part of the condition it will not evaluate. If it decides to evaluate the entire condition it should return NULL. If it decides not to evaluate any part of the condition it should return a pointer to the same condition as given as argument.

Parameters
keynothe index number to evaluate the condition on
idx_condthe condition to be evaluated by the handler
Returns
The part of the pushed condition that the handler decides not to evaluate

Reimplemented from handler.

◆ index_end()

int ha_myisam::index_end ( void  )
overridevirtual

Reimplemented from handler.

◆ index_first()

int ha_myisam::index_first ( uchar )
overridevirtual
See also
index_read_map().

Reimplemented from handler.

◆ index_flags()

ulong ha_myisam::index_flags ( uint  inx,
uint  ,
bool   
) const
inlineoverridevirtual

Implements handler.

◆ index_init()

int ha_myisam::index_init ( uint  idx,
bool  sorted 
)
overridevirtual

Reimplemented from handler.

◆ index_last()

int ha_myisam::index_last ( uchar )
overridevirtual
See also
index_read_map().

Reimplemented from handler.

◆ index_next()

int ha_myisam::index_next ( uchar )
overridevirtual
See also
index_read_map().

Reimplemented from handler.

◆ index_next_same()

int ha_myisam::index_next_same ( uchar buf,
const uchar key,
uint  keylen 
)
overridevirtual
See also
index_read_map().

Reimplemented from handler.

◆ index_prev()

int ha_myisam::index_prev ( uchar )
overridevirtual
See also
index_read_map().

Reimplemented from handler.

◆ index_read_idx_map()

int ha_myisam::index_read_idx_map ( uchar buf,
uint  index,
const uchar key,
key_part_map  keypart_map,
enum ha_rkey_function  find_flag 
)
overridevirtual

Positions an index cursor to the index specified in argument.

Fetches the row if available. If the key value is null, begin at the first key of the index.

See also
index_read_map()

Reimplemented from handler.

◆ index_read_last_map()

int ha_myisam::index_read_last_map ( uchar buf,
const uchar key,
key_part_map  keypart_map 
)
overridevirtual

The following functions works like index_read, but it find the last row with the current key value or prefix.

See also
index_read_map().

Reimplemented from handler.

◆ index_read_map()

int ha_myisam::index_read_map ( uchar buf,
const uchar key,
key_part_map  keypart_map,
enum ha_rkey_function  find_flag 
)
overridevirtual

Positions an index cursor to the index specified in the handle ('active_index').

Fetches the row if available. If the key value is null, begin at the first key of the index.

Returns
0 if success (found a record); non-zero if no record.

Reimplemented from handler.

◆ indexes_are_disabled()

int ha_myisam::indexes_are_disabled ( void  )
overridevirtual

Check if indexes are disabled.

Return values
0Indexes are enabled.
!=0 Indexes are disabled.

Reimplemented from handler.

◆ info()

int ha_myisam::info ( uint  flag)
overridevirtual

General method to gather info from handler.

info() is used to return information to the optimizer. SHOW also makes use of this data Another note, if your handler doesn't proved exact record count, you will probably want to have the following in your code: if (records < 2) records = 2; The reason is that the server will optimize for cases of only a single record. If in a table scan you don't know the number of records it will probably be better to set records to two so you can return as many records as you need.

Along with records a few more variables you may wish to set are: records deleted data_file_length index_file_length delete_length check_time Take a look at the public variables in handler.h for more information. See also my_base.h for a full description.

Parameters
flagSpecifies what info is requested

Implements handler.

◆ is_crashed()

bool ha_myisam::is_crashed ( ) const
overridevirtual

Check if the table is crashed.

Return values
trueCrashed
falseNot crashed

Reimplemented from handler.

◆ is_index_algorithm_supported()

bool ha_myisam::is_index_algorithm_supported ( enum ha_key_alg  key_alg) const
inlineoverridevirtual

Check if SE supports specific key algorithm.

Note
This method is never used for FULLTEXT or SPATIAL keys. We rely on handler::ha_table_flags() to check if such keys are supported.

Reimplemented from handler.

◆ max_supported_key_length()

uint ha_myisam::max_supported_key_length ( void  ) const
inlineoverridevirtual

Reimplemented from handler.

◆ max_supported_key_part_length()

uint ha_myisam::max_supported_key_part_length ( HA_CREATE_INFO create_info) const
inlineoverridevirtual

Reimplemented from handler.

◆ max_supported_keys()

uint ha_myisam::max_supported_keys ( void  ) const
inlineoverridevirtual

Reimplemented from handler.

◆ multi_range_read_info()

ha_rows ha_myisam::multi_range_read_info ( uint  keyno,
uint  n_ranges,
uint  n_rows,
uint bufsz,
uint flags,
Cost_estimate cost 
)
overridevirtual

Get cost and other information about MRR scan over some sequence of ranges.

Calculate estimated cost and other information about an MRR scan for some sequence of ranges.

The ranges themselves will be known only at execution phase. When this function is called we only know number of ranges and a (rough) E(records) within those ranges.

Currently this function is only called for "n-keypart singlepoint" ranges, i.e. each range is "keypart1=someconst1 AND ... AND keypartN=someconstN"

The flags parameter is a combination of those flags: HA_MRR_SORTED, HA_MRR_INDEX_ONLY, HA_MRR_NO_ASSOCIATION, HA_MRR_LIMITS.

Parameters
keynoIndex number
n_rangesEstimated number of ranges (i.e. intervals) in the range sequence.
n_rowsEstimated total number of records contained within all of the ranges
[in,out]bufszIN: Size of the buffer available for use OUT: Size of the buffer that will be actually used, or 0 if buffer is not needed.
[in,out]flagsA combination of HA_MRR_* flags
[out]costEstimated cost of MRR access
Return values
0OK, *cost contains cost of the scan, *bufsz and *flags contain scan parameters.
otherError or can't perform the requested scan

Reimplemented from handler.

◆ multi_range_read_info_const()

ha_rows ha_myisam::multi_range_read_info_const ( uint  keyno,
RANGE_SEQ_IF seq,
void *  seq_init_param,
uint  n_ranges_arg,
uint bufsz,
uint flags,
Cost_estimate cost 
)
overridevirtual

Get cost and other information about MRR scan over a known list of ranges.

Calculate estimated cost and other information about an MRR scan for given sequence of ranges.

Parameters
keynoIndex number
seqRange sequence to be traversed
seq_init_paramFirst parameter for seq->init()
n_ranges_argNumber of ranges in the sequence, or 0 if the caller can't efficiently determine it
[in,out]bufszIN: Size of the buffer available for use OUT: Size of the buffer that is expected to be actually used, or 0 if buffer is not needed.
[in,out]flagsA combination of HA_MRR_* flags
[out]costEstimated cost of MRR access
Note
This method (or an overriding one in a derived class) must check for thd->killed and return HA_POS_ERROR if it is not zero. This is required for a user to be able to interrupt the calculation by killing the connection/query.
Return values
HA_POS_ERRORError or the engine is unable to perform the requested scan. Values of OUT parameters are undefined.
otherOK, *cost contains cost of the scan, *bufsz and *flags contain scan parameters.

Reimplemented from handler.

◆ multi_range_read_init()

int ha_myisam::multi_range_read_init ( RANGE_SEQ_IF seq,
void *  seq_init_param,
uint  n_ranges,
uint  mode,
HANDLER_BUFFER buf 
)
overridevirtual

Multi Range Read interface.

Reimplemented from handler.

◆ multi_range_read_next()

int ha_myisam::multi_range_read_next ( char **  range_info)
overridevirtual

Get next record in MRR scan.

Default MRR implementation: read the next record

Parameters
range_infoOUT Undefined if HA_MRR_NO_ASSOCIATION flag is in effect Otherwise, the opaque value associated with the range that contains the returned record.
Return values
0OK
otherError code

Reimplemented from handler.

◆ open()

int ha_myisam::open ( const char *  name,
int  mode,
uint  test_if_locked,
const dd::Table table_def 
)
overridevirtual

Implements handler.

◆ optimize()

int ha_myisam::optimize ( THD thd,
HA_CHECK_OPT check_opt 
)
overridevirtual

Reimplemented from handler.

◆ position()

void ha_myisam::position ( const uchar record)
overridevirtual

Implements handler.

◆ preload_keys()

int ha_myisam::preload_keys ( THD thd,
HA_CHECK_OPT check_opt 
)
overridevirtual

Reimplemented from handler.

◆ records_in_range()

ha_rows ha_myisam::records_in_range ( uint  inx,
key_range min_key,
key_range max_key 
)
overridevirtual

Find number of records in a range.

Given a starting key, and an ending key estimate the number of rows that will exist between the two. max_key may be empty which in case determine if start_key matches any rows. Used by optimizer to calculate cost of using a particular index.

Parameters
inxIndex number
min_keyStart of range
max_keyEnd of range
Returns
Number of rows in range.

Reimplemented from handler.

◆ rename_table()

int ha_myisam::rename_table ( const char *  from,
const char *  to,
const dd::Table from_table_def,
dd::Table to_table_def 
)
overridevirtual

Default rename_table() and delete_table() rename/delete files with a given name and extensions from handlerton::file_extensions.

These methods can be overridden, but their default implementation provide useful functionality.

Parameters
[in]fromPath for the old table name.
[in]toPath for the new table name.
[in]from_table_defOld version of definition for table being renamed (i.e. prior to rename).
[in,out]to_table_defNew version of definition for table being renamed. Storage engines which support atomic DDL (i.e. having HTON_SUPPORTS_ATOMIC_DDL flag set) are allowed to adjust this object.
Return values
>0Error.
0Success.

Reimplemented from handler.

◆ repair() [1/2]

int ha_myisam::repair ( THD ,
HA_CHECK_OPT  
)
overridevirtual

In this method check_opt can be modified to specify CHECK option to use to call check() upon the table.

Reimplemented from handler.

◆ repair() [2/2]

int ha_myisam::repair ( THD thd,
MI_CHECK param,
bool  optimize 
)
private

◆ reset()

int ha_myisam::reset ( void  )
overridevirtual

Reset state of file to after 'open'.

This function is called after every statement for all tables used by that statement.

Reimplemented from handler.

◆ rnd_end()

int ha_myisam::rnd_end ( void  )
overridevirtual

Reimplemented from handler.

◆ rnd_init()

int ha_myisam::rnd_init ( bool  scan)
overridevirtual

rnd_init() can be called two times without rnd_end() in between (it only makes sense if scan=1).

then the second call should prepare for the new table scan (e.g if rnd_init allocates the cursor, second call should position it to the start of the table, no need to deallocate and allocate it again

Implements handler.

◆ rnd_next()

int ha_myisam::rnd_next ( uchar buf)
overridevirtual
See also
index_read_map().

Implements handler.

◆ rnd_pos()

int ha_myisam::rnd_pos ( uchar buf,
uchar pos 
)
overridevirtual
See also
index_read_map().

Implements handler.

◆ start_bulk_insert()

void ha_myisam::start_bulk_insert ( ha_rows  rows)
overridevirtual

Reimplemented from handler.

◆ store_lock()

THR_LOCK_DATA ** ha_myisam::store_lock ( THD thd,
THR_LOCK_DATA **  to,
enum thr_lock_type  lock_type 
)
overridevirtual

Is not invoked for non-transactional temporary tables.

Note
store_lock() can return more than one lock if the table is MERGE or partitioned.
that one can NOT rely on table->in_use in store_lock(). It may refer to a different thread if called from mysql_lock_abort_for_thread().
If the table is MERGE, store_lock() can return less locks than lock_count() claimed. This can happen when the MERGE children are not attached when this is called from another thread.

The idea with handler::store_lock() is the following:

The statement decided which locks we should need for the table for updates/deletes/inserts we get WRITE locks, for SELECT... we get read locks.

Before adding the lock into the table lock handler (see thr_lock.c) mysqld calls store lock with the requested locks. Store lock can now modify a write lock to a read lock (or some other lock), ignore the lock (if we don't want to use MySQL table locks at all) or add locks for many tables (like we do when we are using a MERGE handler).

In some exceptional cases MySQL may send a request for a TL_IGNORE; This means that we are requesting the same lock as last time and this should also be ignored.

Called from lock.cc by get_lock_data().

Implements handler.

◆ table_flags()

ulonglong ha_myisam::table_flags ( void  ) const
inlineoverridevirtual

Implements handler.

◆ table_type()

const char * ha_myisam::table_type ( ) const
inlineoverridevirtual

The following can be called without an open handler.

Implements handler.

◆ update_create_info()

void ha_myisam::update_create_info ( HA_CREATE_INFO create_info)
overridevirtual

Update create info as part of ALTER TABLE.

Forward this handler call to the storage engine foreach partition handler. The data_file_name for each partition may need to be reset if the tablespace was moved. Use a dummy HA_CREATE_INFO structure and transfer necessary data.

Parameters
create_infoCreate info from ALTER TABLE.

Reimplemented from handler.

◆ update_row()

int ha_myisam::update_row ( const uchar old_data,
uchar new_data 
)
overridevirtual

Update a single row.

Note: If HA_ERR_FOUND_DUPP_KEY is returned, the handler must read all columns of the row so MySQL can create an error message. If the columns required for the error message are not read, the error message will contain garbage.

Reimplemented from handler.

◆ write_row()

int ha_myisam::write_row ( uchar buf)
overridevirtual

Write a row.

write_row() inserts a row. buf is a byte array of data, normally record[0].

You can use the field information to extract the data from the native byte array type.

Example of this would be: for (Field **field=table->field ; *field ; field++) { ... }

Parameters
bufBuffer to write from.
Returns
Operation status.
Return values
0Success.
!=0 Error code.

Reimplemented from handler.

Friends And Related Function Documentation

◆ index_cond_func_myisam

ICP_RESULT index_cond_func_myisam ( void *  arg)
friend

Member Data Documentation

◆ can_enable_indexes

bool ha_myisam::can_enable_indexes
private

◆ data_file_name

char* ha_myisam::data_file_name
private

◆ ds_mrr

DsMrr_impl ha_myisam::ds_mrr
private

◆ file

MI_INFO* ha_myisam::file
private

◆ index_file_name

char * ha_myisam::index_file_name
private

◆ int_table_flags

ulonglong ha_myisam::int_table_flags
private

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