MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
st_join_table Struct Reference
Inheritance diagram for st_join_table:
Collaboration diagram for st_join_table:

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

Additional Inherited Members

- Static Public Member Functions inherited from Sql_alloc
static void * operator new (size_t size) throw ()
static void * operator new[] (size_t size) throw ()
static void * operator new[] (size_t size, MEM_ROOT *mem_root) throw ()
static void * operator new (size_t size, MEM_ROOT *mem_root) throw ()
static void operator delete (void *ptr, size_t size)
static void operator delete (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, size_t size)

Detailed Description

Definition at line 498 of file sql_select.h.

Constructor & Destructor Documentation

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

Definition at line 888 of file sql_select.h.

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.

Definition at line 524 of file sql_select.h.

uint st_join_table::get_sj_strategy ( ) const
inline
Returns
semijoin strategy for this table.

Definition at line 852 of file sql_select.h.

Here is the caller graph for this function:

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

Definition at line 876 of file sql_select.h.

Here is the call graph for this function:

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.

Definition at line 513 of file sql_select.h.

Member Data Documentation

List<Item>* st_join_table::all_fields

List of all expressions in the select list

Definition at line 756 of file sql_select.h.

key_map st_join_table::checked_keys

Keys checked

Definition at line 599 of file sql_select.h.

COND_EQUAL* st_join_table::cond_equal

multiple equalities for the on expression

Definition at line 548 of file sql_select.h.

key_map st_join_table::const_keys

Keys with constant part. Subset of keys.

Definition at line 598 of file sql_select.h.

table_map st_join_table::dependent

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

Definition at line 629 of file sql_select.h.

bool st_join_table::distinct

TRUE <=> remove duplicates on this table.

Definition at line 770 of file sql_select.h.

List<Item>* st_join_table::fields

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()

Definition at line 754 of file sql_select.h.

st_join_table* st_join_table::first_inner

first inner table for including outerjoin

Definition at line 549 of file sql_select.h.

struct st_join_table* st_join_table::first_sj_inner_tab

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.

Definition at line 688 of file sql_select.h.

st_join_table* st_join_table::first_unmatched

used for optimization purposes only

Definition at line 556 of file sql_select.h.

st_join_table* st_join_table::first_upper

first inner table for embedding outer join

Definition at line 555 of file sql_select.h.

bool st_join_table::found

true after all matches or null complement

Definition at line 550 of file sql_select.h.

Item* st_join_table::having

HAVING condition for checking prior saving a record into tmp table

Definition at line 767 of file sql_select.h.

table_map st_join_table::key_dependent

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

Definition at line 633 of file sql_select.h.

key_map st_join_table::keys

all keys with can be used

Definition at line 601 of file sql_select.h.

Key_use* st_join_table::keyuse

pointer to first used key

Definition at line 541 of file sql_select.h.

st_join_table* st_join_table::last_inner

last table table for embedding outer join

Definition at line 554 of file sql_select.h.

bool st_join_table::not_null_compl

true before null complement is added

Definition at line 551 of file sql_select.h.

Item** st_join_table::on_expr_ref

pointer to the associated on expression

Definition at line 547 of file sql_select.h.

POSITION* st_join_table::position

points into best_positions array

Definition at line 540 of file sql_select.h.

key_map st_join_table::quick_order_tested

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.

Definition at line 610 of file sql_select.h.

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().

Definition at line 580 of file sql_select.h.

ha_rows st_join_table::send_records

Number of records saved in tmp table

Definition at line 764 of file sql_select.h.

Semijoin_mat_exec* st_join_table::sj_mat_exec

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()).

Definition at line 595 of file sql_select.h.

uint st_join_table::use_join_cache

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

Definition at line 666 of file sql_select.h.


The documentation for this struct was generated from the following files: