My Project
Public Member Functions | Public Attributes
st_join_table Struct Reference
Inheritance diagram for st_join_table:
Sql_alloc

List of all members.

Public Member Functions

 st_join_table ()
table_map prefix_tables () const
table_map added_tables () const
void set_prefix_tables (table_map prefix_tables, table_map prev_tables)
void add_prefix_tables (table_map tables)
bool do_firstmatch () const
 Return true if join_tab should perform a FirstMatch action.
bool do_loosescan () const
 Return true if join_tab should perform a LooseScan action.
bool starts_weedout () const
 Return true if join_tab starts a Duplicate Weedout action.
bool finishes_weedout () const
 Return true if join_tab finishes a Duplicate Weedout action.
void cleanup ()
bool is_using_loose_index_scan ()
bool is_using_agg_loose_index_scan ()
bool check_rowid_field ()
bool is_inner_table_of_outer_join ()
bool is_single_inner_of_semi_join ()
bool is_single_inner_of_outer_join ()
bool is_first_inner_for_outer_join ()
Itemcondition () const
void set_condition (Item *to, uint line)
Itemset_jt_and_sel_condition (Item *new_cond, uint line)
uint get_sj_strategy () const
uint sjm_query_block_id () const
bool and_with_condition (Item *tmp_cond, uint line)
bool and_with_jt_and_sel_condition (Item *tmp_cond, uint line)
bool has_guarded_conds () const
Itemunified_condition () const
bool prepare_scan ()
 Prepare table to be scanned.
bool use_order () const
 Use ordering provided by chosen index?
bool sort_table ()
bool remove_duplicates ()

Public Attributes

TABLEtable
POSITIONposition
Key_usekeyuse
SQL_SELECTselect
QUICK_SELECT_Iquick
Item ** on_expr_ref
COND_EQUALcond_equal
st_join_tablefirst_inner
bool found
bool not_null_compl
bool materialized
 For a materializable derived or SJ table: true if has been materialized.
st_join_tablelast_inner
st_join_tablefirst_upper
st_join_tablefirst_unmatched
Itempre_idx_push_cond
Extra_tag info
uint packed_info
READ_RECORD::Setup_func materialize_table
READ_RECORD::Setup_func read_first_record
Next_select_func next_select
READ_RECORD read_record
READ_RECORD::Setup_func save_read_first_record
READ_RECORD::Read_func save_read_record
Semijoin_mat_execsj_mat_exec
double worst_seeks
key_map const_keys
key_map checked_keys
key_map needed_reg
key_map keys
key_map quick_order_tested
ha_rows records
ha_rows found_records
ha_rows read_time
table_map dependent
table_map key_dependent
uint index
 ID of index used for index scan or semijoin LooseScan.
uint used_fields
uint used_fieldlength
uint used_blobs
uint used_null_fields
uint used_rowid_fields
uint used_uneven_bit_fields
enum quick_type use_quick
enum join_type type
bool not_used_in_distinct
ha_rows limit
TABLE_REF ref
uint use_join_cache
QEP_operationop
Itemcache_idx_cond
SQL_SELECTcache_select
JOINjoin
TABLE_LISTemb_sj_nest
struct st_join_tablefirst_sj_inner_tab
struct st_join_tablelast_sj_inner_tab
SJ_TMP_TABLEflush_weedout_table
SJ_TMP_TABLEcheck_weed_out_table
struct st_join_tablefirstmatch_return
uint loosescan_key_len
uchar * loosescan_buf
struct st_join_tablematch_tab
bool found_match
int keep_current_rowid
st_cache_fieldcopy_current_rowid
nested_join_map embedding_map
TMP_TABLE_PARAM * tmp_table_param
Filesortfilesort
List< Item > * fields
List< Item > * all_fields
Ref_ptr_arrayref_array
ha_rows send_records
Itemhaving
bool distinct

Constructor & Destructor Documentation

Todo:
Add constructor to READ_RECORD. All users do init_read_record(), which does memset(), rather than invoking a constructor.

Member Function Documentation

void st_join_table::add_prefix_tables ( table_map  tables) [inline]

Add an available set of tables for a table in a join plan.

Parameters:
tables,:Set of tables added for this table in plan.
uint st_join_table::get_sj_strategy ( ) const [inline]
Returns:
semijoin strategy for this table.
bool st_join_table::has_guarded_conds ( ) const [inline]

Check if there are triggered/guarded conditions that might be 'switched off' by the subquery code when executing 'Full scan on NULL key' subqueries.

Returns:
true if there are guarded conditions, false otherwise
void st_join_table::set_prefix_tables ( table_map  prefix_tables,
table_map  prev_tables 
) [inline]

Set available tables for a table in a join plan.

Parameters:
prefix_tables,:Set of tables available for this plan
prev_tables,:Set of tables available for previous table, used to calculate set of tables added for this table.

Member Data Documentation

List of all expressions in the select list

Keys checked

multiple equalities for the on expression

Keys with constant part. Subset of keys.

The set of tables that this table depends on. Used for outer join and straight join dependencies.

TRUE <=> remove duplicates on this table.

List of topmost expressions in the select list. The *next* JOIN TAB in the plan should use it to obtain correct values. Same applicable to all_fields. These lists are needed because after tmp tables functions will be turned to fields. These variables are pointing to tmp_fields_list[123]. Valid only for tmp tables and the last non-tmp table in the query plan.

See also:
JOIN::make_tmp_tables_info()

first inner table for including outerjoin

Boundaries of semijoin inner tables around this table. Valid only once final QEP has been chosen. Depending on the strategy, they may define an interval (all tables inside are inner of a semijoin) or not. last_sj_inner_tab is not set for Duplicates Weedout.

used for optimization purposes only

first inner table for embedding outer join

true after all matches or null complement

HAVING condition for checking prior saving a record into tmp table

The set of tables that are referenced by key from this table.

all keys with can be used

pointer to first used key

last table table for embedding outer join

true before null complement is added

pointer to the associated on expression

points into best_positions array

Used to avoid repeated range analysis for the same key in test_if_skip_sort_order(). This would otherwise happen if the best range access plan found for a key is turned down. quick_order_tested is cleared every time the select condition for this JOIN_TAB changes since a new condition may give another plan and cost from range analysis.

READ_RECORD::Setup_func st_join_table::read_first_record

Initialize table for reading and fetch the first row from the table. If table is a materialized derived one, function must materialize it with prepare_scan().

Number of records saved in tmp table

Struct needed for materialization of semi-join. Set for a materialized temporary table, and NULL for all other join_tabs (except when materialization is in progress,

See also:
join_materialize_semijoin()).

Join buffering strategy. After optimization it contains chosen join buffering strategy (if any).


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines