MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ha_myisam Class Reference
Inheritance diagram for ha_myisam:
Collaboration diagram for ha_myisam:

Public Member Functions

 ha_myisam (handlerton *hton, TABLE_SHARE *table_arg)
handlerclone (const char *name, MEM_ROOT *mem_root)
const char * table_type () const
const char * index_type (uint key_number)
const char ** bas_ext () const
ulonglong table_flags () const
int index_init (uint idx, bool sorted)
int index_end ()
int rnd_end ()
ulong index_flags (uint inx, uint part, bool all_parts) const
uint max_supported_keys () const
uint max_supported_key_length () const
uint max_supported_key_part_length () const
uint checksum () const
int open (const char *name, int mode, uint test_if_locked)
int close (void)
int write_row (uchar *buf)
int update_row (const uchar *old_data, uchar *new_data)
int delete_row (const uchar *buf)
int index_read_map (uchar *buf, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag)
 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.
int index_read_idx_map (uchar *buf, uint index, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag)
 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.
int index_read_last_map (uchar *buf, const uchar *key, key_part_map keypart_map)
 The following functions works like index_read, but it find the last row with the current key value or prefix.
int index_next (uchar *buf)
int index_prev (uchar *buf)
int index_first (uchar *buf)
int index_last (uchar *buf)
int index_next_same (uchar *buf, const uchar *key, uint keylen)
int ft_init ()
FT_INFOft_init_ext (uint flags, uint inx, String *key)
int ft_read (uchar *buf)
int rnd_init (bool scan)
int rnd_next (uchar *buf)
int rnd_pos (uchar *buf, uchar *pos)
int restart_rnd_next (uchar *buf, uchar *pos)
void position (const uchar *record)
int info (uint)
int extra (enum ha_extra_function operation)
int extra_opt (enum ha_extra_function operation, ulong cache_size)
int reset (void)
int external_lock (THD *thd, int lock_type)
int delete_all_rows (void)
int truncate ()
int reset_auto_increment (ulonglong value)
int disable_indexes (uint mode)
int enable_indexes (uint mode)
int indexes_are_disabled (void)
void start_bulk_insert (ha_rows rows)
int end_bulk_insert ()
ha_rows records_in_range (uint inx, key_range *min_key, key_range *max_key)
void update_create_info (HA_CREATE_INFO *create_info)
int create (const char *name, TABLE *form, HA_CREATE_INFO *create_info)
THR_LOCK_DATA ** store_lock (THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type)
virtual void get_auto_increment (ulonglong offset, ulonglong increment, ulonglong nb_desired_values, ulonglong *first_value, ulonglong *nb_reserved_values)
int rename_table (const char *from, const char *to)
int delete_table (const char *name)
int check (THD *thd, HA_CHECK_OPT *check_opt)
int analyze (THD *thd, HA_CHECK_OPT *check_opt)
int repair (THD *thd, HA_CHECK_OPT *check_opt)
bool check_and_repair (THD *thd)
bool is_crashed () const
bool auto_repair () const
int optimize (THD *thd, HA_CHECK_OPT *check_opt)
int assign_to_keycache (THD *thd, HA_CHECK_OPT *check_opt)
int preload_keys (THD *thd, HA_CHECK_OPT *check_opt)
bool check_if_incompatible_data (HA_CREATE_INFO *info, uint table_changes)
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)
int multi_range_read_next (char **range_info)
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)
ha_rows multi_range_read_info (uint keyno, uint n_ranges, uint keys, uint *bufsz, uint *flags, Cost_estimate *cost)
Itemidx_cond_push (uint keyno, Item *idx_cond)
- Public Member Functions inherited from handler
virtual void unbind_psi ()
virtual void rebind_psi ()
 handler (handlerton *ht_arg, TABLE_SHARE *share_arg)
void init ()
int ha_open (TABLE *table, const char *name, int mode, int test_if_locked)
 Open database-handler.
