MySQL 5.6.14 Source Code Document
|
Public Member Functions | |
void | init (THD *thd, TABLE_LIST *tl) |
bool | fill_item_list (List< Item > *item_list) const |
void | reset_item_list (List< Item > *item_list) const |
void | clear_column_bitmaps (void) |
void | prepare_for_position (void) |
void | mark_columns_used_by_index_no_reset (uint index, MY_BITMAP *map) |
void | mark_columns_used_by_index (uint index) |
void | mark_auto_increment_column (void) |
void | mark_columns_needed_for_update (void) |
Mark columns needed for doing an update of a row. | |
void | mark_columns_needed_for_delete (void) |
void | mark_columns_needed_for_insert (void) |
void | mark_columns_per_binlog_row_image (void) |
void | column_bitmaps_set (MY_BITMAP *read_set_arg, MY_BITMAP *write_set_arg) |
void | column_bitmaps_set_no_signal (MY_BITMAP *read_set_arg, MY_BITMAP *write_set_arg) |
void | use_all_columns () |
void | default_column_bitmaps () |
bool | needs_reopen () |
bool | alloc_keys (uint key_count) |
Allocate space for keys. | |
bool | add_tmp_key (Field_map *key_parts, char *key_name) |
Add one key to a temporary table. | |
void | use_index (int key_to_save) |
void | set_keyread (bool flag) |
bool | update_const_key_parts (Item *conds) |
bool | check_read_removal (uint index) |
bool | is_created () const |
Return true if table is instantiated, and false otherwise. | |
void | set_created () |
void | set_deleted () |
Public Attributes | |
TABLE_SHARE * | s |
handler * | file |
TABLE * | next |
TABLE * | prev |
THD * | in_use |
Field ** | field |
uchar * | record [2] |
uchar * | write_row_record |
uchar * | insert_values |
key_map | covering_keys |
key_map | quick_keys |
key_map | merge_keys |
key_map | used_keys |
key_map | possible_quick_keys |
key_map | keys_in_use_for_query |
key_map | keys_in_use_for_group_by |
key_map | keys_in_use_for_order_by |
KEY * | key_info |
Field * | next_number_field |
Field * | found_next_number_field |
Table_triggers_list * | triggers |
TABLE_LIST * | pos_in_table_list |
TABLE_LIST * | pos_in_locked_tables |
ORDER * | group |
const char * | alias |
uchar * | null_flags |
my_bitmap_map * | bitmap_init_value |
MY_BITMAP | def_read_set |
MY_BITMAP | def_write_set |
MY_BITMAP | tmp_set |
MY_BITMAP * | read_set |
MY_BITMAP * | write_set |
query_id_t | query_id |
ha_rows | quick_rows [MAX_KEY] |
key_part_map | const_key_parts [MAX_KEY] |
uint | quick_key_parts [MAX_KEY] |
uint | quick_n_ranges [MAX_KEY] |
ha_rows | quick_condition_rows |
table_map | map |
uint | lock_position |
uint | lock_data_start |
uint | lock_count |
uint | tablenr |
uint | used_fields |
uint | temp_pool_slot |
uint | db_stat |
int | current_lock |
uint | maybe_null |
my_bool | null_row |
uint8 | status |
my_bool | copy_blobs |
my_bool | force_index |
my_bool | force_index_order |
my_bool | force_index_group |
my_bool | distinct |
my_bool | const_table |
my_bool | no_rows |
my_bool | key_read |
my_bool | no_keyread |
my_bool | locked_by_logger |
my_bool | no_replicate |
my_bool | locked_by_name |
my_bool | fulltext_searched |
my_bool | no_cache |
my_bool | open_by_handler |
my_bool | auto_increment_field_not_null |
my_bool | insert_or_update |
my_bool | alias_name_used |
my_bool | get_fields_in_item_tree |
my_bool | m_needs_reopen |
uint | max_keys |
REGINFO | reginfo |
MEM_ROOT | mem_root |
Blob_mem_storage * | blob_storage |
GRANT_INFO | grant |
Filesort_info | sort |
MDL_ticket * | mdl_ticket |
Friends | |
class | Table_cache_element |
bool TABLE::add_tmp_key | ( | Field_map * | key_parts, |
char * | key_name | ||
) |
Add one key to a temporary table.
key_parts | bitmap of fields that take a part in the key. |
key_name | name of the key |
Creates a key for this table from fields which corresponds the bits set to 1 in the 'key_parts' bitmap. The 'key_name' name is given to the newly created key.
somehow manage to create keys in tmp_table_param for unification purposes
Definition at line 5528 of file table.cc.
bool TABLE::alloc_keys | ( | uint | key_count | ) |
bool TABLE::check_read_removal | ( | uint | index | ) |
void TABLE::init | ( | THD * | thd, |
TABLE_LIST * | tl | ||
) |
Initialize TABLE instance (newly created, or coming either from table cache or THD::temporary_tables list) and prepare it for further use during statement execution. Set the 'alias' attribute from the specified TABLE_LIST element. Remember the TABLE_LIST element in the TABLE::pos_in_table_list member.
thd | Thread context. |
tl | TABLE_LIST element. |
Definition at line 3652 of file table.cc.
void TABLE::mark_columns_needed_for_update | ( | void | ) |
Mark columns needed for doing an update of a row.
Some engines needs to have all columns in an update (to be able to build a complete row). If this is the case, we mark all not updated columns to be read.
If this is no the case, we do like in the delete case and mark if neeed, either the primary key column or all columns to be read. (see mark_columns_needed_for_delete() for details)
If the engine has HA_REQUIRES_KEY_COLUMNS_FOR_DELETE, we will mark all USED key columns as 'to-be-read'. This allows the engine to loop over the given record to find all changed keys and doesn't have to retrieve the row again.
Unlike other similar methods, it doesn't mark fields used by triggers, that is the responsibility of the caller to do, by using Table_triggers_list::mark_used_fields(TRG_EVENT_UPDATE)!
Definition at line 5341 of file table.cc.
void TABLE::mark_columns_per_binlog_row_image | ( | void | ) |
|
inline |
void TABLE::prepare_for_position | ( | void | ) |
Tell handler we are going to call position() and rnd_pos() later.
This is needed for handlers that uses the primary key to find the row. In this case we have to extend the read bitmap with the primary key fields.
Definition at line 5182 of file table.cc.
|
inline |
|
inline |
bool TABLE::update_const_key_parts | ( | Item * | conds | ) |
Blob_mem_storage* TABLE::blob_storage |
Initialized in Item_func_group_concat::setup for appropriate temporary table if GROUP_CONCAT is used with ORDER BY | DISTINCT and BLOB field count > 0.
my_bool TABLE::force_index_group |
my_bool TABLE::force_index_order |
my_bool TABLE::key_read |
MEM_ROOT TABLE::mem_root |
my_bool TABLE::no_replicate |