|
MySQL 5.6.14 Source Code Document
|


Public Types | |
| enum | { OPEN_NORMAL = 0, OPEN_IF_EXISTS, OPEN_FOR_CREATE, OPEN_STUB } |
Public Member Functions | |
| void | init_one_table (const char *db_name_arg, size_t db_length_arg, const char *table_name_arg, size_t table_name_length_arg, const char *alias_arg, enum thr_lock_type lock_type_arg) |
| Item ** | join_cond_ref () |
| Item * | join_cond () const |
| Item * | set_join_cond (Item *val) |
| void | calc_md5 (char *buffer) |
| void | set_underlying_merge () |
| Set underlying table for table place holder of view. | |
| int | view_check_option (THD *thd, bool ignore_failure) const |
| bool | setup_underlying (THD *thd) |
| void | cleanup_items () |
| bool | placeholder () |
| void | print (THD *thd, String *str, enum_query_type query_type) |
| bool | check_single_table (TABLE_LIST **table, table_map map, TABLE_LIST *view) |
| bool | set_insert_values (MEM_ROOT *mem_root) |
| void | hide_view_error (THD *thd) |
| TABLE_LIST * | find_underlying_table (TABLE *table) |
| TABLE_LIST * | first_leaf_for_name_resolution () |
| TABLE_LIST * | last_leaf_for_name_resolution () |
| bool | is_leaf_for_name_resolution () |
| const TABLE_LIST * | top_table () const |
| TABLE_LIST * | top_table () |
| bool | prepare_check_option (THD *thd) |
| bool | prepare_where (THD *thd, Item **conds, bool no_where_clause) |
| bool | uses_materialization () const |
| bool | is_view_or_derived () const |
| bool | materializable_is_const () const |
| void | register_want_access (ulong want_access) |
| bool | prepare_security (THD *thd) |
| Security_context * | find_view_security_context (THD *thd) |
| bool | prepare_view_securety_context (THD *thd) |
| void | reinit_before_use (THD *thd) |
| Item_subselect * | containing_subselect () |
| bool | process_index_hints (TABLE *table) |
| bool | is_table_ref_id_equal (TABLE_SHARE *s) const |
| void | set_table_ref_id (TABLE_SHARE *s) |
| void | set_table_ref_id (enum_table_ref_type table_ref_type_arg, ulonglong table_ref_version_arg) |
| bool | is_anonymous_derived_table () const |
| True if this TABLE_LIST represents an anonymous derived table, i.e. the result of a subquery. | |
| uint | query_block_id () const |
| returns query block id for derived table, and zero if not derived. | |
| char * | get_db_name () const |
| Returns the name of the database that the referenced table belongs to. | |
| char * | get_table_name () const |
| Returns the name of the table that this TABLE_LIST represents. | |
| int | fetch_number_of_rows () |
| Retrieve number of rows in the table. | |
| bool | update_derived_keys (Field *, Item **, uint) |
| bool | generate_keys () |
| Generate keys for a materialized derived table/view. | |
| bool | handle_derived (LEX *lex, bool(*processor)(THD *, LEX *, TABLE_LIST *)) |
| st_select_lex_unit * | get_unit () const |
| Return unit of this derived table/view. | |
| TABLE_LIST * | outer_join_nest () const |
| Returns the outer join nest that this TABLE_LIST belongs to, if any. | |
Static Public Member Functions | |
| static TABLE_LIST * | new_nested_join (MEM_ROOT *allocator, const char *alias, TABLE_LIST *embedding, List< TABLE_LIST > *belongs_to, class st_select_lex *select) |
| Create a TABLE_LIST object representing a nested join. | |
Public Attributes | |
| TABLE_LIST * | next_local |
| TABLE_LIST * | next_global |
| TABLE_LIST ** | prev_global |
| char * | db |
| char * | alias |
| char * | table_name |
| char * | schema_table_name |
| char * | option |
| Name_resolution_context * | context_of_embedding |
| Item * | prep_join_cond |
| Item * | sj_on_expr |
| table_map | sj_inner_tables |
| COND_EQUAL * | cond_equal |
| TABLE_LIST * | natural_join |
| bool | is_natural_join |
| List< String > * | join_using_fields |
| List< Natural_join_column > * | join_columns |
| bool | is_join_columns_complete |
| TABLE_LIST * | next_name_resolution_table |
| List< Index_hint > * | index_hints |
| TABLE * | table |
| Table_id | table_id |
| select_union * | derived_result |
| TABLE_LIST * | correspondent_table |
| st_select_lex_unit * | derived |
| Normally, this field is non-null for anonymous derived tables only. | |
| bool | derived_keys_ready |
| ST_SCHEMA_TABLE * | schema_table |
| st_select_lex * | schema_select_lex |
| bool | schema_table_reformed |
| TMP_TABLE_PARAM * | schema_table_param |
| st_select_lex * | select_lex |
| LEX * | view |
| Field_translator * | field_translation |
| Field_translator * | field_translation_end |
| TABLE_LIST * | merge_underlying_list |
| List< TABLE_LIST > * | view_tables |
| TABLE_LIST * | belong_to_view |
| TABLE_LIST * | referencing_view |
| TABLE_LIST * | parent_l |
| Security_context * | security_ctx |
| Security_context * | view_sctx |
| bool | allowed_show |
| TABLE_LIST * | next_leaf |
| Item * | where |
| Item * | check_option |
| LEX_STRING | select_stmt |
| LEX_STRING | md5 |
| LEX_STRING | source |
| LEX_STRING | view_db |
| LEX_STRING | view_name |
| LEX_STRING | timestamp |
| st_lex_user | definer |
| ulonglong | file_version |
| ulonglong | updatable_view |
| ulonglong | algorithm |
| The declared algorithm, if this is a view. | |
| ulonglong | view_suid |
| ulonglong | with_check |
| uint8 | effective_with_check |
| enum_derived_type | effective_algorithm |
| The view algorithm that is actually used, if this is a view. | |
| GRANT_INFO | grant |
| ulonglong | engine_data |
| qc_engine_callback | callback_func |
| thr_lock_type | lock_type |
| uint | outer_join |
| uint | shared |
| size_t | db_length |
| size_t | table_name_length |
| bool | updatable |
| bool | straight |
| bool | updating |
| bool | force_index |
| bool | ignore_leaves |
| table_map | dep_tables |
| table_map | on_expr_dep_tables |
| struct st_nested_join * | nested_join |
| TABLE_LIST * | embedding |
| List< TABLE_LIST > * | join_list |
| bool | cacheable_table |
| bool | table_in_first_from_clause |
| enum enum_open_type | open_type |
| bool | contain_auto_increment |
| bool | multitable_view |
| bool | compact_view_format |
| bool | where_processed |
| bool | check_option_processed |
| enum frm_type_enum | required_type |
| char | timestamp_buffer [20] |
| bool | prelocking_placeholder |
| enum TABLE_LIST:: { ... } | open_strategy |
| bool | internal_tmp_table |
| bool | is_alias |
| bool | is_fqtn |
| View_creation_ctx * | view_creation_ctx |
| LEX_STRING | view_client_cs_name |
| LEX_STRING | view_connection_cl_name |
| LEX_STRING | view_body_utf8 |
| List< Derived_key > | derived_key_list |
| uint8 | trg_event_map |
| bool | optimized_away |
| uint | i_s_requested_object |
| bool | has_db_lookup_value |
| bool | has_table_lookup_value |
| uint | table_open_method |
| enum enum_schema_table_state | schema_table_state |
| MDL_request | mdl_request |
| anonymous enum |
Indicates that if TABLE_LIST object corresponds to the table/view which requires special handling.
| int TABLE_LIST::fetch_number_of_rows | ( | ) |
Retrieve number of rows in the table.
Retrieve number of rows in the table referred by this TABLE_LIST and store it in the table's stats.records variable. If this TABLE_LIST refers to a materialized derived table/view, then the estimated number of rows of the derived table/view is used instead.
Definition at line 6013 of file table.cc.