int ha_close (void)
int ha_index_init (uint idx, bool sorted)
int ha_index_end ()
int ha_rnd_init (bool scan)
int ha_rnd_end ()
int ha_rnd_next (uchar *buf)
int ha_rnd_pos (uchar *buf, uchar *pos)
int ha_index_read_map (uchar *buf, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag)
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)
int ha_index_next (uchar *buf)
int ha_index_prev (uchar *buf)
int ha_index_first (uchar *buf)
int ha_index_last (uchar *buf)
int ha_index_next_same (uchar *buf, const uchar *key, uint keylen)
int ha_index_read (uchar *buf, const uchar *key, uint key_len, enum ha_rkey_function find_flag)
int ha_index_read_last (uchar *buf, const uchar *key, uint key_len)
int ha_reset ()
 Check handler usage and reset state of file to after 'open'.
int ha_index_or_rnd_end ()
Table_flags ha_table_flags () const
int ha_external_lock (THD *thd, int lock_type)
int ha_write_row (uchar *buf)
int ha_update_row (const uchar *old_data, uchar *new_data)
int ha_delete_row (const uchar *buf)
void ha_release_auto_increment ()
int check_collation_compatibility ()
int ha_check_for_upgrade (HA_CHECK_OPT *check_opt)
int ha_check (THD *thd, HA_CHECK_OPT *check_opt)
int ha_repair (THD *thd, HA_CHECK_OPT *check_opt)
void ha_start_bulk_insert (ha_rows rows)
int ha_end_bulk_insert ()
int ha_bulk_update_row (const uchar *old_data, uchar *new_data, uint *dup_key_found)
int ha_delete_all_rows ()
int ha_truncate ()
int ha_reset_auto_increment (ulonglong value)
int ha_optimize (THD *thd, HA_CHECK_OPT *check_opt)
int ha_analyze (THD *thd, HA_CHECK_OPT *check_opt)
bool ha_check_and_repair (THD *thd)
int ha_disable_indexes (uint mode)
int ha_enable_indexes (uint mode)
int ha_discard_or_import_tablespace (my_bool discard)
int ha_rename_table (const char *from, const char *to)
int ha_delete_table (const char *name)
void ha_drop_table (const char *name)
int ha_create (const char *name, TABLE *form, HA_CREATE_INFO *info)
int ha_create_handler_files (const char *name, const char *old_name, int action_flag, HA_CREATE_INFO *info)
int ha_change_partitions (HA_CREATE_INFO *create_info, const char *path, ulonglong *const copied, ulonglong *const deleted, const uchar *pack_frm_data, size_t pack_frm_len)
int ha_drop_partitions (const char *path)
int ha_rename_partitions (const char *path)
void adjust_next_insert_id_after_explicit_value (ulonglong nr)
int update_auto_increment ()
virtual void print_error (int error, myf errflag)
virtual bool get_error_message (int error, String *buf)
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)
virtual void change_table_ptr (TABLE *table_arg, TABLE_SHARE *share)
virtual double scan_time ()
virtual double read_time (uint index, uint ranges, ha_rows rows)
virtual double index_only_read_time (uint keynr, double records)
virtual longlong get_memory_buffer_size () const
virtual const key_mapkeys_to_use_for_scanning ()
bool has_transactions ()
virtual uint extra_rec_buf_length () const
virtual bool is_fatal_error (int error, uint flags)
virtual ha_rows records ()
virtual ha_rows estimate_rows_upper_bound ()
virtual enum row_type get_row_type () const
virtual void column_bitmaps_signal ()
 MySQL signal that it changed the column bitmap.
uint get_index (void) const
virtual bool start_bulk_update ()
virtual bool start_bulk_delete ()
virtual int exec_bulk_update (uint *dup_key_found)
virtual void end_bulk_update ()
virtual int end_bulk_delete ()
virtual int read_range_first (const key_range *start_key, const key_range *end_key, bool eq_range, bool sorted)
 Read first row between two ranges. Store ranges for future calls to read_range_next.
virtual int read_range_next ()
 Read next row between two endpoints.
