The world's most popular open source database
#include <handler.h>
Inheritance diagram for handler:


Public Types | |
| NONE = 0 | |
| INDEX | |
| RND | |
| enum | { NONE = 0, INDEX, RND } |
Public Member Functions | |
| handler (const handlerton *ht_arg, TABLE_SHARE *share_arg) | |
| virtual | ~handler (void) |
| void | init () |
| virtual bool | check_if_locking_is_allowed (uint sql_command, ulong type, TABLE *table, uint count, bool called_by_logger_thread) |
| bool | check_if_log_table_locking_is_allowed (uint sql_command, ulong type, TABLE *table) |
| int | ha_open (TABLE *table, const char *name, int mode, int test_if_locked) |
| void | adjust_next_insert_id_after_explicit_value (ulonglong nr) |
| bool | update_auto_increment () |
| void | print_keydup_error (uint key_nr, const char *msg) |
| virtual void | print_error (int error, myf errflag) |
| virtual bool | get_error_message (int error, String *buf) |
| uint | get_dup_key (int error) |
| 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 const key_map * | keys_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 const char * | index_type (uint key_number) |
| int | ha_index_init (uint idx, bool sorted) |
| int | ha_index_end () |
| int | ha_rnd_init (bool scan) |
| int | ha_rnd_end () |
| int | ha_reset () |
| int | ha_index_or_rnd_end () |
| longlong | ha_table_flags () |
| virtual void | column_bitmaps_signal () |
| uint | get_index (void) const |
| virtual int | open (const char *name, int mode, uint test_if_locked)=0 |
| virtual int | close (void)=0 |
| int | ha_external_lock (THD *thd, int lock_type) |
| int | ha_write_row (byte *buf) |
| int | ha_update_row (const byte *old_data, byte *new_data) |
| int | ha_delete_row (const byte *buf) |
| virtual bool | start_bulk_update () |
| virtual bool | start_bulk_delete () |
| virtual int | bulk_update_row (const byte *old_data, byte *new_data, uint *dup_key_found) |
| virtual int | exec_bulk_update (uint *dup_key_found) |
| virtual void | end_bulk_update () |
| virtual int | end_bulk_delete () |
| virtual int | index_read (byte *buf, const byte *key, uint key_len, enum ha_rkey_function find_flag) |
| virtual int | index_read_idx (byte *buf, uint index, const byte *key, uint key_len, enum ha_rkey_function find_flag) |
| virtual int | index_next (byte *buf) |
| virtual int | index_prev (byte *buf) |
| virtual int | index_first (byte *buf) |
| virtual int | index_last (byte *buf) |
| virtual int | index_next_same (byte *buf, const byte *key, uint keylen) |
| virtual int | index_read_last (byte *buf, const byte *key, uint key_len) |
| virtual int | read_multi_range_first (KEY_MULTI_RANGE **found_range_p, KEY_MULTI_RANGE *ranges, uint range_count, bool sorted, HANDLER_BUFFER *buffer) |
| virtual int | read_multi_range_next (KEY_MULTI_RANGE **found_range_p) |
| virtual int | read_range_first (const key_range *start_key, const key_range *end_key, bool eq_range, bool sorted) |
| virtual int | read_range_next () |
| int | compare_key (key_range *range) |
| virtual int | ft_init () |
| void | ft_end () |
| virtual FT_INFO * | ft_init_ext (uint flags, uint inx, String *key) |
| virtual int | ft_read (byte *buf) |
| virtual int | rnd_next (byte *buf)=0 |
| virtual int | rnd_pos (byte *buf, byte *pos)=0 |
| virtual int | read_first_row (byte *buf, uint primary_key) |
| virtual int | restart_rnd_next (byte *buf, byte *pos) |
| virtual int | rnd_same (byte *buf, uint inx) |
| virtual ha_rows | records_in_range (uint inx, key_range *min_key, key_range *max_key) |
| virtual void | position (const byte *record)=0 |
| virtual void | info (uint)=0 |
| virtual void | get_dynamic_partition_info (PARTITION_INFO *stat_info, uint part_id) |
| virtual int | extra (enum ha_extra_function operation) |
| virtual int | extra_opt (enum ha_extra_function operation, ulong cache_size) |
| virtual int | reset () |
| 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) |
| virtual int | delete_all_rows () |
| virtual void | get_auto_increment (ulonglong offset, ulonglong increment, ulonglong nb_desired_values, ulonglong *first_value, ulonglong *nb_reserved_values) |
| void | ha_release_auto_increment () |
| void | set_next_insert_id (ulonglong id) |
| void | restore_auto_increment (ulonglong prev_insert_id) |
| virtual int | reset_auto_increment (ulonglong value) |
| virtual void | update_create_info (HA_CREATE_INFO *create_info) |
| int | ha_check_for_upgrade (HA_CHECK_OPT *check_opt) |
| int | check_old_types () |
| int | ha_check (THD *thd, HA_CHECK_OPT *check_opt) |
| virtual int | backup (THD *thd, HA_CHECK_OPT *check_opt) |
| virtual int | restore (THD *thd, HA_CHECK_OPT *check_opt) |
| int | ha_repair (THD *thd, HA_CHECK_OPT *check_opt) |
| virtual int | optimize (THD *thd, HA_CHECK_OPT *check_opt) |
| virtual int | analyze (THD *thd, HA_CHECK_OPT *check_opt) |
| virtual int | assign_to_keycache (THD *thd, HA_CHECK_OPT *check_opt) |
| virtual int | preload_keys (THD *thd, HA_CHECK_OPT *check_opt) |
| virtual bool | check_and_repair (THD *thd) |
| virtual int | dump (THD *thd, int fd=-1) |
| virtual int | disable_indexes (uint mode) |
| virtual int | enable_indexes (uint mode) |
| virtual int | indexes_are_disabled (void) |
| void | ha_start_bulk_insert (ha_rows rows) |
| int | ha_end_bulk_insert () |
| virtual int | discard_or_import_tablespace (my_bool discard) |
| virtual int | net_read_dump (NET *net) |
| 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 char * | get_tablespace_name (THD *thd) |
| virtual bool | can_switch_engines () |
| virtual int | get_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 const char * | table_type () const =0 |
| virtual const char ** | bas_ext () const =0 |
| 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) |
| virtual ulong | index_flags (uint idx, uint part, bool all_parts) const =0 |
| virtual void | prepare_for_alter () |
| virtual int | add_index (TABLE *table_arg, KEY *key_info, uint num_of_keys) |
| virtual int | prepare_drop_index (TABLE *table_arg, uint *key_num, uint num_of_keys) |
| virtual int | final_drop_index (TABLE *table_arg) |
| 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_keys () const |
| virtual uint | max_supported_key_parts () const |
| virtual uint | max_supported_key_length () const |
| virtual uint | max_supported_key_part_length () const |
| virtual uint | min_record_length (uint options) const |
| virtual bool | low_byte_first () const |
| virtual uint | checksum () const |
| virtual bool | is_crashed () const |
| virtual bool | auto_repair () const |
| virtual int | rename_table (const char *from, const char *to) |
| virtual int | delete_table (const char *name) |
| virtual void | drop_table (const char *name) |
| virtual int | create (const char *name, TABLE *form, HA_CREATE_INFO *info)=0 |
| 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 *copied, ulonglong *deleted, const void *pack_frm_data, uint pack_frm_len) |
| virtual int | drop_partitions (const char *path) |
| virtual int | rename_partitions (const char *path) |
| virtual int | optimize_partitions (THD *thd) |
| virtual int | analyze_partitions (THD *thd) |
| virtual int | check_partitions (THD *thd) |
| virtual int | repair_partitions (THD *thd) |
| virtual uint | lock_count (void) const |
| virtual THR_LOCK_DATA ** | store_lock (THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type)=0 |
| 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) |
| virtual bool | primary_key_is_clustered () |
| virtual int | cmp_ref (const byte *ref1, const byte *ref2) |
| virtual const COND * | cond_push (const COND *cond) |
| virtual void | cond_pop () |
| virtual bool | check_if_incompatible_data (HA_CREATE_INFO *create_info, uint table_changes) |
| virtual int | write_row (byte *buf __attribute__((unused))) |
| virtual int | update_row (const byte *old_data __attribute__((unused)), byte *new_data __attribute__((unused))) |
| virtual int | delete_row (const byte *buf __attribute__((unused))) |
| virtual void | use_hidden_primary_key () |
Public Attributes | |
| const handlerton * | ht |
| byte * | ref |
| byte * | dup_ref |
| ha_statistics | stats |
| bool | multi_range_sorted |
| KEY_MULTI_RANGE * | multi_range_curr |
| KEY_MULTI_RANGE * | multi_range_end |
| HANDLER_BUFFER * | multi_range_buffer |
| key_range | save_end_range |
| key_range * | end_range |
| KEY_PART_INFO * | range_key_part |
| int | key_compare_result_on_equal |
| bool | eq_range |
| uint | errkey |
| uint | key_used_on_scan |
| uint | active_index |
| uint | ref_length |
| FT_INFO * | ft_handler |
| enum handler:: { ... } | inited |
| bool | implicit_emptied |
| const COND * | pushed_cond |
| ulonglong | next_insert_id |
| ulonglong | insert_id_for_cur_row |
| Discrete_interval | auto_inc_interval_for_cur_row |
Protected Member Functions | |
| virtual int | index_init (uint idx, bool sorted) |
| virtual int | index_end () |
| virtual int | rnd_init (bool scan)=0 |
| virtual int | rnd_end () |
| virtual ulonglong | table_flags (void) const =0 |
| void | ha_statistic_increment (ulong SSV::*offset) const |
| virtual void | start_bulk_insert (ha_rows rows) |
| virtual int | end_bulk_insert () |
| virtual int | check (THD *thd, HA_CHECK_OPT *check_opt) |
| virtual int | check_for_upgrade (HA_CHECK_OPT *check_opt) |
| virtual int | repair (THD *thd, HA_CHECK_OPT *check_opt) |
Protected Attributes | |
| st_table_share * | table_share |
| st_table * | table |
| ulonglong | cached_table_flags |
| ha_rows | estimation_rows_to_insert |
Private Member Functions | |
| virtual void | release_auto_increment () |
| virtual int | external_lock (THD *thd __attribute__((unused)), int lock_type __attribute__((unused))) |
Friends | |
| class | ha_partition |
Definition at line 857 of file handler.h.
| anonymous enum |
| handler::handler | ( | const handlerton * | ht_arg, | |
| TABLE_SHARE * | share_arg | |||
| ) | [inline] |
Definition at line 934 of file handler.h.
00935 :table_share(share_arg), estimation_rows_to_insert(0), ht(ht_arg), 00936 ref(0), key_used_on_scan(MAX_KEY), active_index(MAX_KEY), 00937 ref_length(sizeof(my_off_t)), 00938 ft_handler(0), inited(NONE), implicit_emptied(0), 00939 pushed_cond(NULL), next_insert_id(0), insert_id_for_cur_row(0) 00940 {}
| virtual handler::~handler | ( | void | ) | [inline, virtual] |
| virtual int handler::add_index | ( | TABLE * | table_arg, | |
| KEY * | key_info, | |||
| uint | num_of_keys | |||
| ) | [inline, virtual] |
Reimplemented in ha_ndbcluster.
Definition at line 1416 of file handler.h.
References HA_ERR_WRONG_COMMAND.
01417 { return (HA_ERR_WRONG_COMMAND); }
| void handler::adjust_next_insert_id_after_explicit_value | ( | ulonglong | nr | ) |
Definition at line 1569 of file handler.cc.
References compute_next_insert_id(), st_table::in_use, next_insert_id, set_next_insert_id(), and table.
Referenced by update_auto_increment(), and write_record().
01570 { 01571 /* 01572 If we have set THD::next_insert_id previously and plan to insert an 01573 explicitely-specified value larger than this, we need to increase 01574 THD::next_insert_id to be greater than the explicit value. 01575 */ 01576 if ((next_insert_id > 0) && (nr >= next_insert_id)) 01577 set_next_insert_id(compute_next_insert_id(nr, &table->in_use->variables)); 01578 }
Here is the call graph for this function:

Here is the caller graph for this function:

| virtual int handler::analyze | ( | THD * | thd, | |
| HA_CHECK_OPT * | check_opt | |||
| ) | [inline, virtual] |
Reimplemented in ha_innobase, ha_myisam, and ha_partition.
Definition at line 1343 of file handler.h.
References HA_ADMIN_NOT_IMPLEMENTED.
Referenced by mysql_admin_table(), and mysql_analyze_table().
01344 { return HA_ADMIN_NOT_IMPLEMENTED; }
Here is the caller graph for this function:

| virtual int handler::analyze_partitions | ( | THD * | thd | ) | [inline, virtual] |
Reimplemented in ha_partition.
Definition at line 1479 of file handler.h.
References HA_ERR_WRONG_COMMAND.
01480 { return HA_ERR_WRONG_COMMAND; }
| virtual void handler::append_create_info | ( | String * | packet | ) | [inline, virtual] |
Reimplemented in ha_myisammrg.
Definition at line 1371 of file handler.h.
Referenced by store_create_info().
Here is the caller graph for this function:

| virtual int handler::assign_to_keycache | ( | THD * | thd, | |
| HA_CHECK_OPT * | check_opt | |||
| ) | [inline, virtual] |
Reimplemented in ha_myisam.
Definition at line 1345 of file handler.h.
References HA_ADMIN_NOT_IMPLEMENTED.
Referenced by mysql_assign_to_keycache().
01346 { return HA_ADMIN_NOT_IMPLEMENTED; }
Here is the caller graph for this function:

| virtual bool handler::auto_repair | ( | ) | const [inline, virtual] |
| virtual int handler::backup | ( | THD * | thd, | |
| HA_CHECK_OPT * | check_opt | |||
| ) | [inline, virtual] |
Reimplemented in ha_myisam.
Definition at line 1328 of file handler.h.
References HA_ADMIN_NOT_IMPLEMENTED.
Referenced by mysql_backup_table().
01329 { return HA_ADMIN_NOT_IMPLEMENTED; }
Here is the caller graph for this function:

| virtual const char** handler::bas_ext | ( | ) | const [pure virtual] |
Implemented in ha_federated, ha_heap, ha_innobase, ha_myisam, ha_myisammrg, ha_ndbcluster, ha_partition, ha_archive, ha_blackhole, ha_tina, and ha_example.
Referenced by delete_table(), open_table_error(), prepare_for_repair(), and rename_table().
Here is the caller graph for this function:

| virtual int handler::bulk_update_row | ( | const byte * | old_data, | |
| byte * | new_data, | |||
| uint * | dup_key_found | |||
| ) | [inline, virtual] |
Definition at line 1133 of file handler.h.
References DBUG_ASSERT, FALSE, and HA_ERR_WRONG_COMMAND.
01135 { 01136 DBUG_ASSERT(FALSE); 01137 return HA_ERR_WRONG_COMMAND; 01138 }
| virtual bool handler::can_switch_engines | ( | ) | [inline, virtual] |
Reimplemented in ha_innobase, and ha_partition.
Definition at line 1391 of file handler.h.
Referenced by mysql_alter_table().
Here is the caller graph for this function:

| virtual int handler::change_partitions | ( | HA_CREATE_INFO * | create_info, | |
| const char * | path, | |||
| ulonglong * | copied, | |||
| ulonglong * | deleted, | |||
| const void * | pack_frm_data, | |||
| uint | pack_frm_len | |||
| ) | [inline, virtual] |
Reimplemented in ha_partition.
Definition at line 1466 of file handler.h.
References HA_ERR_WRONG_COMMAND.
01472 { return HA_ERR_WRONG_COMMAND; }
| void handler::change_table_ptr | ( | TABLE * | table_arg, | |
| TABLE_SHARE * | share | |||
| ) | [inline] |
Definition at line 986 of file handler.h.
References table, and table_share.
Referenced by create_myisam_from_heap(), and reopen_table().
00987 { 00988 table= table_arg; 00989 table_share= share; 00990 }
Here is the caller graph for this function:

| virtual int handler::check | ( | THD * | thd, | |
| HA_CHECK_OPT * | check_opt | |||
| ) | [inline, protected, virtual] |
Reimplemented in ha_innobase, ha_myisam, ha_partition, ha_archive, and ha_tina.
Definition at line 1312 of file handler.h.
References HA_ADMIN_NOT_IMPLEMENTED.
Referenced by ha_check().
01313 { return HA_ADMIN_NOT_IMPLEMENTED; }
Here is the caller graph for this function:

| virtual bool handler::check_and_repair | ( | THD * | thd | ) | [inline, virtual] |
Reimplemented in ha_myisam, ha_archive, and ha_tina.
Definition at line 1351 of file handler.h.
References HA_ERR_WRONG_COMMAND.
01351 { return HA_ERR_WRONG_COMMAND; }
| virtual int handler::check_for_upgrade | ( | HA_CHECK_OPT * | check_opt | ) | [inline, protected, virtual] |
Definition at line 1320 of file handler.h.
Referenced by ha_check_for_upgrade().
Here is the caller graph for this function:


