Struct mariadb_sys::TABLE_LIST

source ·
#[repr(C)]
pub struct TABLE_LIST {
Show 144 fields pub next_local: *mut TABLE_LIST, pub next_global: *mut TABLE_LIST, pub prev_global: *mut *mut TABLE_LIST, pub db: LEX_CSTRING, pub table_name: LEX_CSTRING, pub schema_table_name: LEX_CSTRING, pub alias: LEX_CSTRING, pub option: *const c_char, pub on_expr: *mut Item, pub on_context: *mut Name_resolution_context, pub table_function: *mut Table_function_json_table, pub sj_on_expr: *mut Item, pub sj_inner_tables: table_map, pub sj_in_exprs: uint, pub sj_subq_pred: *mut Item_in_subselect, pub original_subq_pred_used_tables: table_map, pub jtbm_subselect: *mut Item_in_subselect, pub jtbm_table_no: uint, pub sj_mat_info: *mut SJ_MATERIALIZATION_INFO, pub prep_on_expr: *mut Item, pub cond_equal: *mut COND_EQUAL, pub natural_join: *mut TABLE_LIST, pub is_natural_join: bool, pub join_using_fields: *mut List, pub join_columns: *mut List, pub is_join_columns_complete: bool, pub next_name_resolution_table: *mut TABLE_LIST, pub index_hints: *mut List, pub table: *mut TABLE, pub table_id: ulonglong, pub derived_result: *mut select_unit, pub delete_while_scanning: bool, pub map: table_map, pub correspondent_table: *mut TABLE_LIST, pub derived: *mut st_select_lex_unit, pub with: *mut With_element, pub with_internal_reference_map: table_map, pub next_with_rec_ref: *mut TABLE_LIST, pub is_derived_with_recursive_reference: bool, pub block_handle_derived: bool, pub dt_handler: *mut derived_handler, pub pushdown_derived: *mut Pushdown_derived, pub schema_table: *mut ST_SCHEMA_TABLE, pub schema_select_lex: *mut st_select_lex, pub schema_table_reformed: bool, pub schema_table_param: *mut TMP_TABLE_PARAM, pub select_lex: *mut st_select_lex, pub view: *mut LEX, pub field_translation: *mut Field_translator, pub field_translation_end: *mut Field_translator, pub field_translation_updated: bool, pub merge_underlying_list: *mut TABLE_LIST, pub view_tables: *mut List, pub belong_to_view: *mut TABLE_LIST, pub belong_to_derived: *mut TABLE_LIST, pub referencing_view: *mut TABLE_LIST, pub view_used_tables: table_map, pub map_exec: table_map, pub tablenr_exec: uint, pub maybe_null_exec: uint, pub parent_l: *mut TABLE_LIST, pub security_ctx: *mut Security_context, pub tabledef_version_buf: [uchar; 20], pub tabledef_version: LEX_CUSTRING, pub view_sctx: *mut Security_context, pub allowed_show: bool, pub where_: *mut Item, pub check_option: *mut Item, pub select_stmt: LEX_STRING, pub md5: LEX_CSTRING, pub source: LEX_CSTRING, pub view_db: LEX_CSTRING, pub view_name: LEX_CSTRING, pub hr_timestamp: LEX_STRING, pub definer: LEX_USER, pub file_version: ulonglong, pub mariadb_version: ulonglong, pub updatable_view: ulonglong, pub algorithm: ulonglong, pub view_suid: ulonglong, pub with_check: ulonglong, pub effective_with_check: uint8, pub derived_type: uint8, pub grant: GRANT_INFO, pub engine_data: ulonglong, pub callback_func: qc_engine_callback, pub lock_type: Type, pub mdl_type: Type, pub table_options: ulong, pub outer_join: uint, pub shared: uint, pub updatable: bool, pub straight: bool, pub updating: bool, pub ignore_leaves: bool, pub crashed: bool, pub skip_locked: bool, pub dep_tables: table_map, pub on_expr_dep_tables: table_map, pub nested_join: *mut st_nested_join, pub embedding: *mut TABLE_LIST, pub join_list: *mut List, pub lifted: bool, pub cacheable_table: bool, pub table_in_first_from_clause: bool, pub open_type: Type, pub contain_auto_increment: bool, pub compact_view_format: bool, pub where_processed: bool, pub check_option_processed: bool, pub required_type: Type, pub db_type: *mut handlerton, pub timestamp_buffer: [c_char; 20], pub prelocking_placeholder: Type, pub open_strategy: Type, pub is_alias: bool, pub is_fqtn: bool, pub fill_me: bool, pub merged: bool, pub merged_for_insert: bool, pub sequence: bool, pub vers_skip_create: query_id_t, pub used_items: List, pub persistent_used_items: List, pub view_creation_ctx: *mut View_creation_ctx, pub view_client_cs_name: LEX_CSTRING, pub view_connection_cl_name: LEX_CSTRING, pub view_body_utf8: LEX_CSTRING, pub trg_event_map: uint8, pub slave_fk_event_map: uint8, pub optimized_away: bool, pub materialized: bool, pub i_s_requested_object: uint, pub prohibit_cond_pushdown: bool, pub table_open_method: uint, pub schema_table_state: Type, pub is_table_read_plan: *mut IS_table_read_plan, pub mdl_request: MDL_request, pub partition_names: *mut List, pub vers_conditions: vers_select_conds_t, pub period_conditions: vers_select_conds_t, pub for_insert_data: my_bool, pub m_table_ref_type: Type, pub m_table_ref_version: ulonglong,
}