void set_end_range (const key_range *range, enum_range_scan_direction direction)
int compare_key (key_range *range)
int compare_key_icp (const key_range *range) const
void ft_end ()
virtual int rnd_pos_by_record (uchar *record)
virtual int read_first_row (uchar *buf, uint primary_key)
virtual int rnd_same (uchar *buf, uint inx)
virtual void get_dynamic_partition_info (PARTITION_STATS *stat_info, uint part_id)
virtual uint32 calculate_key_hash_value (Field **field_array)
virtual bool start_read_removal (void)
virtual ha_rows end_read_removal (void)
virtual bool was_semi_consistent_read ()
virtual void try_semi_consistent_read (bool)
virtual void unlock_row ()
virtual int start_stmt (THD *thd, thr_lock_type lock_type)
void set_next_insert_id (ulonglong id)
void restore_auto_increment (ulonglong prev_insert_id)
int check_old_types ()
virtual char * update_table_comment (const char *comment)
virtual void append_create_info (String *packet)
virtual bool is_fk_defined_on_table_or_index (uint index)
virtual char * get_foreign_key_create_info ()
virtual bool can_switch_engines ()
virtual int get_foreign_key_list (THD *thd, List< FOREIGN_KEY_INFO > *f_key_list)
virtual int get_parent_foreign_key_list (THD *thd, List< FOREIGN_KEY_INFO > *f_key_list)
virtual uint referenced_by_foreign_key ()
virtual void init_table_handle_for_HANDLER ()
virtual void free_foreign_key_create_info (char *str)
virtual int get_default_no_partitions (HA_CREATE_INFO *info)
virtual void set_auto_partitions (partition_info *part_info)
virtual bool get_no_parts (const char *name, uint *no_parts)
virtual void set_part_info (partition_info *part_info, bool early)
uint max_record_length () const
uint max_keys () const
uint max_key_parts () const
uint max_key_length () const
uint max_key_part_length () 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
virtual uint8 table_cache_type ()
virtual my_bool register_query_cache_table (THD *thd, char *table_key, uint key_length, qc_engine_callback *engine_callback, ulonglong *engine_data)
 Register a named table with a call back function to the query cache.
virtual bool primary_key_is_clustered ()
virtual int cmp_ref (const uchar *ref1, const uchar *ref2)
virtual const Itemcond_push (const Item *cond)
virtual void cond_pop ()
virtual void cancel_pushed_idx_cond ()
virtual uint number_of_pushed_joins () const
virtual const TABLEroot_of_pushed_join () const
virtual const TABLEparent_of_pushed_join () const
virtual int index_read_pushed (uchar *buf, const uchar *key, key_part_map keypart_map)
virtual int index_next_pushed (uchar *buf)
virtual enum_alter_inplace_result check_if_supported_inplace_alter (TABLE *altered_table, Alter_inplace_info *ha_alter_info)
bool ha_prepare_inplace_alter_table (TABLE *altered_table, Alter_inplace_info *ha_alter_info)
bool ha_inplace_alter_table (TABLE *altered_table, Alter_inplace_info *ha_alter_info)
bool ha_commit_inplace_alter_table (TABLE *altered_table, Alter_inplace_info *ha_alter_info, bool commit)
void ha_notify_table_changed ()
virtual void use_hidden_primary_key ()
virtual uint alter_table_flags (uint flags)
virtual int bulk_update_row (const uchar *old_data, uchar *new_data, uint *dup_key_found)
virtual int discard_or_import_tablespace (my_bool discard)
virtual void drop_table (const char *name)
virtual int create_handler_files (const char *name, const char *old_name, int action_flag, HA_CREATE_INFO *info)
virtual int change_partitions (HA_CREATE_INFO *create_info, const char *path, ulonglong *const copied, ulonglong *const deleted, const uchar *pack_frm_data, size_t pack_frm_len)
virtual int drop_partitions (const char *path)
virtual int rename_partitions (const char *path)
virtual bool set_ha_share_ref (Handler_share **arg_ha_share)
int get_lock_type () const

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 }
typedef ulonglong Table_flags
- Static Public Member Functions inherited from Sql_alloc
static void * operator new (size_t size) throw ()
static void * operator new[] (size_t size) throw ()
static void * operator new[] (size_t size, MEM_ROOT *mem_root) throw ()
static void * operator new (size_t size, MEM_ROOT *mem_root) throw ()
static void operator delete (void *ptr, size_t size)
static void operator delete (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, size_t size)
- Public Attributes inherited from handler
handlertonht
uchar * ref
uchar * dup_ref
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
uint errkey
uint key_used_on_scan
uint active_index
uint ref_length
FT_INFOft_handler
enum handler:: { ... }  inited
bool implicit_emptied
const Itempushed_cond
Itempushed_idx_cond
uint pushed_idx_cond_keyno
ulonglong next_insert_id
ulonglong insert_id_for_cur_row
Discrete_interval auto_inc_interval_for_cur_row
uint auto_inc_intervals_count
PSI_table * m_psi
- Protected Member Functions inherited from handler
virtual bool prepare_inplace_alter_table (TABLE *altered_table, Alter_inplace_info *ha_alter_info)
virtual bool inplace_alter_table (TABLE *altered_table, Alter_inplace_info *ha_alter_info)
virtual bool commit_inplace_alter_table (TABLE *altered_table, Alter_inplace_info *ha_alter_info, bool commit)
virtual void notify_table_changed ()
void ha_statistic_increment (ulonglong SSV::*offset) const
void ** ha_data (THD *) const
THD * ha_thd (void) const
PSI_table_share * ha_table_share_psi (const TABLE_SHARE *share) const
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 ()
void set_ha_share_ptr (Handler_share *arg_ha_share)
void lock_shared_ha_data ()
void unlock_shared_ha_data ()
- Protected Attributes inherited from handler
TABLE_SHAREtable_share
TABLEtable
Table_flags cached_table_flags
ha_rows estimation_rows_to_insert
KEY_PART_INFOrange_key_part
bool eq_range
bool in_range_check_pushed_down

