#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:

| virtual bool handler::check_if_incompatible_data | ( | HA_CREATE_INFO * | create_info, | |
| uint | table_changes | |||
| ) | [inline, virtual] |
Reimplemented in ha_heap, ha_innobase, ha_myisam, ha_myisammrg, ha_ndbcluster, and ha_tina.
Definition at line 1550 of file handler.h.
References COMPATIBLE_DATA_NO.
01552 { return COMPATIBLE_DATA_NO; }
Definition at line 1426 of file handler.cc.
References ER_CANT_READ_LOCK_LOG_TABLE, ER_CANT_WRITE_LOCK_LOG_TABLE, FALSE, st_reginfo::lock_type, st_table_share::log_table, my_error(), MYF, REFRESH_LOG, st_table::reginfo, st_table::s, SQLCOM_ALTER_TABLE, SQLCOM_FLUSH, SQLCOM_TRUNCATE, table, TL_READ_NO_INSERT, and TRUE.
Referenced by ha_tina::check_if_locking_is_allowed(), and ha_myisam::check_if_locking_is_allowed().
01428 { 01429 /* 01430 Deny locking of the log tables, which is incompatible with 01431 concurrent insert. Unless called from a logger THD: 01432 general_log_thd or slow_log_thd. 01433 */ 01434 if (table->s->log_table && 01435 sql_command != SQLCOM_TRUNCATE && 01436 sql_command != SQLCOM_ALTER_TABLE && 01437 !(sql_command == SQLCOM_FLUSH && 01438 type & REFRESH_LOG) && 01439 (table->reginfo.lock_type >= TL_READ_NO_INSERT)) 01440 { 01441 /* 01442 The check >= TL_READ_NO_INSERT denies all write locks 01443 plus the only read lock (TL_READ_NO_INSERT itself) 01444 */ 01445 table->reginfo.lock_type == TL_READ_NO_INSERT ? 01446 my_error(ER_CANT_READ_LOCK_LOG_TABLE, MYF(0)) : 01447 my_error(ER_CANT_WRITE_LOCK_LOG_TABLE, MYF(0)); 01448 return FALSE; 01449 } 01450 return TRUE; 01451 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int handler::check_old_types | ( | ) |
Definition at line 2222 of file handler.cc.
References st_table::field, FIELD_TYPE_NEWDECIMAL, HA_ADMIN_NEEDS_ALTER, st_table_share::mysql_version, st_table::s, and table.
Referenced by ha_check(), and mysql_admin_table().
02223 { 02224 Field** field; 02225 02226 if (!table->s->mysql_version) 02227 { 02228 /* check for bad DECIMAL field */ 02229 for (field= table->field; (*field); field++) 02230 { 02231 if ((*field)->type() == FIELD_TYPE_NEWDECIMAL) 02232 { 02233 return HA_ADMIN_NEEDS_ALTER; 02234 } 02235 } 02236 } 02237 return 0; 02238 }
Here is the caller graph for this function:

| virtual int handler::check_partitions | ( | THD * | thd | ) | [inline, virtual] |
Reimplemented in ha_partition.
Definition at line 1481 of file handler.h.
References HA_ERR_WRONG_COMMAND.
01482 { return HA_ERR_WRONG_COMMAND; }
| virtual uint handler::checksum | ( | ) | const [inline, virtual] |
Reimplemented in ha_myisam.
Definition at line 1443 of file handler.h.
Referenced by get_dynamic_partition_info(), get_schema_tables_record(), and mysql_checksum_table().
Here is the caller graph for this function:

| virtual int handler::close | ( | void | ) | [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 close_handle_and_leave_table_as_lock(), create_myisam_from_heap(), drop_locked_tables(), drop_table(), and ha_open().
Here is the caller graph for this function:

Reimplemented in ha_heap, ha_innobase, and ha_partition.
Definition at line 1510 of file handler.h.
References memcmp(), and ref_length.
Referenced by QUICK_ROR_UNION_SELECT::get_next(), QUICK_ROR_INTERSECT_SELECT::get_next(), and refpos_order_cmp().
01511 { 01512 return memcmp(ref1, ref2, ref_length); 01513 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void handler::column_bitmaps_signal | ( | ) | [virtual] |
Definition at line 1872 of file handler.cc.
References DBUG_ENTER, DBUG_PRINT, DBUG_VOID_RETURN, st_table::read_set, table, and st_table::write_set.
Referenced by st_table::column_bitmaps_set(), get_auto_increment(), st_table::mark_auto_increment_column(), st_table::mark_columns_needed_for_delete(), st_table::mark_columns_needed_for_update(), st_table::prepare_for_position(), and st_table::restore_column_maps_after_mark_index().
01873 { 01874 DBUG_ENTER("column_bitmaps_signal"); 01875 DBUG_PRINT("info", ("read_set: 0x%lx write_set: 0x%lx", table->read_set, 01876 table->write_set)); 01877 DBUG_VOID_RETURN; 01878 }
Here is the caller graph for this function:

| int handler::compare_key | ( | key_range * | range | ) |
Definition at line 3143 of file handler.cc.
References cmp, st_key_range::key, key_cmp(), key_compare_result_on_equal, st_key_range::length, and range_key_part.
Referenced by QUICK_RANGE_SELECT::get_next_prefix(), read_range_first(), and read_range_next().
03144 { 03145 int cmp; 03146 if (!range) 03147 return 0; // No max range 03148 cmp= key_cmp(range_key_part, range->key, range->length); 03149 if (!cmp) 03150 cmp= key_compare_result_on_equal; 03151 return cmp; 03152 }
Here is the call graph for this function:

Here is the caller graph for this function:

| virtual void handler::cond_pop | ( | ) | [inline, virtual] |
Reimplemented in ha_ndbcluster.
Definition at line 1542 of file handler.h.
References cond.
Referenced by init_read_record().
01542 { return cond; };
Here is the caller graph for this function:

| virtual int handler::create | ( | const char * | name, | |
| TABLE * | form, | |||
| HA_CREATE_INFO * | info | |||
| ) | [pure virtual] |
Implemented in ha_federated, ha_heap, ha_myisam, ha_myisammrg, ha_ndbcluster, ha_partition, ha_archive, ha_blackhole, ha_tina, and ha_example.
Referenced by ha_create_table(), and ha_create_table_from_engine().
Here is the caller graph for this function:

| virtual int handler::create_handler_files | ( | const char * | name, | |
| const char * | old_name, | |||
| int | action_flag, | |||
| HA_CREATE_INFO * | info | |||
| ) | [inline, virtual] |
Reimplemented in ha_ndbcluster, and ha_partition.
Definition at line 1462 of file handler.h.
References FALSE.
Referenced by rea_create_table().
01464 { return FALSE; }
Here is the caller graph for this function:

| virtual int handler::delete_all_rows | ( | void | ) | [inline, virtual] |
Reimplemented in ha_federated, ha_heap, ha_innobase, ha_myisam, ha_partition, ha_archive, ha_tina, and ha_example.
Definition at line 1268 of file handler.h.
References HA_ERR_WRONG_COMMAND, and my_errno.
Referenced by Item_sum_count_distinct::clear(), get_schema_tables_result(), mysql_delete(), and JOIN::reinit().
01269 { return (my_errno=HA_ERR_WRONG_COMMAND); }
Here is the caller graph for this function:

Definition at line 1566 of file handler.h.
References HA_ERR_WRONG_COMMAND.
Referenced by ha_delete_row(), remove_dup_with_compare(), and remove_dup_with_hash_index().
01567 { 01568 return HA_ERR_WRONG_COMMAND; 01569 }
Here is the caller graph for this function:

| int handler::delete_table | ( | const char * | name | ) | [virtual] |
Reimplemented in ha_heap, ha_innobase, ha_myisam, ha_ndbcluster, ha_partition, and ha_example.
Definition at line 2315 of file handler.cc.
References bas_ext(), error, fn_format(), FN_REFLEN, MY_APPEND_EXT, my_delete_with_symlink(), my_errno, MY_UNPACK_FILENAME, and MYF.
Referenced by create_myisam_from_heap(), drop_table(), execute_ddl_log_action(), ha_delete_table(), and rm_temporary_table().
02316 { 02317 int error= 0; 02318 int enoent_or_zero= ENOENT; // Error if no file was deleted 02319 char buff[FN_REFLEN]; 02320 02321 for (const char **ext=bas_ext(); *ext ; ext++) 02322 { 02323 fn_format(buff, name, "", *ext, MY_UNPACK_FILENAME|MY_APPEND_EXT); 02324 if (my_delete_with_symlink(buff, MYF(0))) 02325 { 02326 if ((error= my_errno) != ENOENT) 02327 break; 02328 } 02329 else 02330 enoent_or_zero= 0; // No error for ENOENT 02331 error= enoent_or_zero; 02332 } 02333 return error; 02334 }
Here is the call graph for this function:

Here is the caller graph for this function:

| virtual int handler::disable_indexes | ( | uint | mode | ) | [inline, virtual] |
Reimplemented in ha_heap, ha_myisam, and ha_partition.
Definition at line 1353 of file handler.h.
References HA_ERR_WRONG_COMMAND.
Referenced by create_myisam_from_heap(), and mysql_alter_table().
01353 { return HA_ERR_WRONG_COMMAND; }
Here is the caller graph for this function:

| virtual int handler::discard_or_import_tablespace | ( | my_bool | discard | ) | [inline, virtual] |
Reimplemented in ha_innobase.
Definition at line 1366 of file handler.h.
References HA_ERR_WRONG_COMMAND.
Referenced by mysql_discard_or_import_tablespace().
01367 {return HA_ERR_WRONG_COMMAND;}
Here is the caller graph for this function:

| virtual int handler::drop_partitions | ( | const char * | path | ) | [inline, virtual] |
Reimplemented in ha_partition.
Definition at line 1473 of file handler.h.
References HA_ERR_WRONG_COMMAND.
01474 { return HA_ERR_WRONG_COMMAND; }
| void handler::drop_table | ( | const char * | name | ) | [virtual] |
Reimplemented in ha_heap.
Definition at line 2353 of file handler.cc.
References close(), and delete_table().
02354 { 02355 close(); 02356 delete_table(name); 02357 }
Here is the call graph for this function:

| virtual int handler::dump | ( | THD * | thd, | |
| int | fd = -1 | |||
| ) | [inline, virtual] |
Definition at line 1352 of file handler.h.
References HA_ERR_WRONG_COMMAND.
Referenced by mysql_table_dump().
01352 { return HA_ERR_WRONG_COMMAND; }
Here is the caller graph for this function:

| virtual int handler::enable_indexes | ( | uint | mode | ) | [inline, virtual] |
Reimplemented in ha_heap, ha_myisam, and ha_partition.
Definition at line 1354 of file handler.h.
References HA_ERR_WRONG_COMMAND.
Referenced by mysql_alter_table().
01354 { return HA_ERR_WRONG_COMMAND; }
Here is the caller graph for this function:

| virtual int handler::end_bulk_delete | ( | ) | [inline, virtual] |
Definition at line 1176 of file handler.h.
References DBUG_ASSERT, FALSE, and HA_ERR_WRONG_COMMAND.
Referenced by mysql_delete().
01177 { 01178 DBUG_ASSERT(FALSE); 01179 return HA_ERR_WRONG_COMMAND; 01180 }
Here is the caller graph for this function:

| virtual int handler::end_bulk_insert | ( | ) | [inline, protected, virtual] |
Reimplemented in ha_myisam, ha_ndbcluster, ha_partition, and ha_archive.
Definition at line 882 of file handler.h.
Referenced by ha_end_bulk_insert().
Here is the caller graph for this function:

| virtual void handler::end_bulk_update | ( | ) | [inline, virtual] |
| virtual ha_rows handler::estimate_rows_upper_bound | ( | ) | [inline, virtual] |
Reimplemented in ha_innobase, ha_partition, and ha_tina.
Definition at line 1031 of file handler.h.
References EXTRA_RECORDS.
Referenced by filesort().
01032 { return stats.records+EXTRA_RECORDS; }
Here is the caller graph for this function:

| virtual int handler::exec_bulk_update | ( | uint * | dup_key_found | ) | [inline, virtual] |
Definition at line 1152 of file handler.h.
References DBUG_ASSERT, FALSE, and HA_ERR_WRONG_COMMAND.
01153 { 01154 DBUG_ASSERT(FALSE); 01155 return HA_ERR_WRONG_COMMAND; 01156 }
| virtual int handler::external_lock | ( | THD *thd | __attribute__((unused)), | |
| int lock_type | __attribute__((unused)) | |||
| ) | [inline, private, virtual] |
Definition at line 1583 of file handler.h.
Referenced by ha_external_lock().
Here is the caller graph for this function:

| virtual int handler::extra | ( | enum ha_extra_function | operation | ) | [inline, virtual] |
Reimplemented in ha_heap, ha_innobase, ha_myisam, ha_myisammrg, ha_ndbcluster, ha_partition, ha_tina, and ha_example.
Definition at line 1229 of file handler.h.
Referenced by Item_sum_count_distinct::clear(), close_thread_table(), create_myisam_from_heap(), create_sort_index(), create_table_from_items(), do_select(), end_read_record(), extra_opt(), find_all_keys(), find_key_for_maxmin(), get_auto_increment(), get_schema_tables_result(), ha_open(), delayed_insert::handle_inserts(), init_read_record(), join_read_const_table(), join_read_first(), join_read_last(), make_join_readinfo(), st_table::mark_columns_used_by_index(), mysql_delete(), mysql_insert(), mysql_load(), Log_to_csv_event_handler::open_log_table(), open_tmp_table(), opt_sum_query(), QUICK_INDEX_MERGE_SELECT::read_keys_and_merge(), JOIN::reinit(), QUICK_GROUP_MIN_MAX_SELECT::reset(), st_table::restore_column_maps_after_mark_index(), Item_func_group_concat::setup(), Item_sum_count_distinct::setup(), test_if_skip_sort_order(), wait_while_table_is_used(), and write_record().
Here is the caller graph for this function:

| virtual int handler::extra_opt | ( | enum ha_extra_function | operation, | |
| ulong | cache_size | |||
| ) | [inline, virtual] |
Reimplemented in ha_myisam, ha_myisammrg, ha_ndbcluster, and ha_partition.
Definition at line 1231 of file handler.h.
References extra().
Referenced by find_all_keys(), and init_read_record().
01232 { return extra(operation); }
Here is the call graph for this function:

Here is the caller graph for this function:

| virtual uint handler::extra_rec_buf_length | ( | ) | const [inline, virtual] |
Reimplemented in ha_partition.
Definition at line 998 of file handler.h.
Referenced by mysql_create_frm().
Here is the caller graph for this function:

| virtual int handler::final_drop_index | ( | TABLE * | table_arg | ) | [inline, virtual] |
Reimplemented in ha_ndbcluster.
Definition at line 1421 of file handler.h.
References HA_ERR_WRONG_COMMAND.
01422 { return (HA_ERR_WRONG_COMMAND); }
| virtual void handler::free_foreign_key_create_info | ( | char * | str | ) | [inline, virtual] |
Reimplemented in ha_innobase.
Definition at line 1398 of file handler.h.
Referenced by store_create_info().
Here is the caller graph for this function:

| void handler::ft_end | ( | ) | [inline] |
Definition at line 1207 of file handler.h.
References ft_handler, and NULL.
Referenced by FT_SELECT::~FT_SELECT().
01207 { ft_handler=NULL; }
Here is the caller graph for this function:

| virtual int handler::ft_init | ( | ) | [inline, virtual] |
Reimplemented in ha_myisam.
Definition at line 1206 of file handler.h.
References HA_ERR_WRONG_COMMAND.
Referenced by FT_SELECT::init(), and join_ft_read_first().
01206 { return HA_ERR_WRONG_COMMAND; }
Here is the caller graph for this function:

| virtual int handler::ft_read | ( | byte * | buf | ) | [inline, virtual] |
Reimplemented in ha_myisam.
Definition at line 1210 of file handler.h.
References HA_ERR_WRONG_COMMAND.
Referenced by FT_SELECT::get_next(), join_ft_read_first(), and join_ft_read_next().
01210 { return HA_ERR_WRONG_COMMAND; }
Here is the caller graph for this function:

| void handler::get_auto_increment | ( | ulonglong | offset, | |
| ulonglong | increment, | |||
| ulonglong | nb_desired_values, | |||
| ulonglong * | first_value, | |||
| ulonglong * | nb_reserved_values | |||
| ) | [virtual] |
Reimplemented in ha_heap, ha_innobase, ha_myisam, ha_ndbcluster, ha_partition, and ha_archive.
Definition at line 1899 of file handler.cc.
References column_bitmaps_signal(), error, extra(), HA_EXTRA_KEYREAD, HA_EXTRA_NO_KEYREAD, HA_READ_PREFIX_LAST, index_end(), index_init(), index_last(), index_read(), key, key_copy(), st_table::key_info, st_table::mark_columns_used_by_index_no_reset(), MAX_KEY_LENGTH, st_table::next_number_field, st_table_share::next_number_index, st_table_share::next_number_key_offset, st_table::read_set, st_table_share::rec_buff_length, st_table::record, st_table::s, table, and ULONGLONG_MAX.
Referenced by update_auto_increment().
01903 { 01904 ulonglong nr; 01905 int error; 01906 01907 (void) extra(HA_EXTRA_KEYREAD); 01908 table->mark_columns_used_by_index_no_reset(table->s->next_number_index, 01909 table->read_set); 01910 column_bitmaps_signal(); 01911 index_init(table->s->next_number_index, 1); 01912 if (!table->s->next_number_key_offset) 01913 { // Autoincrement at key-start 01914 error=index_last(table->record[1]); 01915 /* 01916 MySQL implicitely assumes such method does locking (as MySQL decides to 01917 use nr+increment without checking again with the handler, in 01918 handler::update_auto_increment()), so reserves to infinite. 01919 */ 01920 *nb_reserved_values= ULONGLONG_MAX; 01921 } 01922 else 01923 { 01924 byte key[MAX_KEY_LENGTH]; 01925 key_copy(key, table->record[0], 01926 table->key_info + table->s->next_number_index, 01927 table->s->next_number_key_offset); 01928 error= index_read(table->record[1], key, table->s->next_number_key_offset, 01929 HA_READ_PREFIX_LAST); 01930 /* 01931 MySQL needs to call us for next row: assume we are inserting ("a",null) 01932 here, we return 3, and next this statement will want to insert 01933 ("b",null): there is no reason why ("b",3+1) would be the good row to 01934 insert: maybe it already exists, maybe 3+1 is too large... 01935 */ 01936 *nb_reserved_values= 1; 01937 } 01938 01939 if (error) 01940 nr=1; 01941 else 01942 nr= ((ulonglong) table->next_number_field-> 01943 val_int_offset(table->s->rec_buff_length)+1); 01944 index_end(); 01945 (void) extra(HA_EXTRA_NO_KEYREAD); 01946 *first_value= nr; 01947 }
Here is the call graph for this function:

Here is the caller graph for this function:

| virtual int handler::get_default_no_partitions | ( | HA_CREATE_INFO * | info | ) | [inline, virtual] |
Reimplemented in ha_ndbcluster.
Definition at line 1403 of file handler.h.
Referenced by mysql_create_table_internal().
Here is the caller graph for this function:

| uint handler::get_dup_key | ( | int | error | ) |
Definition at line 2286 of file handler.cc.
References DBUG_ENTER, DBUG_RETURN, errkey, st_table::file, HA_ERR_DROP_INDEX_FK, HA_ERR_FOREIGN_DUPLICATE_KEY, HA_ERR_FOUND_DUPP_KEY, HA_ERR_FOUND_DUPP_UNIQUE, HA_ERR_NULL_IN_SPATIAL, HA_STATUS_ERRKEY, HA_STATUS_NO_LOCK, info(), and table.
Referenced by end_unique_update(), print_error(), and write_record().
02287 { 02288 DBUG_ENTER("handler::get_dup_key"); 02289 table->file->errkey = (uint) -1; 02290 if (error == HA_ERR_FOUND_DUPP_KEY || error == HA_ERR_FOREIGN_DUPLICATE_KEY || 02291 error == HA_ERR_FOUND_DUPP_UNIQUE || error == HA_ERR_NULL_IN_SPATIAL || 02292 error == HA_ERR_DROP_INDEX_FK) 02293 info(HA_STATUS_ERRKEY | HA_STATUS_NO_LOCK); 02294 DBUG_RETURN(table->file->errkey); 02295 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void handler::get_dynamic_partition_info | ( | PARTITION_INFO * | stat_info, | |
| uint | part_id | |||
| ) | [virtual] |
Reimplemented in ha_ndbcluster, and ha_partition.
Definition at line 2454 of file handler.cc.
References PARTITION_INFO::check_sum, PARTITION_INFO::check_time, checksum(), PARTITION_INFO::create_time, PARTITION_INFO::data_file_length, PARTITION_INFO::delete_length, HA_HAS_CHECKSUM, HA_STATUS_CONST, HA_STATUS_NO_LOCK, HA_STATUS_TIME, HA_STATUS_VARIABLE, PARTITION_INFO::index_file_length, info(), PARTITION_INFO::max_data_file_length, PARTITION_INFO::mean_rec_length, PARTITION_INFO::records, table_flags(), and PARTITION_INFO::update_time.
Referenced by store_schema_partitions_record().
02456 { 02457 info(HA_STATUS_CONST | HA_STATUS_TIME | HA_STATUS_VARIABLE | 02458 HA_STATUS_NO_LOCK); 02459 stat_info->records= stats.records; 02460 stat_info->mean_rec_length= stats.mean_rec_length; 02461 stat_info->data_file_length= stats.data_file_length; 02462 stat_info->max_data_file_length= stats.max_data_file_length; 02463 stat_info->index_file_length= stats.index_file_length; 02464 stat_info->delete_length= stats.delete_length; 02465 stat_info->create_time= stats.create_time; 02466 stat_info->update_time= stats.update_time; 02467 stat_info->check_time= stats.check_time; 02468 stat_info->check_sum= 0; 02469 if (table_flags() & (ulong) HA_HAS_CHECKSUM) 02470 stat_info->check_sum= checksum(); 02471 return; 02472 }
Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented in ha_federated, ha_innobase, ha_ndbcluster, and ha_partition.
Definition at line 2184 of file handler.cc.
References FALSE.
Referenced by print_error().
02185 { 02186 return FALSE; 02187 }
Here is the caller graph for this function:

| virtual char* handler::get_foreign_key_create_info | ( | ) | [inline, virtual] |
Reimplemented in ha_innobase.
Definition at line 1386 of file handler.h.
References NULL.
Referenced by store_create_info().
01387 { return(NULL);} /* gets foreign key create string from InnoDB */
Here is the caller graph for this function:

| virtual int handler::get_foreign_key_list | ( | THD * | thd, | |
| List< FOREIGN_KEY_INFO > * | f_key_list | |||
| ) | [inline, virtual] |
Reimplemented in ha_innobase.
Definition at line 1393 of file handler.h.
Referenced by get_referential_constraints_record().
Here is the caller graph for this function:

| uint handler::get_index | ( | void | ) | const [inline] |
| virtual enum row_type handler::get_row_type | ( | ) | const [inline, virtual] |
Reimplemented in ha_heap, ha_innobase, ha_partition, and ha_archive.
Definition at line 1038 of file handler.h.
References ROW_TYPE_NOT_USED.
Referenced by get_schema_tables_record().
01038 { return ROW_TYPE_NOT_USED; }
Here is the caller graph for this function:

| virtual char* handler::get_tablespace_name | ( | THD * | thd | ) | [inline, virtual] |
Reimplemented in ha_ndbcluster.
Definition at line 1388 of file handler.h.
References NULL.
Referenced by store_create_info().
01389 { return(NULL);} /* gets tablespace name from handler */
Here is the caller graph for this function:

| int handler::ha_check | ( | THD * | thd, | |
| HA_CHECK_OPT * | check_opt | |||
| ) |
Definition at line 2377 of file handler.cc.
References check(), check_old_types(), error, HA_ADMIN_NEEDS_CHECK, ha_check_for_upgrade(), st_table_share::mysql_version, MYSQL_VERSION_ID, st_table::s, st_ha_check_opt::sql_flags, table, TT_FOR_UPGRADE, and update_frm_version().
Referenced by mysql_admin_table(), and mysql_check_table().
02378 { 02379 int error; 02380 02381 if ((table->s->mysql_version >= MYSQL_VERSION_ID) && 02382 (check_opt->sql_flags & TT_FOR_UPGRADE)) 02383 return 0; 02384 02385 if (table->s->mysql_version < MYSQL_VERSION_ID) 02386 { 02387 if ((error= check_old_types())) 02388 return error; 02389 error= ha_check_for_upgrade(check_opt); 02390 if (error && (error != HA_ADMIN_NEEDS_CHECK)) 02391 return error; 02392 if (!error && (check_opt->sql_flags & TT_FOR_UPGRADE)) 02393 return 0; 02394 } 02395 if ((error= check(thd, check_opt))) 02396 return error; 02397 return update_frm_version(table, 0); 02398 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int handler::ha_check_for_upgrade | ( | HA_CHECK_OPT * | check_opt | ) |
Definition at line 2190 of file handler.cc.
References check_for_upgrade(), st_table::field, FIELD_TYPE_BLOB, st_key_part_info::fieldnr, st_ha_check_opt::flags, HA_ADMIN_NEEDS_CHECK, st_table::key_info, keyinfo, st_table_share::keys, st_table_share::mysql_version, st_table::s, st_ha_check_opt::sql_flags, T_MEDIUM, table, and TT_FOR_UPGRADE.
Referenced by ha_check(), and mysql_admin_table().
02191 { 02192 KEY *keyinfo, *keyend; 02193 KEY_PART_INFO *keypart, *keypartend; 02194 02195 if (!table->s->mysql_version) 02196 { 02197 /* check for blob-in-key error */ 02198 keyinfo= table->key_info; 02199 keyend= table->key_info + table->s->keys; 02200 for (; keyinfo < keyend; keyinfo++) 02201 { 02202 keypart= keyinfo->key_part; 02203 keypartend= keypart + keyinfo->key_parts; 02204 for (; keypart < keypartend; keypart++) 02205 { 02206 if (!keypart->fieldnr) 02207 continue; 02208 Field *field= table->field[keypart->fieldnr-1]; 02209 if (field->type() == FIELD_TYPE_BLOB) 02210 { 02211 if (check_opt->sql_flags & TT_FOR_UPGRADE) 02212 check_opt->flags= T_MEDIUM; 02213 return HA_ADMIN_NEEDS_CHECK; 02214 } 02215 } 02216 } 02217 } 02218 return check_for_upgrade(check_opt); 02219 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int handler::ha_delete_row | ( | const byte * | buf | ) |
Definition at line 3561 of file handler.cc.
References delete_row(), table, and unlikely.
Referenced by db_drop_event(), db_drop_events_from_table(), db_drop_routine(), modify_grant_table(), mysql_delete(), mysql_uninstall_plugin(), replace_column_table(), replace_db_table(), replace_routine_table(), replace_table_table(), sp_drop_db_routines(), and write_record().
03562 { 03563 int error; 03564 if (unlikely(error= delete_row(buf))) 03565 return error; 03566 #ifdef HAVE_ROW_BASED_REPLICATION 03567 if (unlikely(error= binlog_log_row<Delete_rows_log_event>(table, buf, 0))) 03568 return error; 03569 #endif 03570 return 0; 03571 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int handler::ha_end_bulk_insert | ( | ) | [inline] |
Definition at line 1361 of file handler.h.
References end_bulk_insert(), and estimation_rows_to_insert.
Referenced by mysql_insert(), and mysql_load().
01362 { 01363 estimation_rows_to_insert= 0; 01364 return end_bulk_insert(); 01365 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int handler::ha_external_lock | ( | THD * | thd, | |
| int | lock_type | |||
| ) |
Definition at line 3496 of file handler.cc.
References DBUG_ASSERT, DBUG_ENTER, DBUG_RETURN, external_lock(), and next_insert_id.
03497 { 03498 DBUG_ENTER("handler::ha_external_lock"); 03499 /* 03500 Whether this is lock or unlock, this should be true, and is to verify that 03501 if get_auto_increment() was called (thus may have reserved intervals or 03502 taken a table lock), ha_release_auto_increment() was too. 03503 */ 03504 DBUG_ASSERT(next_insert_id == 0); 03505 DBUG_RETURN(external_lock(thd, lock_type)); 03506 }
Here is the call graph for this function:

| int handler::ha_index_end | ( | ) | [inline] |
Definition at line 1049 of file handler.h.
References DBUG_ASSERT, DBUG_ENTER, DBUG_RETURN, INDEX, index_end(), inited, and NONE.
Referenced by events_table_index_read_for_db(), fill_schema_proc(), get_topics_for_keyword(), grant_load(), GRANT_TABLE::GRANT_TABLE(), ha_index_or_rnd_end(), index_read_idx(), my_tz_init(), opt_sum_query(), read_first_row(), QUICK_INDEX_MERGE_SELECT::read_keys_and_merge(), replace_column_table(), sp_drop_db_routines(), QUICK_GROUP_MIN_MAX_SELECT::~QUICK_GROUP_MIN_MAX_SELECT(), and subselect_uniquesubquery_engine::~subselect_uniquesubquery_engine().
01050 { 01051 DBUG_ENTER("ha_index_end"); 01052 DBUG_ASSERT(inited==INDEX); 01053 inited=NONE; 01054 DBUG_RETURN(index_end()); 01055 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1042 of file handler.h.
References DBUG_ASSERT, DBUG_ENTER, DBUG_RETURN, INDEX, index_init(), inited, and NONE.
Referenced by db_show_routine_status(), end_update(), events_table_index_read_for_db(), subselect_indexsubquery_engine::exec(), subselect_uniquesubquery_engine::exec(), fill_schema_proc(), get_topics_for_keyword(), grant_load(), GRANT_TABLE::GRANT_TABLE(), index_read_idx(), QUICK_RANGE_SELECT::init(), init_read_record_idx(), join_ft_read_first(), join_read_always_key(), join_read_first(), join_read_key(), join_read_last(), join_read_last_key(), my_tz_init(), mysql_ha_read(), opt_sum_query(), read_first_row(), replace_column_table(), QUICK_GROUP_MIN_MAX_SELECT::reset(), QUICK_RANGE_SELECT::reset(), and sp_drop_db_routines().
01043 { 01044 DBUG_ENTER("ha_index_init"); 01045 DBUG_ASSERT(inited==NONE); 01046 inited=INDEX; 01047 DBUG_RETURN(index_init(idx, sorted)); 01048 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int handler::ha_index_or_rnd_end | ( | ) | [inline] |
Definition at line 1073 of file handler.h.
References ha_index_end(), ha_rnd_end(), INDEX, inited, and RND.
Referenced by JOIN::cleanup(), create_myisam_from_heap(), do_select(), end_read_record(), QUICK_RANGE_SELECT::init(), mysql_ha_read(), and QUICK_RANGE_SELECT::range_end().
01074 { 01075 return inited == INDEX ? ha_index_end() : inited == RND ? ha_rnd_end() : 0; 01076 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int handler::ha_open | ( | TABLE * | table, | |
| const char * | name, | |||
| int | mode, | |||
| int | test_if_locked | |||
| ) |
Definition at line 1461 of file handler.cc.
References ALIGN_SIZE, alloc_root(), alloc_root_inited, cached_table_flags, close(), st_table_share::db_options_in_use, st_table::db_stat, st_table_share::db_type, DBUG_ASSERT, DBUG_ENTER, DBUG_PRINT, DBUG_RETURN, dup_ref, errno, error, extra(), HA_ERR_OUT_OF_MEM, HA_EXTRA_NO_READCHECK, HA_OPTION_READ_ONLY_DATA, HA_READ_ONLY, HA_TRY_READ_ONLY, st_table::mem_root, my_errno, open(), ref, ref_length, st_table::s, table, table_flags(), and table_share.
Referenced by open_tmp_table().
01463 { 01464 int error; 01465 DBUG_ENTER("handler::ha_open"); 01466 DBUG_PRINT("enter", 01467 ("name: %s db_type: %d db_stat: %d mode: %d lock_test: %d", 01468 name, table_share->db_type, table_arg->db_stat, mode, 01469 test_if_locked)); 01470 01471 table= table_arg; 01472 DBUG_ASSERT(table->s == table_share); 01473 DBUG_ASSERT(alloc_root_inited(&table->mem_root)); 01474 01475 if ((error=open(name,mode,test_if_locked))) 01476 { 01477 if ((error == EACCES || error == EROFS) && mode == O_RDWR && 01478 (table->db_stat & HA_TRY_READ_ONLY)) 01479 { 01480 table->db_stat|=HA_READ_ONLY; 01481 error=open(name,O_RDONLY,test_if_locked); 01482 } 01483 } 01484 if (error) 01485 { 01486 my_errno= error; /* Safeguard */ 01487 DBUG_PRINT("error",("error: %d errno: %d",error,errno)); 01488 } 01489 else 01490 { 01491 if (table->s->db_options_in_use & HA_OPTION_READ_ONLY_DATA) 01492 table->db_stat|=HA_READ_ONLY; 01493 (void) extra(HA_EXTRA_NO_READCHECK); // Not needed in SQL 01494 01495 if (!(ref= (byte*) alloc_root(&table->mem_root, ALIGN_SIZE(ref_length)*2))) 01496 { 01497 close(); 01498 error=HA_ERR_OUT_OF_MEM; 01499 } 01500 else 01501 dup_ref=ref+ALIGN_SIZE(ref_length); 01502 cached_table_flags= table_flags(); 01503 } 01504 DBUG_RETURN(error); 01505 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void handler::ha_release_auto_increment | ( | ) |
Definition at line 1950 of file handler.cc.
References auto_inc_interval_for_cur_row, st_table::in_use, insert_id_for_cur_row, next_insert_id, release_auto_increment(), Discrete_interval::replace(), and table.
Referenced by handle_delayed_insert(), mysql_insert(), and mysql_load().
01951 { 01952 release_auto_increment(); 01953 insert_id_for_cur_row= 0; 01954 auto_inc_interval_for_cur_row.replace(0, 0, 0); 01955 if (next_insert_id > 0) 01956 { 01957 next_insert_id= 0; 01958 /* 01959 this statement used forced auto_increment values if there were some, 01960 wipe them away for other statements. 01961 */ 01962 table->in_use->auto_inc_intervals_forced.empty(); 01963 } 01964 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int handler::ha_repair | ( | THD * | thd, | |
| HA_CHECK_OPT * | check_opt | |||
| ) |
Definition at line 2401 of file handler.cc.
References repair(), table, and update_frm_version().
Referenced by mysql_admin_table(), and mysql_repair_table().
02402 { 02403 int result; 02404 if ((result= repair(thd, check_opt))) 02405 return result; 02406 return update_frm_version(table, 0); 02407 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int handler::ha_reset | ( | ) |
Definition at line 3513 of file handler.cc.
References st_table_share::all_set, st_bitmap::bitmap, bitmap_is_set_all(), st_table_share::column_bitmap_size, DBUG_ASSERT, DBUG_ENTER, DBUG_RETURN, st_table::def_read_set, st_table::def_write_set, free_io_cache(), inited, st_table::key_read, NONE, reset(), st_table::s, and table.
Referenced by close_thread_table(), and mark_used_tables_as_free_for_reuse().
03514 { 03515 DBUG_ENTER("ha_reset"); 03516 /* Check that we have called all proper delallocation functions */ 03517 DBUG_ASSERT((byte*) table->def_read_set.bitmap + 03518 table->s->column_bitmap_size == 03519 (char*) table->def_write_set.bitmap); 03520 DBUG_ASSERT(bitmap_is_set_all(&table->s->all_set)); 03521 DBUG_ASSERT(table->key_read == 0); 03522 /* ensure that ha_index_end / ha_rnd_end has been called */ 03523 DBUG_ASSERT(inited == NONE); 03524 /* Free cache used by filesort */ 03525 free_io_cache(table); 03526 DBUG_RETURN(reset()); 03527 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int handler::ha_rnd_end | ( | ) | [inline] |
Definition at line 1063 of file handler.h.
References DBUG_ASSERT, DBUG_ENTER, DBUG_RETURN, inited, NONE, RND, and rnd_end().
Referenced by Materialized_cursor::close(), Log_to_csv_event_handler::close_log_table(), create_myisam_from_heap(), find_all_keys(), ha_index_or_rnd_end(), handle_grant_table(), mysql_checksum_table(), read_first_row(), QUICK_ROR_INTERSECT_SELECT::~QUICK_ROR_INTERSECT_SELECT(), and QUICK_ROR_UNION_SELECT::~QUICK_ROR_UNION_SELECT().
01064 { 01065 DBUG_ENTER("ha_rnd_end"); 01066 DBUG_ASSERT(inited==RND); 01067 inited=NONE; 01068 DBUG_RETURN(rnd_end()); 01069 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int handler::ha_rnd_init | ( | bool | scan | ) | [inline] |
Definition at line 1056 of file handler.h.
References DBUG_ASSERT, DBUG_ENTER, DBUG_RETURN, inited, NONE, RND, and rnd_init().
Referenced by create_myisam_from_heap(), find_all_keys(), handle_grant_table(), init_read_record(), QUICK_ROR_INTERSECT_SELECT::init_ror_merged_scan(), mysql_checksum_table(), mysql_ha_read(), Materialized_cursor::open(), Log_to_csv_event_handler::open_log_table(), read_first_row(), remove_dup_with_compare(), remove_dup_with_hash_index(), and QUICK_ROR_UNION_SELECT::reset().
01057 { 01058 DBUG_ENTER("ha_rnd_init"); 01059 DBUG_ASSERT(inited==NONE || (inited==RND && scan)); 01060 inited=RND; 01061 DBUG_RETURN(rnd_init(scan)); 01062 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void handler::ha_start_bulk_insert | ( | ha_rows | rows | ) | [inline] |
Definition at line 1356 of file handler.h.
References estimation_rows_to_insert, and start_bulk_insert().
Referenced by create_myisam_from_heap(), mysql_insert(), and mysql_load().
01357 { 01358 estimation_rows_to_insert= rows; 01359 start_bulk_insert(rows); 01360 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void handler::ha_statistic_increment | ( | ulong SSV::* | offset | ) | const [protected] |
Definition at line 1420 of file handler.cc.
References st_table::in_use, LOCK_status, statistic_increment, and table.
Referenced by ha_tina::delete_row(), ha_tina::rnd_next(), ha_archive::rnd_next(), ha_tina::rnd_pos(), ha_archive::rnd_pos(), ha_tina::update_row(), ha_tina::write_row(), and ha_archive::write_row().
01421 { 01422 statistic_increment(table->in_use->status_var.*offset, &LOCK_status); 01423 }
Here is the caller graph for this function:

| longlong handler::ha_table_flags | ( | ) | [inline] |
Definition at line 1077 of file handler.h.
References cached_table_flags.
Referenced by best_access_path(), check_if_key_used(), end_send(), filesort(), find_all_keys(), Item_func_match::fix_fields(), get_best_group_min_max(), get_schema_tables_record(), ha_create_table(), ha_create_table_from_engine(), ha_delete_table(), handle_delayed_insert(), has_transactions(), init_read_record(), make_join_statistics(), st_table::mark_columns_needed_for_delete(), st_table::mark_columns_needed_for_update(), mysql_checksum_table(), mysql_ha_open(), mysql_prepare_table(), mysql_rename_table(), mysql_test_insert(), st_table::prepare_for_position(), QUICK_RANGE_SELECT::reset(), safe_update_on_fly(), store_schema_partitions_record(), SQL_SELECT::test_quick_select(), and write_record().
01077 { return cached_table_flags; }
Here is the caller graph for this function:

Definition at line 3542 of file handler.cc.
References DBUG_ASSERT, st_table::record, table, unlikely, and update_row().
Referenced by db_update_event(), replace_column_table(), replace_db_table(), replace_routine_table(), replace_table_table(), Event_timed::update_fields(), update_user_table(), and write_record().
03543 { 03544 int error; 03545 03546 /* 03547 Some storage engines require that the new record is in record[0] 03548 (and the old record is in record[1]). 03549 */ 03550 DBUG_ASSERT(new_data == table->record[0]); 03551 03552 if (unlikely(error= update_row(old_data, new_data))) 03553 return error; 03554 #ifdef HAVE_ROW_BASED_REPLICATION 03555 if (unlikely(error= binlog_log_row<Update_rows_log_event>(table, old_data, new_data))) 03556 return error; 03557 #endif 03558 return 0; 03559 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int handler::ha_write_row | ( | byte * | buf | ) |
Definition at line 3530 of file handler.cc.
References table, unlikely, and write_row().
Referenced by Item_sum_count_distinct::add(), db_create_event(), db_create_routine(), Log_to_csv_event_handler::log_general(), Log_to_csv_event_handler::log_slow(), mysql_install_plugin(), replace_column_table(), replace_db_table(), replace_routine_table(), replace_table_table(), replace_user_table(), schema_table_store_record(), update_schema_privilege(), and write_record().
03531 { 03532 int error; 03533 if (unlikely(error= write_row(buf))) 03534 return error; 03535 #ifdef HAVE_ROW_BASED_REPLICATION 03536 if (unlikely(error= binlog_log_row<Write_rows_log_event>(table, 0, buf))) 03537 return error; 03538 #endif 03539 return 0; 03540 }
Here is the call graph for this function:

Here is the caller graph for this function:

| bool handler::has_transactions | ( | ) | [inline] |
Definition at line 996 of file handler.h.
References HA_NO_TRANSACTIONS, and ha_table_flags().
Referenced by mysql_delete(), mysql_insert(), mysql_load(), read_fixed_length(), read_sep_field(), and write_record().
00997 { return (ha_table_flags() & HA_NO_TRANSACTIONS) == 0; }
Here is the call graph for this function:

Here is the caller graph for this function:

| virtual int handler::index_end | ( | ) | [inline, protected, virtual] |
Reimplemented in ha_federated, ha_innobase, ha_ndbcluster, and ha_partition.
Definition at line 867 of file handler.h.
References active_index, and MAX_KEY.
Referenced by get_auto_increment(), and ha_index_end().
00867 { active_index=MAX_KEY; return 0; }
Here is the caller graph for this function:

| virtual int handler::index_first | ( | byte * | buf | ) | [inline, virtual] |
Reimplemented in ha_heap, ha_innobase, ha_myisam, ha_myisammrg, ha_ndbcluster, ha_partition, ha_blackhole, and ha_example.
Definition at line 1190 of file handler.h.
References HA_ERR_WRONG_COMMAND.
Referenced by db_show_routine_status(), fill_schema_proc(), grant_load(), join_read_first(), my_tz_init(), mysql_ha_read(), QUICK_GROUP_MIN_MAX_SELECT::next_prefix(), opt_sum_query(), read_first_row(), read_range_first(), and rr_index_first().
01191 { return HA_ERR_WRONG_COMMAND; }
Here is the caller graph for this function:

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 best_access_path(), check_quick_select(), find_key_for_maxmin(), get_index_for_order(), get_key_scans_params(), get_schema_stat_record(), ha_partition::index_flags(), Field::optimize_range(), read_first_row(), and test_if_order_by_key().
Here is the caller graph for this function:

Reimplemented in ha_federated, ha_innobase, ha_ndbcluster, ha_partition, and ha_archive.
Definition at line 866 of file handler.h.
References active_index.
Referenced by get_auto_increment(), and ha_index_init().
00866 { active_index=idx; return 0; }
Here is the caller graph for this function:

| virtual int handler::index_last | ( | byte * | buf | ) | [inline, virtual] |
Reimplemented in ha_heap, ha_innobase, ha_myisam, ha_myisammrg, ha_ndbcluster, ha_partition, ha_blackhole, and ha_example.
Definition at line 1192 of file handler.h.
References HA_ERR_WRONG_COMMAND.
Referenced by get_auto_increment(), QUICK_SELECT_DESC::get_next(), join_read_last(), mysql_ha_read(), opt_sum_query(), and QUICK_GROUP_MIN_MAX_SELECT::reset().
01193 { return HA_ERR_WRONG_COMMAND; }
Here is the caller graph for this function:

| virtual int handler::index_next | ( | byte * | buf | ) | [inline, virtual] |
Reimplemented in ha_federated, ha_heap, ha_innobase, ha_myisam, ha_myisammrg, ha_ndbcluster, ha_partition, ha_archive, ha_blackhole, and ha_example.
Definition at line 1186 of file handler.h.
References HA_ERR_WRONG_COMMAND.
Referenced by db_show_routine_status(), fill_schema_proc(), get_topics_for_keyword(), grant_load(), GRANT_TABLE::GRANT_TABLE(), index_next_same(), join_read_next(), my_tz_init(), mysql_ha_read(), read_range_next(), replace_column_table(), and rr_index().
01187 { return HA_ERR_WRONG_COMMAND; }
Here is the caller graph for this function:

Reimplemented in ha_innobase, ha_myisam, ha_myisammrg, and ha_partition.
Definition at line 2439 of file handler.cc.
References active_index, error, HA_ERR_END_OF_FILE, index_next(), key_cmp_if_same(), STATUS_NOT_FOUND, and table.
Referenced by events_table_index_read_for_db(), subselect_indexsubquery_engine::exec(), QUICK_SELECT_DESC::get_next(), QUICK_RANGE_SELECT_GEOM::get_next(), join_read_next_same(), mysql_ha_read(), read_range_next(), and sp_drop_db_routines().
02440 { 02441 int error; 02442 if (!(error=index_next(buf))) 02443 { 02444 if (key_cmp_if_same(table, key, active_index, keylen)) 02445 { 02446 table->status=STATUS_NOT_FOUND; 02447 error=HA_ERR_END_OF_FILE; 02448 } 02449 } 02450 return error; 02451 }
Here is the call graph for this function:

Here is the caller graph for this function:

| virtual int handler::index_prev | ( | byte * | buf | ) | [inline, virtual] |
Reimplemented in ha_heap, ha_innobase, ha_myisam, ha_myisammrg, ha_ndbcluster, ha_partition, ha_blackhole, and ha_example.
Definition at line 1188 of file handler.h.
References HA_ERR_WRONG_COMMAND.
Referenced by QUICK_SELECT_DESC::get_next(), join_read_prev(), join_read_prev_same(), and mysql_ha_read().
01189 { return HA_ERR_WRONG_COMMAND; }
Here is the caller graph for this function:

| virtual int handler::index_read | ( | byte * | buf, | |
| const byte * | key, | |||
| uint | key_len, | |||
| enum ha_rkey_function | find_flag | |||
| ) | [inline, virtual] |
Reimplemented in ha_federated, ha_heap, ha_innobase, ha_myisam, ha_myisammrg, ha_ndbcluster, ha_partition, ha_archive, ha_blackhole, and ha_example.
Definition at line 1181 of file handler.h.
References HA_ERR_WRONG_COMMAND.
Referenced by end_update(), events_table_index_read_for_db(), subselect_indexsubquery_engine::exec(), subselect_uniquesubquery_engine::exec(), get_auto_increment(), QUICK_GROUP_MIN_MAX_SELECT::get_next(), QUICK_SELECT_DESC::get_next(), QUICK_RANGE_SELECT_GEOM::get_next(), QUICK_RANGE_SELECT::get_next_prefix(), get_topics_for_keyword(), GRANT_TABLE::GRANT_TABLE(), index_read_idx(), join_read_always_key(), join_read_key(), mysql_ha_read(), QUICK_GROUP_MIN_MAX_SELECT::next_max(), QUICK_GROUP_MIN_MAX_SELECT::next_max_in_range(), QUICK_GROUP_MIN_MAX_SELECT::next_min(), QUICK_GROUP_MIN_MAX_SELECT::next_min_in_range(), QUICK_GROUP_MIN_MAX_SELECT::next_prefix(), opt_sum_query(), read_range_first(), replace_column_table(), safe_index_read(), and sp_drop_db_routines().
01183 { return HA_ERR_WRONG_COMMAND; }
Here is the caller graph for this function:

| int handler::index_read_idx | ( | byte * | buf, | |
| uint | index, | |||
| const byte * | key, | |||
| uint | key_len, | |||
| enum ha_rkey_function | find_flag | |||
| ) | [virtual] |
Reimplemented in ha_federated, ha_heap, ha_innobase, ha_myisam, ha_myisammrg, ha_ndbcluster, ha_partition, ha_archive, ha_blackhole, and ha_example.
Definition at line 3154 of file handler.cc.
References error, ha_index_end(), ha_index_init(), and index_read().
Referenced by db_find_routine_aux(), evex_db_find_event_by_name(), handle_grant_table(), join_read_const(), mysql_uninstall_plugin(), replace_db_table(), replace_routine_table(), replace_table_table(), replace_user_table(), update_user_table(), and write_record().
03156 { 03157 int error= ha_index_init(index, 0); 03158 if (!error) 03159 error= index_read(buf, key, key_len, find_flag); 03160 if (!error) 03161 error= ha_index_end(); 03162 return error; 03163 }
Here is the call graph for this function:

Here is the caller graph for this function:

| virtual int handler::index_read_last | ( | byte * | buf, | |
| const byte * | key, | |||
| uint | key_len | |||
| ) | [inline, virtual] |
Reimplemented in ha_heap, ha_innobase, ha_myisam, ha_myisammrg, ha_ndbcluster, ha_partition, and ha_blackhole.
Definition at line 1195 of file handler.h.
References HA_ERR_WRONG_COMMAND, and my_errno.
Referenced by join_read_last_key().
01196 { return (my_errno=HA_ERR_WRONG_COMMAND); }
Here is the caller graph for this function:

| virtual const char* handler::index_type | ( | uint | key_number | ) | [inline, virtual] |
Reimplemented in ha_federated, ha_heap, ha_innobase, ha_myisam, ha_myisammrg, ha_ndbcluster, ha_partition, ha_archive, ha_blackhole, ha_tina, and ha_example.
Definition at line 1040 of file handler.h.
References DBUG_ASSERT.
Referenced by get_schema_stat_record().
01040 { DBUG_ASSERT(0); return "";}
Here is the caller graph for this function:

| virtual int handler::indexes_are_disabled | ( | void | ) | [inline, virtual] |
Reimplemented in ha_heap, ha_myisam, and ha_partition.
Definition at line 1355 of file handler.h.
Referenced by create_myisam_from_heap().
Here is the caller graph for this function:

| virtual void handler::info | ( | uint | ) | [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 create_myisam_from_heap(), create_sort_index(), JOIN::exec(), get_dup_key(), get_dynamic_partition_info(), get_referential_constraints_record(), get_schema_column_record(), get_schema_constraints_record(), get_schema_key_column_usage_record(), get_schema_stat_record(), get_schema_tables_record(), make_join_statistics(), mysql_admin_table(), mysql_delete(), mysql_derived_prepare(), mysql_truncate(), ha_heap::update_create_info(), and Item_sum_count_distinct::val_int().
Here is the caller graph for this function:

| void handler::init | ( | ) | [inline] |
Definition at line 946 of file handler.h.
References cached_table_flags, and table_flags().
Referenced by get_new_handler().
00947 { 00948 cached_table_flags= table_flags(); 00949 }
Here is the call graph for this function:

Here is the caller graph for this function:

| virtual void handler::init_table_handle_for_HANDLER | ( | ) | [inline, virtual] |
Reimplemented in ha_innobase, and ha_partition.
Definition at line 1396 of file handler.h.
Referenced by mysql_ha_read().
Here is the caller graph for this function:

| virtual bool handler::is_crashed | ( | ) | const [inline, virtual] |
Reimplemented in ha_ndbcluster, and ha_partition.
Definition at line 1010 of file handler.h.
References FALSE, HA_CHECK_DUP_KEY, HA_ERR_FOUND_DUPP_KEY, HA_ERR_FOUND_DUPP_UNIQUE, and TRUE.
Referenced by Item_sum_count_distinct::add(), create_myisam_from_heap(), end_write(), ha_partition::is_fatal_error(), ha_ndbcluster::is_fatal_error(), replace_db_table(), replace_routine_table(), replace_table_table(), replace_user_table(), and write_record().
01011 { 01012 if (!error || 01013 ((flags & HA_CHECK_DUP_KEY) && 01014 (error == HA_ERR_FOUND_DUPP_KEY || 01015 error == HA_ERR_FOUND_DUPP_UNIQUE))) 01016 return FALSE; 01017 return TRUE; 01018 }
Here is the caller graph for this function:

| virtual const key_map* handler::keys_to_use_for_scanning | ( | ) | [inline, virtual] |
Reimplemented in ha_federated, ha_heap, ha_innobase, and ha_partition.
Definition at line 995 of file handler.h.
References key_map_empty.
Referenced by test_if_skip_sort_order().
00995 { return &key_map_empty; }
Here is the caller graph for this function:

| virtual uint handler::lock_count | ( | void | ) | const [inline, virtual] |
Reimplemented in ha_myisammrg, ha_partition, and ha_blackhole.
Definition at line 1487 of file handler.h.
Referenced by get_lock_data().
Here is the caller graph for this function:

| virtual bool handler::low_byte_first | ( | ) | const [inline, virtual] |
| uint handler::max_key_length | ( | ) | const [inline] |
Reimplemented in ha_tina.
Definition at line 1430 of file handler.h.
References MAX_KEY_LENGTH, max_supported_key_length(), and min.
Referenced by create_myisam_tmp_table(), and mysql_prepare_table().
01431 { return min(MAX_KEY_LENGTH, max_supported_key_length()); }
Here is the call graph for this function:

Here is the caller graph for this function:

| uint handler::max_key_part_length | ( | ) | const [inline] |
Definition at line 1432 of file handler.h.
References MAX_KEY_LENGTH, max_supported_key_part_length(), and min.
01433 { return min(MAX_KEY_LENGTH, max_supported_key_part_length()); }
Here is the call graph for this function:

| uint handler::max_key_parts | ( | ) | const [inline] |
Reimplemented in ha_tina.
Definition at line 1428 of file handler.h.
References MAX_REF_PARTS, max_supported_key_parts(), and min.
Referenced by create_myisam_tmp_table().
01429 { return min(MAX_REF_PARTS, max_supported_key_parts()); }
Here is the call graph for this function:

Here is the caller graph for this function:

| uint handler::max_keys | ( | ) | const [inline] |
Reimplemented in ha_tina.
Definition at line 1426 of file handler.h.
References MAX_KEY, max_supported_keys(), and min.
01427 { return min(MAX_KEY, max_supported_keys()); }
Here is the call graph for this function:

| uint handler::max_record_length | ( | ) | const [inline] |
Reimplemented in ha_tina.
Definition at line 1424 of file handler.h.
References HA_MAX_REC_LENGTH, max_supported_record_length(), and min.
Referenced by pack_header().
01425 { return min(HA_MAX_REC_LENGTH, max_supported_record_length()); }
Here is the call graph for this function:

Here is the caller graph for this function:

| virtual uint handler::max_supported_key_length | ( | ) | const [inline, virtual] |
Reimplemented in ha_federated, ha_innobase, ha_myisam, ha_myisammrg, ha_ndbcluster, ha_partition, ha_archive, ha_blackhole, and ha_example.
Definition at line 1438 of file handler.h.
References MAX_KEY_LENGTH.
Referenced by max_key_length().
01438 { return MAX_KEY_LENGTH; }
Here is the caller graph for this function:

| virtual uint handler::max_supported_key_part_length | ( | ) | const [inline, virtual] |
Reimplemented in ha_heap, ha_innobase, ha_myisam, ha_myisammrg, ha_ndbcluster, ha_partition, ha_archive, and ha_blackhole.
Definition at line 1439 of file handler.h.
Referenced by max_key_part_length().
Here is the caller graph for this function:

| virtual uint handler::max_supported_key_parts | ( | ) | const [inline, virtual] |
Reimplemented in ha_federated, ha_ndbcluster, ha_partition, and ha_example.
Definition at line 1437 of file handler.h.
References MAX_REF_PARTS.
Referenced by max_key_parts().
01437 { return MAX_REF_PARTS; }
Here is the caller graph for this function:

| virtual uint handler::max_supported_keys | ( | ) | const [inline, virtual] |
Reimplemented in ha_federated, ha_heap, ha_innobase, ha_myisam, ha_myisammrg, ha_ndbcluster, ha_partition, ha_archive, ha_blackhole, and ha_example.
Definition at line 1436 of file handler.h.
Referenced by max_keys().
Here is the caller graph for this function:

| virtual uint handler::max_supported_record_length | ( | ) | const [inline, virtual] |
Reimplemented in ha_federated, ha_ndbcluster, ha_partition, and ha_example.
Definition at line 1435 of file handler.h.
References HA_MAX_REC_LENGTH.
Referenced by max_record_length().
01435 { return HA_MAX_REC_LENGTH; }
Here is the caller graph for this function:

Reimplemented in ha_partition.
Definition at line 1440 of file handler.h.
Referenced by pack_header().
Here is the caller graph for this function:

| virtual int handler::net_read_dump | ( | NET * | net | ) | [inline, virtual] |
Definition at line 1368 of file handler.h.
References HA_ERR_WRONG_COMMAND.
01368 { return HA_ERR_WRONG_COMMAND; }
| virtual int handler::open | ( | const char * | name, | |
| int | mode, | |||
| uint | test_if_locked | |||
| ) | [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 ha_open().
Here is the caller graph for this function:

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

| virtual int handler::optimize_partitions | ( | THD * | thd | ) | [inline, virtual] |
Reimplemented in ha_partition.
Definition at line 1477 of file handler.h.
References HA_ERR_WRONG_COMMAND.
01478 { return HA_ERR_WRONG_COMMAND; }
| virtual void handler::position | ( | const byte * | record | ) | [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 find_all_keys(), QUICK_INDEX_MERGE_SELECT::read_keys_and_merge(), remove_dup_with_compare(), and QUICK_RANGE_SELECT::save_last_pos().
Here is the caller graph for this function:

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

| virtual int handler::prepare_drop_index | ( | TABLE * | table_arg, | |
| uint * | key_num, | |||
| uint | num_of_keys | |||
| ) | [inline, virtual] |
Reimplemented in ha_ndbcluster.
Definition at line 1418 of file handler.h.
References HA_ERR_WRONG_COMMAND.
01420 { return (HA_ERR_WRONG_COMMAND); }
| virtual void handler::prepare_for_alter | ( | ) | [inline, virtual] |
| virtual bool handler::primary_key_is_clustered | ( | ) | [inline, virtual] |
Reimplemented in ha_innobase, and ha_partition.
Definition at line 1509 of file handler.h.
References FALSE.
Referenced by check_quick_select(), fill_used_fields_bitmap(), get_best_disjunct_quick(), get_best_ror_intersect(), get_key_scans_params(), get_sweep_read_cost(), is_key_scan_ror(), and QUICK_INDEX_MERGE_SELECT::push_quick_back().
01509 { return FALSE; }
Here is the caller graph for this function:

| void handler::print_error | ( | int | error, | |
| myf | errflag | |||
| ) | [virtual] |
Reimplemented in ha_ndbcluster, and ha_partition.
Definition at line 1995 of file handler.cc.
References String::append(), String::c_ptr(), String::c_ptr_safe(), st_table_share::db, DBUG_ENTER, DBUG_PRINT, DBUG_VOID_RETURN, ER, ER_BINLOG_ROW_LOGGING_FAILED, ER_CANNOT_ADD_FOREIGN, ER_CHECKREAD, ER_CRASHED_ON_REPAIR, ER_CRASHED_ON_USAGE, ER_DROP_INDEX_FK, ER_DUP_ENTRY, ER_DUP_KEY, ER_DUP_UNIQUE, ER_FILE_NOT_FOUND, ER_FILE_USED, ER_FOREIGN_DUPLICATE_KEY, ER_GET_ERRMSG, ER_GET_ERRNO, ER_GET_TEMPORARY_ERRMSG, ER_ILLEGAL_HA, ER_KEY_NOT_FOUND, ER_LOCK_DEADLOCK, ER_LOCK_TABLE_FULL, ER_LOCK_WAIT_TIMEOUT, ER_NO_REFERENCED_ROW_2, ER_NO_SUCH_TABLE, ER_NOT_KEYFILE, ER_OLD_KEYFILE, ER_OPEN_AS_READONLY, ER_OUT_OF_RESOURCES, ER_READ_ONLY_TRANSACTION, ER_RECORD_FILE_FULL, ER_ROW_IS_REFERENCED_2, ER_TABLE_DEF_CHANGED, ER_TABLE_NEEDS_UPGRADE, ER_UNKNOWN_ERROR, ER_UNSUPPORTED_EXTENSION, ER_WRONG_MRG_TABLE, FALSE, get_dup_key(), get_error_message(), HA_ERR_CANNOT_ADD_FOREIGN, HA_ERR_CRASHED, HA_ERR_CRASHED_ON_REPAIR, HA_ERR_CRASHED_ON_USAGE, HA_ERR_DROP_INDEX_FK, HA_ERR_END_OF_FILE, HA_ERR_FOREIGN_DUPLICATE_KEY, HA_ERR_FOUND_DUPP_KEY, HA_ERR_FOUND_DUPP_UNIQUE, HA_ERR_INDEX_FILE_FULL, HA_ERR_KEY_NOT_FOUND, HA_ERR_LOCK_DEADLOCK, HA_ERR_LOCK_TABLE_FULL, HA_ERR_LOCK_WAIT_TIMEOUT, HA_ERR_NO_ACTIVE_RECORD, HA_ERR_NO_REFERENCED_ROW, HA_ERR_NO_SUCH_TABLE, HA_ERR_NOT_A_TABLE, HA_ERR_NULL_IN_SPATIAL, HA_ERR_OLD_FILE, HA_ERR_OUT_OF_MEM, HA_ERR_RBR_LOGGING_FAILED, HA_ERR_READ_ONLY_TRANSACTION, HA_ERR_RECORD_CHANGED, HA_ERR_RECORD_FILE_FULL, HA_ERR_ROW_IS_REFERENCED, HA_ERR_TABLE_DEF_CHANGED, HA_ERR_TABLE_NEEDS_UPGRADE, HA_ERR_TABLE_READONLY, HA_ERR_UNSUPPORTED, HA_ERR_WRONG_COMMAND, HA_ERR_WRONG_IN_RECORD, HA_ERR_WRONG_MRG_TABLE_DEF, String::is_empty(), key, st_table::key_info, key_unpack(), String::length(), MAX_KEY_LENGTH, my_error(), MYF, MYSQL_ERRMSG_SIZE, st_key::name, print_keydup_error(), String::ptr(), LEX_STRING::str, STRING_WITH_LEN, strlen(), system_charset_info, table, st_table_share::table_name, table_share, and table_type().
Referenced by check_lock_and_start_stmt(), create_myisam_from_heap(), create_myisam_tmp_table(), do_select(), end_unique_update(), Materialized_cursor::fetch(), find_all_keys(), ha_delete_table(), handle_grant_table(), delayed_insert::handle_inserts(), modify_grant_table(), mysql_alter_table(), mysql_delete(), mysql_discard_or_import_tablespace(), mysql_ha_read(), mysql_insert(), mysql_install_plugin(), mysql_load(), mysql_uninstall_plugin(), open_tmp_table(), opt_sum_query(), replace_column_table(), replace_db_table(), replace_routine_table(), replace_table_table(), replace_user_table(), report_error(), rr_from_cache(), rr_handle_error(), update_user_table(), and write_record().
01996 { 01997 DBUG_ENTER("handler::print_error"); 01998 DBUG_PRINT("enter",("error: %d",error)); 01999 02000 int textno=ER_GET_ERRNO; 02001 switch (error) { 02002 case EACCES: 02003 textno=ER_OPEN_AS_READONLY; 02004 break; 02005 case EAGAIN: 02006 textno=ER_FILE_USED; 02007 break; 02008 case ENOENT: 02009 textno=ER_FILE_NOT_FOUND; 02010 break; 02011 case HA_ERR_KEY_NOT_FOUND: 02012 case HA_ERR_NO_ACTIVE_RECORD: 02013 case HA_ERR_END_OF_FILE: 02014 textno=ER_KEY_NOT_FOUND; 02015 break; 02016 case HA_ERR_WRONG_MRG_TABLE_DEF: 02017 textno=ER_WRONG_MRG_TABLE; 02018 break; 02019 case HA_ERR_FOUND_DUPP_KEY: 02020 { 02021 uint key_nr=get_dup_key(error); 02022 if ((int) key_nr >= 0) 02023 { 02024 print_keydup_error(key_nr, ER(ER_DUP_ENTRY)); 02025 DBUG_VOID_RETURN; 02026 } 02027 textno=ER_DUP_KEY; 02028 break; 02029 } 02030 case HA_ERR_FOREIGN_DUPLICATE_KEY: 02031 { 02032 uint key_nr= get_dup_key(error); 02033 if ((int) key_nr >= 0) 02034 { 02035 uint max_length; 02036 /* Write the key in the error message */ 02037 char key[MAX_KEY_LENGTH]; 02038 String str(key,sizeof(key),system_charset_info); 02039 /* Table is opened and defined at this point */ 02040 key_unpack(&str,table,(uint) key_nr); 02041 max_length= (MYSQL_ERRMSG_SIZE- 02042 (uint) strlen(ER(ER_FOREIGN_DUPLICATE_KEY))); 02043 if (str.length() >= max_length) 02044 { 02045 str.length(max_length-4); 02046 str.append(STRING_WITH_LEN("...")); 02047 } 02048 my_error(ER_FOREIGN_DUPLICATE_KEY, MYF(0), table_share->table_name.str, 02049 str.c_ptr(), key_nr+1); 02050 DBUG_VOID_RETURN; 02051 } 02052 textno= ER_DUP_KEY; 02053 break; 02054 } 02055 case HA_ERR_NULL_IN_SPATIAL: 02056 textno= ER_UNKNOWN_ERROR; 02057 break; 02058 case HA_ERR_FOUND_DUPP_UNIQUE: 02059 textno=ER_DUP_UNIQUE; 02060 break; 02061 case HA_ERR_RECORD_CHANGED: 02062 textno=ER_CHECKREAD; 02063 break; 02064 case HA_ERR_CRASHED: 02065 textno=ER_NOT_KEYFILE; 02066 break; 02067 case HA_ERR_WRONG_IN_RECORD: 02068 textno= ER_CRASHED_ON_USAGE; 02069 break; 02070 case HA_ERR_CRASHED_ON_USAGE: 02071 textno=ER_CRASHED_ON_USAGE; 02072 break; 02073 case HA_ERR_NOT_A_TABLE: 02074 textno= error; 02075 break; 02076 case HA_ERR_CRASHED_ON_REPAIR: 02077 textno=ER_CRASHED_ON_REPAIR; 02078 break; 02079 case HA_ERR_OUT_OF_MEM: 02080 textno=ER_OUT_OF_RESOURCES; 02081 break; 02082 case HA_ERR_WRONG_COMMAND: 02083 textno=ER_ILLEGAL_HA; 02084 break; 02085 case HA_ERR_OLD_FILE: 02086 textno=ER_OLD_KEYFILE; 02087 break; 02088 case HA_ERR_UNSUPPORTED: 02089 textno=ER_UNSUPPORTED_EXTENSION; 02090 break; 02091 case HA_ERR_RECORD_FILE_FULL: 02092 case HA_ERR_INDEX_FILE_FULL: 02093 textno=ER_RECORD_FILE_FULL; 02094 break; 02095 case HA_ERR_LOCK_WAIT_TIMEOUT: 02096 textno=ER_LOCK_WAIT_TIMEOUT; 02097 break; 02098 case HA_ERR_LOCK_TABLE_FULL: 02099 textno=ER_LOCK_TABLE_FULL; 02100 break; 02101 case HA_ERR_LOCK_DEADLOCK: 02102 textno=ER_LOCK_DEADLOCK; 02103 break; 02104 case HA_ERR_READ_ONLY_TRANSACTION: 02105 textno=ER_READ_ONLY_TRANSACTION; 02106 break; 02107 case HA_ERR_CANNOT_ADD_FOREIGN: 02108 textno=ER_CANNOT_ADD_FOREIGN; 02109 break; 02110 case HA_ERR_ROW_IS_REFERENCED: 02111 { 02112 String str; 02113 get_error_message(error, &str); 02114 my_error(ER_ROW_IS_REFERENCED_2, MYF(0), str.c_ptr_safe()); 02115 DBUG_VOID_RETURN; 02116 } 02117 case HA_ERR_NO_REFERENCED_ROW: 02118 { 02119 String str; 02120 get_error_message(error, &str); 02121 my_error(ER_NO_REFERENCED_ROW_2, MYF(0), str.c_ptr_safe()); 02122 DBUG_VOID_RETURN; 02123 } 02124 case HA_ERR_TABLE_DEF_CHANGED: 02125 textno=ER_TABLE_DEF_CHANGED; 02126 break; 02127 case HA_ERR_NO_SUCH_TABLE: 02128 my_error(ER_NO_SUCH_TABLE, MYF(0), table_share->db.str, 02129 table_share->table_name.str); 02130 break; 02131 case HA_ERR_RBR_LOGGING_FAILED: 02132 textno= ER_BINLOG_ROW_LOGGING_FAILED; 02133 break; 02134 case HA_ERR_DROP_INDEX_FK: 02135 { 02136 const char *ptr= "???"; 02137 uint key_nr= get_dup_key(error); 02138 if ((int) key_nr >= 0) 02139 ptr= table->key_info[key_nr].name; 02140 my_error(ER_DROP_INDEX_FK, MYF(0), ptr); 02141 DBUG_VOID_RETURN; 02142 } 02143 case HA_ERR_TABLE_NEEDS_UPGRADE: 02144 textno=ER_TABLE_NEEDS_UPGRADE; 02145 break; 02146 case HA_ERR_TABLE_READONLY: 02147 textno= ER_OPEN_AS_READONLY; 02148 break; 02149 default: 02150 { 02151 /* The error was "unknown" to this function. 02152 Ask handler if it has got a message for this error */ 02153 bool temporary= FALSE; 02154 String str; 02155 temporary= get_error_message(error, &str); 02156 if (!str.is_empty()) 02157 { 02158 const char* engine= table_type(); 02159 if (temporary) 02160 my_error(ER_GET_TEMPORARY_ERRMSG, MYF(0), error, str.ptr(), engine); 02161 else 02162 my_error(ER_GET_ERRMSG, MYF(0), error, str.ptr(), engine); 02163 } 02164 else 02165 my_error(ER_GET_ERRNO,errflag,error); 02166 DBUG_VOID_RETURN; 02167 } 02168 } 02169 my_error(textno, errflag, table_share->table_name.str, error); 02170 DBUG_VOID_RETURN; 02171 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void handler::print_keydup_error | ( | uint | key_nr, | |
| const char * | msg | |||
| ) |
Definition at line 1967 of file handler.cc.
References String::append(), String::c_ptr(), ER_DUP_ENTRY, key, st_table::key_info, key_unpack(), String::length(), MAX_KEY_LENGTH, my_printf_error(), MYF, MYSQL_ERRMSG_SIZE, st_key::name, STRING_WITH_LEN, strlen(), system_charset_info, and table.
Referenced by print_error().
01968 { 01969 /* Write the duplicated key in the error message */ 01970 char key[MAX_KEY_LENGTH]; 01971 String str(key,sizeof(key),system_charset_info); 01972 /* Table is opened and defined at this point */ 01973 key_unpack(&str,table,(uint) key_nr); 01974 uint max_length=MYSQL_ERRMSG_SIZE-(uint) strlen(msg); 01975 if (str.length() >= max_length) 01976 { 01977 str.length(max_length-4); 01978 str.append(STRING_WITH_LEN("...")); 01979 } 01980 my_printf_error(ER_DUP_ENTRY, msg, 01981 MYF(0), str.c_ptr(), table->key_info[key_nr].name); 01982 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1514 of file handler.cc.
References DBUG_ENTER, DBUG_RETURN, error, HA_ERR_RECORD_DELETED, ha_index_end(), ha_index_init(), HA_READ_ORDER, ha_rnd_end(), ha_rnd_init(), st_table::in_use, index_first(), index_flags(), LOCK_status, MAX_KEY, rnd_next(), statistic_increment, and table.
Referenced by join_read_system().
01515 { 01516 register int error; 01517 DBUG_ENTER("handler::read_first_row"); 01518 01519 statistic_increment(table->in_use->status_var.ha_read_first_count, 01520 &LOCK_status); 01521 01522 /* 01523 If there is very few deleted rows in the table, find the first row by 01524 scanning the table. 01525 TODO remove the test for HA_READ_ORDER 01526 */ 01527 if (stats.deleted < 10 || primary_key >= MAX_KEY || 01528 !(index_flags(primary_key, 0, 0) & HA_READ_ORDER)) 01529 { 01530 (void) ha_rnd_init(1); 01531 while ((error= rnd_next(buf)) == HA_ERR_RECORD_DELETED) ; 01532 (void) ha_rnd_end(); 01533 } 01534 else 01535 { 01536 /* Find the first row through the primary key */ 01537 (void) ha_index_init(primary_key, 0); 01538 error=index_first(buf); 01539 (void) ha_index_end(); 01540 } 01541 DBUG_RETURN(error); 01542 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int handler::read_multi_range_first | ( | KEY_MULTI_RANGE ** | found_range_p, | |
| KEY_MULTI_RANGE * | ranges, | |||
| uint | range_count, | |||
| bool | sorted, | |||
| HANDLER_BUFFER * | buffer | |||
| ) | [virtual] |
Reimplemented in ha_ndbcluster.
Definition at line 2934 of file handler.cc.
References active_index, buffer, st_table::column_bitmaps_set(), DBUG_ENTER, DBUG_PRINT, DBUG_RETURN, st_key_multi_range::end_key, EQ_RANGE, HA_ERR_END_OF_FILE, st_key_range::length, st_table::mark_columns_used_by_index_no_reset(), multi_range_buffer, multi_range_curr, multi_range_end, multi_range_sorted, st_key_multi_range::range_flag, read_range_first(), st_table::read_set, st_key_multi_range::start_key, table, test, and st_table::write_set.
Referenced by QUICK_RANGE_SELECT::get_next().
02937 { 02938 int result= HA_ERR_END_OF_FILE; 02939 DBUG_ENTER("handler::read_multi_range_first"); 02940 multi_range_sorted= sorted; 02941 multi_range_buffer= buffer; 02942 02943 table->mark_columns_used_by_index_no_reset(active_index, table->read_set); 02944 table->column_bitmaps_set(table->read_set, table->write_set); 02945 02946 for (multi_range_curr= ranges, multi_range_end= ranges + range_count; 02947 multi_range_curr < multi_range_end; 02948 multi_range_curr++) 02949 { 02950 result= read_range_first(multi_range_curr->start_key.length ? 02951 &multi_range_curr->start_key : 0, 02952 multi_range_curr->end_key.length ? 02953 &multi_range_curr->end_key : 0, 02954 test(multi_range_curr->range_flag & EQ_RANGE), 02955 multi_range_sorted); 02956 if (result != HA_ERR_END_OF_FILE) 02957 break; 02958 } 02959 02960 *found_range_p= multi_range_curr; 02961 DBUG_PRINT("exit",("result %d", result)); 02962 DBUG_RETURN(result); 02963 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int handler::read_multi_range_next | ( | KEY_MULTI_RANGE ** | found_range_p | ) | [virtual] |
Reimplemented in ha_ndbcluster.
Definition at line 2985 of file handler.cc.
References DBUG_ASSERT, DBUG_ENTER, DBUG_PRINT, DBUG_RETURN, st_key_multi_range::end_key, EQ_RANGE, HA_ERR_END_OF_FILE, st_key_range::length, multi_range_curr, multi_range_end, multi_range_sorted, st_key_multi_range::range_flag, read_range_first(), read_range_next(), st_key_multi_range::start_key, test, and UNIQUE_RANGE.
Referenced by QUICK_RANGE_SELECT::get_next().
02986 { 02987 int result; 02988 DBUG_ENTER("handler::read_multi_range_next"); 02989 02990 /* We should not be called after the last call returned EOF. */ 02991 DBUG_ASSERT(multi_range_curr < multi_range_end); 02992 02993 do 02994 { 02995 /* Save a call if there can be only one row in range. */ 02996 if (multi_range_curr->range_flag != (UNIQUE_RANGE | EQ_RANGE)) 02997 { 02998 result= read_range_next(); 02999 03000 /* On success or non-EOF errors jump to the end. */ 03001 if (result != HA_ERR_END_OF_FILE) 03002 break; 03003 } 03004 else 03005 { 03006 /* 03007 We need to set this for the last range only, but checking this 03008 condition is more expensive than just setting the result code. 03009 */ 03010 result= HA_ERR_END_OF_FILE; 03011 } 03012 03013 /* Try the next range(s) until one matches a record. */ 03014 for (multi_range_curr++; 03015 multi_range_curr < multi_range_end; 03016 multi_range_curr++) 03017 { 03018 result= read_range_first(multi_range_curr->start_key.length ? 03019 &multi_range_curr->start_key : 0, 03020 multi_range_curr->end_key.length ? 03021 &multi_range_curr->end_key : 0, 03022 test(multi_range_curr->range_flag & EQ_RANGE), 03023 multi_range_sorted); 03024 if (result != HA_ERR_END_OF_FILE) 03025 break; 03026 } 03027 } 03028 while ((result == HA_ERR_END_OF_FILE) && 03029 (multi_range_curr < multi_range_end)); 03030 03031 *found_range_p= multi_range_curr; 03032 DBUG_PRINT("exit",("handler::read_multi_range_next: result %d", result)); 03033 DBUG_RETURN(result); 03034 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int handler::read_range_first | ( | const key_range * | start_key, | |
| const key_range * | end_key, | |||
| bool | eq_range, | |||
| bool | sorted | |||
| ) | [virtual] |
Reimplemented in ha_federated, ha_ndbcluster, and ha_partition.
Definition at line 3057 of file handler.cc.
References active_index, compare_key(), DBUG_ENTER, DBUG_RETURN, end_range, eq_range, st_key_range::flag, HA_ERR_END_OF_FILE, HA_ERR_KEY_NOT_FOUND, HA_READ_AFTER_KEY, HA_READ_BEFORE_KEY, index_first(), index_read(), st_key_range::key, key_compare_result_on_equal, st_table::key_info, st_key::key_part, st_key_range::length, range_key_part, st_table::record, save_end_range, and table.
Referenced by QUICK_RANGE_SELECT::get_next_prefix(), read_multi_range_first(), and read_multi_range_next().
03060 { 03061 int result; 03062 DBUG_ENTER("handler::read_range_first"); 03063 03064 eq_range= eq_range_arg; 03065 end_range= 0; 03066 if (end_key) 03067 { 03068 end_range= &save_end_range; 03069 save_end_range= *end_key; 03070 key_compare_result_on_equal= ((end_key->flag == HA_READ_BEFORE_KEY) ? 1 : 03071 (end_key->flag == HA_READ_AFTER_KEY) ? -1 : 0); 03072 } 03073 range_key_part= table->key_info[active_index].key_part; 03074 03075 if (!start_key) // Read first record 03076 result= index_first(table->record[0]); 03077 else 03078 result= index_read(table->record[0], 03079 start_key->key, 03080 start_key->length, 03081 start_key->flag); 03082 if (result) 03083 DBUG_RETURN((result == HA_ERR_KEY_NOT_FOUND) 03084 ? HA_ERR_END_OF_FILE 03085 : result); 03086 03087 DBUG_RETURN (compare_key(end_range) <= 0 ? 0 : HA_ERR_END_OF_FILE); 03088 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int handler::read_range_next | ( | ) | [virtual] |
Reimplemented in ha_federated, ha_ndbcluster, and ha_partition.
Definition at line 3106 of file handler.cc.
References compare_key(), DBUG_ENTER, DBUG_RETURN, end_range, eq_range, HA_ERR_END_OF_FILE, index_next(), index_next_same(), st_key_range::key, st_key_range::length, st_table::record, and table.
Referenced by read_multi_range_next().
03107 { 03108 int result; 03109 DBUG_ENTER("handler::read_range_next"); 03110 03111 if (eq_range) 03112 { 03113 /* We trust that index_next_same always gives a row in range */ 03114 DBUG_RETURN(index_next_same(table->record[0], 03115 end_range->key, 03116 end_range->length)); 03117 } 03118 result= index_next(table->record[0]); 03119 if (result) 03120 DBUG_RETURN(result); 03121 DBUG_RETURN(compare_key(end_range) <= 0 ? 0 : HA_ERR_END_OF_FILE); 03122 }
Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented in ha_federated, ha_heap, ha_innobase, and ha_partition.
Definition at line 993 of file handler.h.
References rows2double.
Referenced by get_index_for_order(), get_key_scans_params(), and get_sweep_read_cost().
00994 { return rows2double(ranges+rows); }
Here is the caller graph for this function:

| virtual ha_rows handler::records | ( | ) | [inline, virtual] |
Reimplemented in ha_ndbcluster.
Definition at line 1024 of file handler.h.
Referenced by make_join_statistics(), and select_describe().
01024 { return stats.records; }
Here is the caller graph for this function:

| virtual ha_rows handler::records_in_range | ( | uint | inx, | |
| key_range * | min_key, | |||
| key_range * | max_key | |||
| ) | [inline, virtual] |
Reimplemented in ha_federated, ha_heap, ha_innobase, ha_myisam, ha_myisammrg, ha_ndbcluster, ha_partition, and ha_example.
Definition at line 1222 of file handler.h.
Referenced by check_quick_keys().
01224 { return (ha_rows) 10; }
Here is the caller graph for this function:

| virtual uint handler::referenced_by_foreign_key | ( | ) | [inline, virtual] |
Reimplemented in ha_innobase.
Definition at line 1395 of file handler.h.
Referenced by write_record().
Here is the caller graph for this function:

| virtual my_bool handler::register_query_cache_table | ( | THD * | thd, | |
| char * | table_key, | |||
| uint | key_length, | |||
| qc_engine_callback * | engine_callback, | |||
| ulonglong * | engine_data | |||
| ) | [inline, virtual] |
| virtual void handler::release_auto_increment | ( | ) | [inline, private, virtual] |
Reimplemented in ha_partition.
Definition at line 1275 of file handler.h.
Referenced by ha_release_auto_increment().
Here is the caller graph for this function:

| virtual int handler::rename_partitions | ( | const char * | path | ) | [inline, virtual] |
Reimplemented in ha_partition.
Definition at line 1475 of file handler.h.
References HA_ERR_WRONG_COMMAND.
01476 { return HA_ERR_WRONG_COMMAND; }
| int handler::rename_table | ( | const char * | from, | |
| const char * | to | |||
| ) | [virtual] |
Reimplemented in ha_heap, ha_innobase, ha_myisam, ha_ndbcluster, ha_partition, and ha_example.
Definition at line 2337 of file handler.cc.
References bas_ext(), error, my_errno, and rename_file_ext().
Referenced by execute_ddl_log_action(), and mysql_rename_table().
02338 { 02339 int error= 0; 02340 for (const char **ext= bas_ext(); *ext ; ext++) 02341 { 02342 if (rename_file_ext(from, to, *ext)) 02343 { 02344 if ((error=my_errno) != ENOENT) 02345 break; 02346 error= 0; 02347 } 02348 } 02349 return error; 02350 }
Here is the call graph for this function:

Here is the caller graph for this function:

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

| virtual int handler::repair_partitions | ( | THD * | thd | ) | [inline, virtual] |
Reimplemented in ha_partition.
Definition at line 1483 of file handler.h.
References HA_ERR_WRONG_COMMAND.
01484 { return HA_ERR_WRONG_COMMAND; }
| virtual int handler::reset | ( | void | ) | [inline, virtual] |
Reimplemented in ha_heap, ha_innobase, ha_myisam, ha_myisammrg, ha_ndbcluster, ha_partition, and ha_example.
Definition at line 1239 of file handler.h.
Referenced by ha_reset().
Here is the caller graph for this function:

| virtual int handler::reset_auto_increment | ( | ulonglong | value | ) | [inline, virtual] |
Reimplemented in ha_innobase.
Definition at line 1304 of file handler.h.
References HA_ERR_WRONG_COMMAND.
Referenced by mysql_delete().
01305 { return HA_ERR_WRONG_COMMAND; }
Here is the caller graph for this function:

Reimplemented in ha_myisam.
Definition at line 1218 of file handler.h.
References HA_ERR_WRONG_COMMAND.
Referenced by remove_dup_with_compare().
01219 { return HA_ERR_WRONG_COMMAND; }
Here is the caller graph for this function:

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

| void handler::restore_auto_increment | ( | ulonglong | prev_insert_id | ) | [inline] |
Reimplemented in ha_partition.
Definition at line 1283 of file handler.h.
References insert_id_for_cur_row, and next_insert_id.
Referenced by write_record().
01284 { 01285 /* 01286 Insertion of a row failed, re-use the lastly generated auto_increment 01287 id, for the next row. This is achieved by resetting next_insert_id to 01288 what it was before the failed insertion (that old value is provided by 01289 the caller). If that value was 0, it was the first row of the INSERT; 01290 then if insert_id_for_cur_row contains 0 it means no id was generated 01291 for this first row, so no id was generated since the INSERT started, so 01292 we should set next_insert_id to 0; if insert_id_for_cur_row is not 0, it 01293 is the generated id of the first and failed row, so we use it. 01294 */ 01295 next_insert_id= (prev_insert_id > 0) ? prev_insert_id : 01296 insert_id_for_cur_row; 01297 }
Here is the caller graph for this function:

| virtual int handler::rnd_end | ( | ) | [inline, protected, virtual] |
Reimplemented in ha_federated, ha_innobase, ha_ndbcluster, ha_partition, ha_tina, and ha_example.
Definition at line 876 of file handler.h.
Referenced by ha_rnd_end().
Here is the caller graph for this function:

| virtual int handler::rnd_init | ( | bool | scan | ) | [protected, 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 ha_rnd_init().
Here is the caller graph for this function:

| virtual int handler::rnd_next | ( | byte * | buf | ) | [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 create_myisam_from_heap(), Materialized_cursor::fetch(), find_all_keys(), handle_grant_table(), mysql_checksum_table(), mysql_ha_read(), read_first_row(), remove_dup_with_compare(), remove_dup_with_hash_index(), and rr_sequential().
Here is the caller graph for this function:

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 end_unique_update(), find_all_keys(), QUICK_ROR_UNION_SELECT::get_next(), QUICK_ROR_INTERSECT_SELECT::get_next(), rr_from_pointers(), rr_from_tempfile(), and write_record().
Here is the caller graph for this function:

Definition at line 1220 of file handler.h.
References HA_ERR_WRONG_COMMAND.
01221 { return HA_ERR_WRONG_COMMAND; }
| virtual double handler::scan_time | ( | ) | [inline, virtual] |
Reimplemented in ha_federated, ha_heap, ha_innobase, ha_myisammrg, ha_ndbcluster, ha_partition, ha_tina, and ha_example.
Definition at line 991 of file handler.h.
References IO_SIZE, and ulonglong2double.
Referenced by best_access_path(), get_index_for_order(), and SQL_SELECT::test_quick_select().
00992 { return ulonglong2double(stats.data_file_length) / IO_SIZE + 2; }
Here is the caller graph for this function:

| virtual void handler::set_auto_partitions | ( | partition_info * | part_info | ) | [inline, virtual] |
Reimplemented in ha_ndbcluster.
Definition at line 1404 of file handler.h.
Referenced by mysql_create_table_internal().
Here is the caller graph for this function:

| void handler::set_next_insert_id | ( | ulonglong | id | ) | [inline] |
Definition at line 1278 of file handler.h.
References DBUG_PRINT, and next_insert_id.
Referenced by adjust_next_insert_id_after_explicit_value(), and update_auto_increment().
01279 { 01280 DBUG_PRINT("info",("auto_increment: next value %lu", (ulong)id)); 01281 next_insert_id= id; 01282 }
Here is the caller graph for this function:

| virtual void handler::set_part_info | ( | partition_info * | part_info | ) | [inline, virtual] |
| virtual bool handler::start_bulk_delete | ( | ) | [inline, virtual] |
Definition at line 1117 of file handler.h.
Referenced by mysql_delete().
Here is the caller graph for this function:

| virtual void handler::start_bulk_insert | ( | ha_rows | rows | ) | [inline, protected, virtual] |
Reimplemented in ha_myisam, ha_ndbcluster, ha_partition, and ha_archive.
Definition at line 881 of file handler.h.
Referenced by ha_start_bulk_insert().
Here is the caller graph for this function:

| virtual bool handler::start_bulk_update | ( | ) | [inline, virtual] |
| virtual int handler::start_stmt | ( | THD * | thd, | |
| thr_lock_type | lock_type | |||
| ) | [inline, virtual] |
Reimplemented in ha_innobase, ha_ndbcluster, and ha_partition.
Definition at line 1261 of file handler.h.
Referenced by check_lock_and_start_stmt().
Here is the caller graph for this function:

| virtual THR_LOCK_DATA** handler::store_lock | ( | THD * | thd, | |
| THR_LOCK_DATA ** | to, | |||
| enum thr_lock_type | lock_type | |||
| ) | [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.
| virtual uint8 handler::table_cache_type | ( | ) | [inline, virtual] |
Reimplemented in ha_federated, ha_innobase, ha_ndbcluster, and ha_partition.
Definition at line 1493 of file handler.h.
References HA_CACHE_TBL_NONTRANSACT.
01493 { return HA_CACHE_TBL_NONTRANSACT; }
| virtual ulonglong handler::table_flags | ( | void | ) | const [protected, 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 get_dynamic_partition_info(), ha_open(), and init().
Here is the caller graph for this function:

| virtual const char* handler::table_type | ( | ) | 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 get_schema_tables_record(), print_error(), and store_create_info().
Here is the caller graph for this function:

| virtual void handler::try_semi_consistent_read | ( | bool | ) | [inline, virtual] |
| virtual void handler::unlock_row | ( | ) | [inline, virtual] |
Reimplemented in ha_innobase, ha_ndbcluster, and ha_partition.
Definition at line 1260 of file handler.h.
Referenced by evaluate_join_record(), find_all_keys(), and mysql_delete().
Here is the caller graph for this function:

| bool handler::update_auto_increment | ( | ) |
Reimplemented in ha_federated.
Definition at line 1698 of file handler.cc.
References adjust_next_insert_id_after_explicit_value(), append(), AUTO_INC_DEFAULT_NB_MAX, AUTO_INC_DEFAULT_NB_MAX_BITS, AUTO_INC_DEFAULT_NB_ROWS, auto_inc_interval_for_cur_row, st_table::auto_increment_field_not_null, system_variables::auto_increment_increment, system_variables::auto_increment_offset, compute_next_insert_id(), DBUG_ASSERT, DBUG_ENTER, DBUG_PRINT, DBUG_RETURN, estimation_rows_to_insert, FALSE, get_auto_increment(), st_table::in_use, insert_id_for_cur_row, Discrete_interval::maximum(), Discrete_interval::minimum(), MODE_NO_AUTO_VALUE_ON_ZERO, next_insert_id, st_table::next_number_field, st_table_share::next_number_key_offset, NULL, prev_insert_id(), Discrete_interval::replace(), st_table::s, set_if_smaller, set_next_insert_id(), Field::store(), table, TRUE, unlikely, Field::val_int(), and Discrete_interval::values().
Referenced by ha_archive::write_row(), ha_myisammrg::write_row(), ha_myisam::write_row(), and ha_heap::write_row().
01699 { 01700 ulonglong nr, nb_reserved_values; 01701 bool append= FALSE; 01702 THD *thd= table->in_use; 01703 struct system_variables *variables= &thd->variables; 01704 bool auto_increment_field_not_null; 01705 bool result= 0; 01706 DBUG_ENTER("handler::update_auto_increment"); 01707 01708 /* 01709 next_insert_id is a "cursor" into the reserved interval, it may go greater 01710 than the interval, but not smaller. 01711 */ 01712 DBUG_ASSERT(next_insert_id >= auto_inc_interval_for_cur_row.minimum()); 01713 auto_increment_field_not_null= table->auto_increment_field_not_null; 01714 table->auto_increment_field_not_null= FALSE; // to reset for next row 01715 01716 if ((nr= table->next_number_field->val_int()) != 0 || 01717 auto_increment_field_not_null && 01718 thd->variables.sql_mode & MODE_NO_AUTO_VALUE_ON_ZERO) 01719 { 01720 /* 01721 Update next_insert_id if we had already generated a value in this 01722 statement (case of INSERT VALUES(null),(3763),(null): 01723 the last NULL needs to insert 3764, not the value of the first NULL plus 01724 1). 01725 */ 01726 adjust_next_insert_id_after_explicit_value(nr); 01727 insert_id_for_cur_row= 0; // didn't generate anything 01728 DBUG_RETURN(0); 01729 } 01730 01731 if ((nr= next_insert_id) >= auto_inc_interval_for_cur_row.maximum()) 01732 { 01733 /* next_insert_id is beyond what is reserved, so we reserve more. */ 01734 const Discrete_interval *forced= 01735 thd->auto_inc_intervals_forced.get_next(); 01736 if (forced != NULL) 01737 { 01738 nr= forced->minimum(); 01739 nb_reserved_values= forced->values(); 01740 } 01741 else 01742 { 01743 /* 01744 handler::estimation_rows_to_insert was set by 01745 handler::ha_start_bulk_insert(); if 0 it means "unknown". 01746 */ 01747 uint nb_already_reserved_intervals= 01748 thd->auto_inc_intervals_in_cur_stmt_for_binlog.nb_elements(); 01749 ulonglong nb_desired_values; 01750 /* 01751 If an estimation was given to the engine: 01752 - use it. 01753 - if we already reserved numbers, it means the estimation was 01754 not accurate, then we'll reserve 2*AUTO_INC_DEFAULT_NB_ROWS the 2nd 01755 time, twice that the 3rd time etc. 01756 If no estimation was given, use those increasing defaults from the 01757 start, starting from AUTO_INC_DEFAULT_NB_ROWS. 01758 Don't go beyond a max to not reserve "way too much" (because 01759 reservation means potentially losing unused values). 01760 */ 01761 if (nb_already_reserved_intervals == 0 && 01762 (estimation_rows_to_insert > 0)) 01763 nb_desired_values= estimation_rows_to_insert; 01764 else /* go with the increasing defaults */ 01765 { 01766 /* avoid overflow in formula, with this if() */ 01767 if (nb_already_reserved_intervals <= AUTO_INC_DEFAULT_NB_MAX_BITS) 01768 { 01769 nb_desired_values= AUTO_INC_DEFAULT_NB_ROWS * 01770 (1 << nb_already_reserved_intervals); 01771 set_if_smaller(nb_desired_values, AUTO_INC_DEFAULT_NB_MAX); 01772 } 01773 else 01774 nb_desired_values= AUTO_INC_DEFAULT_NB_MAX; 01775 } 01776 /* This call ignores all its parameters but nr, currently */ 01777 get_auto_increment(variables->auto_increment_offset, 01778 variables->auto_increment_increment, 01779 nb_desired_values, &nr, 01780 &nb_reserved_values); 01781 if (nr == ~(ulonglong) 0) 01782 result= 1; // Mark failure 01783 01784 /* 01785 That rounding below should not be needed when all engines actually 01786 respect offset and increment in get_auto_increment(). But they don't 01787 so we still do it. Wonder if for the not-first-in-index we should do 01788 it. Hope that this rounding didn't push us out of the interval; even 01789 if it did we cannot do anything about it (calling the engine again 01790 will not help as we inserted no row). 01791 */ 01792 nr= compute_next_insert_id(nr-1, variables); 01793 } 01794 01795 if (table->s->next_number_key_offset == 0) 01796 { 01797 /* We must defer the appending until "nr" has been possibly truncated */ 01798 append= TRUE; 01799 } 01800 else 01801 { 01802 /* 01803 For such auto_increment there is no notion of interval, just a 01804 singleton. The interval is not even stored in 01805 thd->auto_inc_interval_for_cur_row, so we are sure to call the engine 01806 for next row. 01807 */ 01808 DBUG_PRINT("info",("auto_increment: special not-first-in-index")); 01809 } 01810 } 01811 01812 DBUG_PRINT("info",("auto_increment: %lu", (ulong) nr)); 01813 01814 if (unlikely(table->next_number_field->store((longlong) nr, TRUE))) 01815 { 01816 /* 01817 field refused this value (overflow) and truncated it, use the result of 01818 the truncation (which is going to be inserted); however we try to 01819 decrease it to honour auto_increment_* variables. 01820 That will shift the left bound of the reserved interval, we don't 01821 bother shifting the right bound (anyway any other value from this 01822 interval will cause a duplicate key). 01823 */ 01824 nr= prev_insert_id(table->next_number_field->val_int(), variables); 01825 if (unlikely(table->next_number_field->store((longlong) nr, TRUE))) 01826 nr= table->next_number_field->val_int(); 01827 } 01828 if (append) 01829 { 01830 auto_inc_interval_for_cur_row.replace(nr, nb_reserved_values, 01831 variables->auto_increment_increment); 01832 /* Row-based replication does not need to store intervals in binlog */ 01833 if (!thd->current_stmt_binlog_row_based) 01834 result= result || 01835 thd->auto_inc_intervals_in_cur_stmt_for_binlog.append(auto_inc_interval_for_cur_row.minimum(), 01836 auto_inc_interval_for_cur_row.values(), 01837 variables->auto_increment_increment); 01838 } 01839 01840 /* 01841 Record this autogenerated value. If the caller then 01842 succeeds to insert this value, it will call 01843 record_first_successful_insert_id_in_cur_stmt() 01844 which will set first_successful_insert_id_in_cur_stmt if it's not 01845 already set. 01846 */ 01847 insert_id_for_cur_row= nr; 01848 /* 01849 Set next insert id to point to next auto-increment value to be able to 01850 handle multi-row statements. 01851 */ 01852 set_next_insert_id(compute_next_insert_id(nr, variables)); 01853 01854 DBUG_RETURN(result); 01855 }
Here is the call graph for this function:

Here is the caller graph for this function:

| virtual void handler::update_create_info | ( | HA_CREATE_INFO * | create_info | ) | [inline, virtual] |
Reimplemented in ha_heap, ha_myisam, ha_myisammrg, ha_partition, and ha_archive.
Definition at line 1307 of file handler.h.
Referenced by mysql_alter_table(), and store_create_info().
Here is the caller graph for this function:

| virtual int handler::update_row | ( | const byte *old_data | __attribute__((unused)), | |
| byte *new_data | __attribute__((unused)) | |||
| ) | [inline, virtual] |
Definition at line 1560 of file handler.h.
References HA_ERR_WRONG_COMMAND.
Referenced by end_unique_update(), and ha_update_row().
01562 { 01563 return HA_ERR_WRONG_COMMAND; 01564 }
Here is the caller graph for this function:

| virtual char* handler::update_table_comment | ( | const char * | comment | ) | [inline, virtual] |
Reimplemented in ha_innobase, ha_ndbcluster, and ha_partition.
Definition at line 1369 of file handler.h.
Referenced by get_schema_tables_record().
01370 { return (char*) comment;}
Here is the caller graph for this function:

| void handler::use_hidden_primary_key | ( | ) | [virtual] |
Definition at line 3581 of file handler.cc.
References table, and st_table::use_all_columns().
Referenced by st_table::mark_columns_needed_for_delete(), and st_table::mark_columns_needed_for_update().
03582 { 03583 /* fallback to use all columns in the table to identify row */ 03584 table->use_all_columns(); 03585 }
Here is the call graph for this function:

Here is the caller graph for this function:

| virtual bool handler::was_semi_consistent_read | ( | ) | [inline, virtual] |
Definition at line 1555 of file handler.h.
References HA_ERR_WRONG_COMMAND.
Referenced by create_myisam_from_heap(), end_unique_update(), end_update(), end_write(), end_write_group(), ha_write_row(), and JOIN::rollup_write_data().
01556 { 01557 return HA_ERR_WRONG_COMMAND; 01558 }
Here is the caller graph for this function:

friend class ha_partition [friend] |
Definition at line 904 of file handler.h.
Referenced by get_index(), index_end(), ha_myisammrg::index_first(), ha_myisam::index_first(), ha_heap::index_first(), ha_archive::index_init(), index_init(), ha_myisammrg::index_last(), ha_myisam::index_last(), ha_heap::index_last(), ha_myisammrg::index_next(), ha_myisam::index_next(), index_next_same(), ha_myisammrg::index_prev(), ha_myisam::index_prev(), ha_archive::index_read(), ha_myisammrg::index_read(), ha_myisam::index_read(), ha_heap::index_read(), ha_myisammrg::index_read_last(), ha_myisam::index_read_last(), ha_heap::index_read_last(), read_multi_range_first(), and read_range_first().
Definition at line 932 of file handler.h.
Referenced by ha_release_auto_increment(), and update_auto_increment().
ulonglong handler::cached_table_flags [protected] |
Definition at line 886 of file handler.h.
Referenced by end_unique_update(), ha_open(), ha_myisam::info(), and write_record().
Definition at line 897 of file handler.h.
Referenced by QUICK_RANGE_SELECT::get_next_prefix(), read_range_first(), and read_range_next().
Definition at line 902 of file handler.h.
Referenced by get_dup_key(), ha_myisammrg::info(), ha_myisam::info(), and ha_heap::info().
ha_rows handler::estimation_rows_to_insert [protected] |
Definition at line 880 of file handler.h.
Referenced by ha_end_bulk_insert(), ha_start_bulk_insert(), and update_auto_increment().
Definition at line 907 of file handler.h.
Referenced by ft_end(), ha_myisam::ft_init(), ha_myisam::ft_read(), Item_func_match::init_search(), and Item_func_match::val_real().
| const handlerton* handler::ht |
| enum { ... } handler::inited |
Referenced by close_thread_table(), subselect_indexsubquery_engine::exec(), subselect_uniquesubquery_engine::exec(), ha_index_end(), ha_index_init(), ha_index_or_rnd_end(), ha_reset(), ha_rnd_end(), ha_rnd_init(), ha_myisam::index_first(), ha_heap::index_first(), ha_myisam::index_last(), ha_heap::index_last(), ha_myisam::index_next(), ha_heap::index_next(), ha_myisam::index_prev(), ha_heap::index_prev(), ha_myisam::index_read(), ha_heap::index_read(), ha_myisam::index_read_last(), ha_heap::index_read_last(), QUICK_RANGE_SELECT::init(), init_read_record(), init_read_record_idx(), join_ft_read_first(), join_read_always_key(), join_read_first(), join_read_key(), join_read_last(), join_read_last_key(), mysql_ha_read(), QUICK_RANGE_SELECT::range_end(), QUICK_INDEX_MERGE_SELECT::read_keys_and_merge(), QUICK_RANGE_SELECT::reset(), QUICK_GROUP_MIN_MAX_SELECT::~QUICK_GROUP_MIN_MAX_SELECT(), QUICK_ROR_INTERSECT_SELECT::~QUICK_ROR_INTERSECT_SELECT(), and QUICK_ROR_UNION_SELECT::~QUICK_ROR_UNION_SELECT().
Definition at line 927 of file handler.h.
Referenced by ha_release_auto_increment(), restore_auto_increment(), update_auto_increment(), and write_record().
Definition at line 892 of file handler.h.
Referenced by read_multi_range_first(), and read_multi_range_next().
Definition at line 893 of file handler.h.
Referenced by read_multi_range_first(), and read_multi_range_next().
Definition at line 891 of file handler.h.
Referenced by read_multi_range_first(), and read_multi_range_next().
Definition at line 920 of file handler.h.
Referenced by adjust_next_insert_id_after_explicit_value(), ha_external_lock(), ha_release_auto_increment(), restore_auto_increment(), set_next_insert_id(), update_auto_increment(), and write_record().
| const COND* handler::pushed_cond |
Definition at line 885 of file handler.h.
Referenced by find_all_keys(), ha_open(), init_read_record(), ha_tina::position(), ha_archive::position(), ha_myisammrg::position(), ha_myisam::position(), ha_heap::position(), QUICK_INDEX_MERGE_SELECT::read_keys_and_merge(), and remove_dup_with_compare().
Definition at line 906 of file handler.h.
Referenced by best_access_path(), cmp_ref(), cost_group_min_max(), filesort(), get_best_disjunct_quick(), get_index_only_read_time(), QUICK_ROR_INTERSECT_SELECT::get_next(), ha_archive::ha_archive(), ha_open(), ha_myisammrg::info(), ha_myisam::info(), QUICK_ROR_UNION_SELECT::init(), init_read_record(), make_ror_scan(), make_select(), ha_tina::open(), ha_heap::open(), ha_tina::position(), ha_archive::position(), ha_myisammrg::position(), ha_myisam::position(), QUICK_ROR_INTERSECT_SELECT::QUICK_ROR_INTERSECT_SELECT(), QUICK_ROR_UNION_SELECT::QUICK_ROR_UNION_SELECT(), QUICK_INDEX_MERGE_SELECT::read_keys_and_merge(), ha_tina::rnd_pos(), ha_archive::rnd_pos(), ha_myisammrg::rnd_pos(), and ha_myisam::rnd_pos().
Definition at line 888 of file handler.h.
Referenced by best_access_path(), calc_used_field_length(), cost_group_min_max(), create_myisam_from_heap(), filesort(), get_best_disjunct_quick(), get_best_ror_intersect(), get_index_only_read_time(), get_schema_stat_record(), get_schema_tables_record(), get_schema_tables_result(), get_sweep_read_cost(), init_read_record(), make_join_statistics(), mysql_delete(), remove_dup_with_hash_index(), ror_intersect_init(), ror_scan_selectivity(), table_check_intact(), test_if_skip_sort_order(), SQL_SELECT::test_quick_select(), and Item_sum_count_distinct::val_int().
struct st_table* handler::table [protected] |
Definition at line 863 of file handler.h.
Referenced by adjust_next_insert_id_after_explicit_value(), ha_myisam::analyze(), ha_myisammrg::append_create_info(), ha_myisam::assign_to_keycache(), ha_myisam::backup(), change_table_ptr(), ha_tina::check(), ha_archive::check(), ha_myisam::check(), ha_myisam::check_and_repair(), ha_myisam::check_if_incompatible_data(), ha_tina::check_if_locking_is_allowed(), ha_myisam::check_if_locking_is_allowed(), check_if_log_table_locking_is_allowed(), check_old_types(), column_bitmaps_signal(), ha_heap::delete_all_rows(), ha_myisammrg::delete_row(), ha_myisam::delete_row(), ha_heap::delete_row(), ha_tina::encode_quote(), ha_myisam::external_lock(), ha_tina::find_current_row(), ha_myisam::ft_init_ext(), ha_myisam::ft_read(), get_auto_increment(), ha_myisam::get_auto_increment(), get_dup_key(), ha_archive::get_row(), ha_check(), ha_check_for_upgrade(), ha_delete_row(), ha_open(), ha_release_auto_increment(), ha_repair(), ha_reset(), ha_statistic_increment(), ha_update_row(), ha_write_row(), ha_myisammrg::index_first(), ha_myisam::index_first(), ha_heap::index_first(), ha_myisammrg::index_last(), ha_myisam::index_last(), ha_heap::index_last(), ha_myisammrg::index_next(), ha_myisam::index_next(), ha_heap::index_next(), index_next_same(), ha_myisammrg::index_prev(), ha_myisam::index_prev(), ha_heap::index_prev(), ha_myisammrg::index_read(), ha_myisam::index_read(), ha_heap::index_read(), ha_archive::index_read_idx(), ha_myisammrg::index_read_idx(), ha_myisam::index_read_idx(), ha_heap::index_read_idx(), ha_myisammrg::index_read_last(), ha_myisam::index_read_last(), ha_heap::index_read_last(), ha_myisammrg::index_type(), ha_myisam::index_type(), ha_archive::info(), ha_myisammrg::info(), ha_myisam::info(), init_read_record(), ha_example::open(), ha_tina::open(), ha_archive::open(), ha_myisammrg::open(), ha_myisam::open(), ha_heap::open(), ha_archive::optimize(), ha_myisam::preload_keys(), print_error(), print_keydup_error(), read_first_row(), read_multi_range_first(), read_range_first(), read_range_next(), ha_archive::real_write_row(), ha_heap::records_in_range(), ha_tina::repair(), ha_myisam::repair(), ha_myisam::restore(), ha_myisammrg::rnd_next(), ha_myisam::rnd_next(), ha_heap::rnd_next(), ha_myisammrg::rnd_pos(), ha_myisam::rnd_pos(), ha_heap::rnd_pos(), ha_heap::set_keys_for_scanning(), ha_myisam::start_bulk_insert(), ha_heap::table_type(), update_auto_increment(), ha_heap::update_create_info(), ha_heap::update_key_stats(), ha_tina::update_row(), ha_myisammrg::update_row(), ha_myisam::update_row(), ha_heap::update_row(), use_hidden_primary_key(), ha_tina::write_row(), ha_archive::write_row(), ha_myisammrg::write_row(), ha_myisam::write_row(), and ha_heap::write_row().
struct st_table_share* handler::table_share [protected] |
Definition at line 862 of file handler.h.
Referenced by change_table_ptr(), ha_open(), ha_blackhole::index_flags(), ha_myisammrg::index_flags(), ha_myisam::index_flags(), ha_heap::index_flags(), ha_blackhole::index_type(), ha_heap::index_type(), and print_error().
1.4.7