| bool TABLE_LIST::generate_keys | ( | ) |
Generate keys for a materialized derived table/view.
This function adds keys to the result table by walking over the list of possible keys for this derived table/view and calling the TABLE::add_tmp_key to actually add keys. A name <auto_keyN>, where N is a sequential number, is given to each key to ease debugging.
Definition at line 6237 of file table.cc.


|
inline |
Returns the name of the table that this TABLE_LIST represents.
The unqualified table name or view name for a table or view, respectively.
Definition at line 2010 of file table.h.

| st_select_lex_unit * TABLE_LIST::get_unit | ( | ) | const |
| void TABLE_LIST::hide_view_error | ( | THD * | thd | ) |
Hide errors which show view underlying table information. There are currently two mechanisms at work that handle errors for views, this one and a more general mechanism based on an Internal_error_handler, see Show_create_error_handler. The latter handles errors encountered during execution of SHOW CREATE VIEW, while the machanism using this method is handles SELECT from views. The two methods should not clash.
| [in,out] | thd | thread handler |
Definition at line 4174 of file table.cc.

|
inline |
Prepare TABLE_LIST that consists of one table instance to use in simple_open_and_lock_tables
Definition at line 1518 of file table.h.


|
inline |
| bool TABLE_LIST::materializable_is_const | ( | ) | const |
Returning true implies that the table is materialized during optimization, so it need not be optimized during execution.
Definition at line 5993 of file table.cc.