Detailed Description

Definition at line 42 of file ha_myisam.h.

Member Function Documentation

const char ** ha_myisam::bas_ext ( ) const
virtual

If frm_error() is called then we will use this to find out what file extentions exist for the storage engine. This is also used by the default rename_table and delete_table method 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.

Implements handler.

Definition at line 668 of file ha_myisam.cc.

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

Part of old, deprecated in-place ALTER API.

Reimplemented from handler.

Definition at line 2132 of file ha_myisam.cc.

int ha_myisam::delete_all_rows ( void  )
virtual

This is called to delete all rows in a table 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.

Definition at line 1890 of file ha_myisam.cc.

Here is the caller graph for this function:

int ha_myisam::delete_table ( const char *  name)
virtual

Delete a table in the engine. Called for base as well as temporary tables.

Delete all files with extension from bas_ext().

Parameters
nameBase name of table
Note
We assume that the handler may return more extensions than was actually used for the file.
Return values
0If we successfully deleted at least one file from base_ext and didn't get any other errors than ENOENT
!0Error

Reimplemented from handler.

Definition at line 1913 of file ha_myisam.cc.

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

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 ULONGLONG_MAX it means an error. If the function sets *nb_reserved_values to ULONGLONG_MAX it means it has reserved to "positive infinite".

Reimplemented from handler.

Definition at line 2030 of file ha_myisam.cc.

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

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.

Definition at line 2231 of file ha_myisam.cc.

int ha_myisam::index_first ( uchar *  buf)
virtual
Returns
See Also
index_read_map().

Reimplemented from handler.

Definition at line 1706 of file ha_myisam.cc.

int ha_myisam::index_last ( uchar *  buf)
virtual
Returns
See Also
index_read_map().

Reimplemented from handler.

Definition at line 1717 of file ha_myisam.cc.

int ha_myisam::index_next ( uchar *  buf)
virtual
Returns
See Also
index_read_map().

Reimplemented from handler.

Definition at line 1684 of file ha_myisam.cc.

int ha_myisam::index_next_same ( uchar *  buf,
const uchar *  key,
uint  keylen 
)
virtual
Returns
See Also
index_read_map().

Reimplemented from handler.

Definition at line 1728 of file ha_myisam.cc.