Fields§

§next_local: *mut TABLE_LIST§next_global: *mut TABLE_LIST§prev_global: *mut *mut TABLE_LIST§db: LEX_CSTRING§table_name: LEX_CSTRING§schema_table_name: LEX_CSTRING§alias: LEX_CSTRING§option: *const c_char§on_expr: *mut Item§on_context: *mut Name_resolution_context§table_function: *mut Table_function_json_table§sj_on_expr: *mut Item§sj_inner_tables: table_map§sj_in_exprs: uint§sj_subq_pred: *mut Item_in_subselect§original_subq_pred_used_tables: table_map§jtbm_subselect: *mut Item_in_subselect§jtbm_table_no: uint§sj_mat_info: *mut SJ_MATERIALIZATION_INFO§prep_on_expr: *mut Item§cond_equal: *mut COND_EQUAL§natural_join: *mut TABLE_LIST§is_natural_join: bool§join_using_fields: *mut List§join_columns: *mut List§is_join_columns_complete: bool§next_name_resolution_table: *mut TABLE_LIST§index_hints: *mut List§table: *mut TABLE§table_id: ulonglong§derived_result: *mut select_unit§delete_while_scanning: bool§map: table_map§correspondent_table: *mut TABLE_LIST§derived: *mut st_select_lex_unit

Normally, this field is non-null for anonymous derived tables only.

@details This field is set to non-null for

  • Anonymous derived tables, In this case it points to the SELECT_LEX_UNIT representing the derived table. E.g. for a query

@verbatim SELECT * FROM (SELECT a FROM t1) b @endverbatim

For the @c TABLE_LIST representing the derived table @c b, @c derived points to the SELECT_LEX_UNIT representing the result of the query within parenteses.

  • Views. This is set for views with @verbatim ALGORITHM = TEMPTABLE @endverbatim by mysql_make_view().

@note Inside views, a subquery in the @c FROM clause is not allowed. @note Do not use this field to separate views/base tables/anonymous derived tables. Use TABLE_LIST::is_anonymous_derived_table().

