My Project
|
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 |
Field * | fts_doc_id_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
bool TABLE::alloc_keys | ( | uint | key_count | ) |
Allocate space for keys.
key_count | number of keys to allocate. |
Allocate space enough to fit 'key_count' keys for this table.
bool TABLE::check_read_removal | ( | uint | index | ) |
Read removal is possible if the selected quick read method is using full unique index
index | Number of the index used for read |
true | success, read removal started |
false | read removal not started |
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. |
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)!
void TABLE::mark_columns_per_binlog_row_image | ( | void | ) |
If in RBR we may need to mark some extra columns, depending on the binlog-row-image command line argument.
bool TABLE::needs_reopen | ( | ) | [inline] |
Should this instance of the table be reopened?
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.
void TABLE::set_created | ( | ) | [inline] |
Set the table as "created", and enable flags in storage engine that could not be enabled without an instantiated table.
void TABLE::set_deleted | ( | ) | [inline] |
Set the contents of table to be "deleted", ie "not created", after having deleted the contents.
bool TABLE::update_const_key_parts | ( | Item * | conds | ) |
Update TABLE::const_key_parts for single table UPDATE/DELETE query
conds | WHERE clause expression |
TRUE | error (OOM) |
FALSE | success |
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 |
Flag set when the statement contains FORCE INDEX FOR GROUP BY See TABLE_LIST::process_index_hints().
my_bool TABLE::force_index_order |
Flag set when the statement contains FORCE INDEX FOR ORDER BY See TABLE_LIST::process_index_hints().
my_bool TABLE::key_read |
If set, the optimizer has found that row retrieval should access index tree only.
my_bool TABLE::m_needs_reopen |
This table must be reopened and is not to be reused. NOTE: The TABLE will not be reopened during LOCK TABLES in close_thread_tables!!!
MEM_ROOT TABLE::mem_root |
my_bool TABLE::no_replicate |
If set, indicate that the table is not replicated by the server.