int ha_myisam::index_prev ( uchar *  buf)
virtual
Returns
See Also
index_read_map().

Reimplemented from handler.

Definition at line 1695 of file ha_myisam.cc.

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 
)
virtual

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.

Returns
See Also
index_read_map().

Reimplemented from handler.

Definition at line 1656 of file ha_myisam.cc.

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

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

Returns
See Also
index_read_map().

Reimplemented from handler.

Definition at line 1670 of file ha_myisam.cc.

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

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, and function has set table->status to 0); non-zero if no record (function has set table->status to STATUS_NOT_FOUND).

Reimplemented from handler.

Definition at line 1643 of file ha_myisam.cc.

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

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
bufszINOUT IN: Size of the buffer available for use OUT: Size of the buffer that will be actually used, or 0 if buffer is not needed.
flagsINOUT A combination of HA_MRR_* flags
costOUT Estimated 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.

Definition at line 2217 of file ha_myisam.cc.

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 
)
virtual

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
bufszINOUT IN: 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.
flagsINOUT A combination of HA_MRR_* flags
costOUT Estimated 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.

Definition at line 2202 of file ha_myisam.cc.

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

Multi Range Read interface

Reimplemented from handler.

Definition at line 2190 of file ha_myisam.cc.

Here is the call graph for this function:

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

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.

Definition at line 2197 of file ha_myisam.cc.

int ha_myisam::rename_table ( const char *  from,
const char *  to 
)
virtual

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

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

Reimplemented from handler.

Definition at line 2024 of file ha_myisam.cc.

int ha_myisam::repair ( THD *  thd,
HA_CHECK_OPT check_opt 
)
virtual

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

Reimplemented from handler.

Definition at line 954 of file ha_myisam.cc.

int ha_myisam::reset ( void  )
virtual

Reset state of file to after 'open'. This function is called after every statement for all tables used by that statement.

Reimplemented from handler.

Definition at line 1873 of file ha_myisam.cc.

Here is the call graph for this function:

int ha_myisam::reset_auto_increment ( ulonglong  value)
virtual

Reset the auto-increment counter to the given value, i.e. the next row inserted will get the given value. HA_ERR_WRONG_COMMAND is returned by storage engines that don't support this operation.

Reimplemented from handler.

Definition at line 1907 of file ha_myisam.cc.

Here is the caller graph for this function:

int ha_myisam::restart_rnd_next ( uchar *  buf,
uchar *  pos 
)
virtual

The following function is only needed for tables that may be temporary tables during joins.

Reimplemented from handler.

Definition at line 1764 of file ha_myisam.cc.

Here is the call graph for this function:

int ha_myisam::rnd_init ( bool  scan)
virtual

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.

Definition at line 1746 of file ha_myisam.cc.

int ha_myisam::rnd_next ( uchar *  buf)
virtual
Returns
See Also
index_read_map().

Implements handler.

Definition at line 1753 of file ha_myisam.cc.

int ha_myisam::rnd_pos ( uchar *  buf,
uchar *  pos 
)
virtual
Returns
See Also
index_read_map().

Implements handler.

Definition at line 1769 of file ha_myisam.cc.

Here is the caller graph for this function:

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

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.

Implements handler.

Definition at line 1927 of file ha_myisam.cc.

const char* ha_myisam::table_type ( ) const
inlinevirtual

The following can be called without an open handler

Implements handler.

Definition at line 54 of file ha_myisam.h.

int ha_myisam::truncate ( )
virtual

Quickly remove all rows from a table.

Remarks
This method is responsible for implementing MySQL's TRUNCATE TABLE statement, which is a DDL operation. As such, a engine can bypass certain integrity checks and in some cases avoid fine-grained locking (e.g. row locks) which would normally be required for a DELETE statement.
Typically, truncate is not used if it can result in integrity violation. For example, truncate is not used when a foreign key references the table, but it might be used if foreign key checks are disabled.
Engine is responsible for resetting the auto-increment counter.
The table is locked in exclusive mode.

Reimplemented from handler.

Definition at line 1901 of file ha_myisam.cc.

Here is the call graph for this function:


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