§with: *mut With_element§with_internal_reference_map: table_map§next_with_rec_ref: *mut TABLE_LIST§is_derived_with_recursive_reference: bool§block_handle_derived: bool§dt_handler: *mut derived_handler§pushdown_derived: *mut Pushdown_derived§schema_table: *mut ST_SCHEMA_TABLE§schema_select_lex: *mut st_select_lex§schema_table_reformed: bool§schema_table_param: *mut TMP_TABLE_PARAM§select_lex: *mut st_select_lex§view: *mut LEX§field_translation: *mut Field_translator§field_translation_end: *mut Field_translator§field_translation_updated: bool§merge_underlying_list: *mut TABLE_LIST§view_tables: *mut List§belong_to_view: *mut TABLE_LIST§belong_to_derived: *mut TABLE_LIST§referencing_view: *mut TABLE_LIST§view_used_tables: table_map§map_exec: table_map§tablenr_exec: uint§maybe_null_exec: uint§parent_l: *mut TABLE_LIST§security_ctx: *mut Security_context§tabledef_version_buf: [uchar; 20]§tabledef_version: LEX_CUSTRING§view_sctx: *mut Security_context§allowed_show: bool§where_: *mut Item§check_option: *mut Item§select_stmt: LEX_STRING§md5: LEX_CSTRING§source: LEX_CSTRING§view_db: LEX_CSTRING§view_name: LEX_CSTRING§hr_timestamp: LEX_STRING§definer: LEX_USER§file_version: ulonglong§mariadb_version: ulonglong§updatable_view: ulonglong§algorithm: ulonglong

The declared algorithm, if this is a view.

@details One of

  • VIEW_ALGORITHM_UNDEFINED
  • VIEW_ALGORITHM_TMPTABLE
  • VIEW_ALGORITHM_MERGE @to do Replace with an enum
§view_suid: ulonglong§with_check: ulonglong§effective_with_check: uint8§derived_type: uint8

The view algorithm that is actually used, if this is a view.

@details One of

  • VIEW_ALGORITHM_UNDEFINED
  • VIEW_ALGORITHM_TMPTABLE
  • VIEW_ALGORITHM_MERGE @to do Replace with an enum
§grant: GRANT_INFO§engine_data: ulonglong§callback_func: qc_engine_callback§lock_type: Type§mdl_type: Type§table_options: ulong§outer_join: uint§shared: uint§updatable: bool§straight: bool§updating: bool§ignore_leaves: bool§crashed: bool§skip_locked: bool§dep_tables: table_map§on_expr_dep_tables: table_map§nested_join: *mut st_nested_join§embedding: *mut TABLE_LIST§join_list: *mut List§lifted: bool§cacheable_table: bool§table_in_first_from_clause: bool§open_type: Type

Specifies which kind of table should be open for this element of table list.

§contain_auto_increment: bool§compact_view_format: bool§where_processed: bool§check_option_processed: bool§required_type: Type§db_type: *mut handlerton§timestamp_buffer: [c_char; 20]§prelocking_placeholder: Type§open_strategy: Type§is_alias: bool

TRUE if an alias for this table was specified in the SQL.

§is_fqtn: bool

TRUE if the table is referred to in the statement using a fully qualified name (<db_name>.<table_name>).

§fill_me: bool§merged: bool§merged_for_insert: bool§sequence: bool§vers_skip_create: query_id_t§used_items: List§persistent_used_items: List§view_creation_ctx: *mut View_creation_ctx§view_client_cs_name: LEX_CSTRING§view_connection_cl_name: LEX_CSTRING§view_body_utf8: LEX_CSTRING§trg_event_map: uint8

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.

slave_fk_event_map is filled on the slave side with bitmaps value representing row-based event operation to help find and prelock possible FK constrain-related child tables.

§slave_fk_event_map: uint8

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.

slave_fk_event_map is filled on the slave side with bitmaps value representing row-based event operation to help find and prelock possible FK constrain-related child tables.

§optimized_away: bool§materialized: bool

TRUE <=> already materialized. Valid only for materialized derived tables/views.

§i_s_requested_object: uint§prohibit_cond_pushdown: bool§table_open_method: uint§schema_table_state: Type§is_table_read_plan: *mut IS_table_read_plan§mdl_request: MDL_request§partition_names: *mut List§vers_conditions: vers_select_conds_t§period_conditions: vers_select_conds_t§for_insert_data: my_bool§m_table_ref_type: Type

See comments for set_table_ref_id()

§m_table_ref_version: ulonglong

See comments for set_table_ref_id()

Implementations§

source§

impl TABLE_LIST

source

pub unsafe fn calc_md5(&mut self, buffer: *mut c_char)

source

pub unsafe fn view_check_option( &mut self, thd: *mut THD, ignore_failure: bool ) -> c_int

source

pub unsafe fn create_field_translation(&mut self, thd: *mut THD) -> bool

source

pub unsafe fn setup_underlying(&mut self, thd: *mut THD) -> bool

source

pub unsafe fn cleanup_items(&mut self)

source

pub unsafe fn print( &mut self, thd: *mut THD, eliminated_tables: table_map, str_: *mut String, query_type: Type )

source

pub unsafe fn print_leaf_tables( &mut self, thd: *mut THD, str_: *mut String, query_type: Type )

source

pub unsafe fn check_single_table( &mut self, table: *mut *mut TABLE_LIST, map: table_map, view: *mut TABLE_LIST ) -> bool

source

pub unsafe fn set_insert_values(&mut self, mem_root: *mut MEM_ROOT) -> bool

source

pub unsafe fn hide_view_error(&mut self, thd: *mut THD)

source

pub unsafe fn find_underlying_table( &mut self, table: *mut TABLE ) -> *mut TABLE_LIST

source

pub unsafe fn first_leaf_for_name_resolution(&mut self) -> *mut TABLE_LIST

source

pub unsafe fn last_leaf_for_name_resolution(&mut self) -> *mut TABLE_LIST

source

pub unsafe fn get_real_join_table(&mut self) -> *mut TABLE

source

pub unsafe fn is_leaf_for_name_resolution(&mut self) -> bool

source

pub unsafe fn register_want_access(&mut self, want_access: Type)

source

pub unsafe fn prepare_security(&mut self, thd: *mut THD) -> bool

source

pub unsafe fn find_view_security_context( &mut self, thd: *mut THD ) -> *mut Security_context

source

pub unsafe fn prepare_view_security_context( &mut self, thd: *mut THD, upgrade_check: bool ) -> bool

source

pub unsafe fn reinit_before_use(&mut self, thd: *mut THD)

source

pub unsafe fn containing_subselect(&mut self) -> *mut Item_subselect

source

pub unsafe fn process_index_hints(&mut self, table: *mut TABLE) -> bool

source

pub unsafe fn is_the_same_definition( &mut self, thd: *mut THD, s: *mut TABLE_SHARE ) -> bool

source

pub unsafe fn is_with_table(&mut self) -> bool

source

pub unsafe fn is_recursive_with_table(&mut self) -> bool

source

pub unsafe fn is_with_table_recursive_reference(&mut self) -> bool

source

pub unsafe fn register_as_derived_with_rec_ref( &mut self, rec_elem: *mut With_element )

source

pub unsafe fn is_nonrecursive_derived_with_rec_ref(&mut self) -> bool

source

pub unsafe fn fill_recursive(&mut self, thd: *mut THD) -> bool

source

pub unsafe fn set_as_with_table( &mut self, thd: *mut THD, with_elem: *mut With_element ) -> bool

source

pub unsafe fn reset_const_table(&mut self)

source

pub unsafe fn handle_derived(&mut self, lex: *mut LEX, phases: uint) -> bool

source

pub unsafe fn is_active_sjm(&mut self) -> bool

source

pub unsafe fn is_sjm_scan_table(&mut self) -> bool

source

pub unsafe fn get_unit(&mut self) -> *mut st_select_lex_unit

source

pub unsafe fn get_single_select(&mut self) -> *mut st_select_lex

source

pub unsafe fn wrap_into_nested_join(&mut self, join_list: *mut List)

source

pub unsafe fn init_derived(&mut self, thd: *mut THD, init_view: bool) -> bool

source

pub unsafe fn fetch_number_of_rows(&mut self) -> c_int

source

pub unsafe fn change_refs_to_fields(&mut self) -> bool

source

pub unsafe fn single_table_updatable(&mut self) -> bool

source

pub unsafe fn set_lock_type(&mut self, thd: *mut THD, lock: Type)

source

pub unsafe fn find_derived_handler( &mut self, thd: *mut THD ) -> *mut derived_handler

source

pub unsafe fn get_first_table(&mut self) -> *mut TABLE_LIST

Trait Implementations§

source§

impl Debug for TABLE_LIST

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.