|
static |
Create a TABLE_LIST object representing a nested join.
Create a TABLE_LIST object representing a nested join
| allocator | Mem root allocator that object is created from. |
| alias | Name of nested join object |
| embedding | Pointer to embedding join nest (or NULL if top-most) |
| belongs_to | List of tables this nest belongs to (never NULL). |
| select | The query block that this join nest belongs within. |
|
inline |
Returns the outer join nest that this TABLE_LIST belongs to, if any.
There are two kinds of join nests, outer-join nests and semi-join nests. This function returns non-NULL in the following cases:
simplify_joins() ). Note: This function assumes that simplify_joins() has been performed. Before that, join nests will be present for all types of join.Definition at line 2034 of file table.h.

| void TABLE_LIST::print | ( | THD * | thd, |
| String * | str, | ||
| enum_query_type | query_type | ||
| ) |
Print table as it should be in join list.
| str | string where table should be printed |
Definition at line 2536 of file sql_lex.cc.
|
inline |
| void TABLE_LIST::set_underlying_merge | ( | ) |
Set underlying table for table place holder of view.
Replace all views that only use one table with the table itself. This allows us to treat the view as a simple table and even update it (it is a kind of optimization).
This optimization is potentially dangerous as it makes views masquerade as base tables: Views don't have the pointer TABLE_LIST::table set to non-NULL.
We may have the case where a view accesses tables not normally accessible in the current Security_context (only in the definer's Security_context). According to the table's GRANT_INFO (TABLE::grant), access is fulfilled, but this is implicitly meant in the definer's security context. Hence we must never look at only a TABLE's GRANT_INFO without looking at the one of the referring TABLE_LIST.
Definition at line 3839 of file table.cc.


|
inline |
| ulonglong TABLE_LIST::algorithm |
| Name_resolution_context* TABLE_LIST::context_of_embedding |
| st_select_lex_unit* TABLE_LIST::derived |
Normally, this field is non-null for anonymous derived tables only.
This field is set to non-null for
SELECT * FROM (SELECT a FROM t1) b
For the TABLE_LIST representing the derived table b, derived points to the SELECT_LEX_UNIT representing the result of the query within parenteses.
ALGORITHM = TEMPTABLEby mysql_make_view().
FROM clause is not allowed. | enum_derived_type TABLE_LIST::effective_algorithm |
| bool TABLE_LIST::is_alias |
| bool TABLE_LIST::is_fqtn |
| enum { ... } TABLE_LIST::open_strategy |
Indicates that if TABLE_LIST object corresponds to the table/view which requires special handling.
| enum enum_open_type TABLE_LIST::open_type |
| uint8 TABLE_LIST::trg_event_map |
Indicates what triggers we need to pre-load for this TABLE_LIST when opening an associated TABLE. This is filled after the parsed tree is created.