diff options
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r-- | sql/sql_select.h | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index 0d53d4c9798..ed8f459fd6c 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -310,6 +310,7 @@ typedef struct st_join_table { Table_access_tracker *jbuf_tracker; Time_and_counter_tracker *jbuf_unpack_tracker; + Counter_tracker *jbuf_loops_tracker; // READ_RECORD::Setup_func materialize_table; READ_RECORD::Setup_func read_first_record; @@ -440,6 +441,8 @@ typedef struct st_join_table { */ bool idx_cond_fact_out; bool use_join_cache; + /* TRUE <=> it is prohibited to join this table using join buffer */ + bool no_forced_join_cache; uint used_join_cache_level; ulong join_buffer_size_limit; JOIN_CACHE *cache; @@ -566,6 +569,16 @@ typedef struct st_join_table { bool preread_init_done; + /* true <=> split optimization has been applied to this materialized table */ + bool is_split_derived; + + /* + Bitmap of split materialized derived tables that can be filled just before + this join table is to be joined. All parameters of the split derived tables + belong to tables preceding this join table. + */ + table_map split_derived_to_update; + /* Cost info to the range filter used when joining this join table (Defined when the best join order has been already chosen) @@ -729,9 +742,10 @@ typedef struct st_join_table { void partial_cleanup(); void add_keyuses_for_splitting(); - SplM_plan_info *choose_best_splitting(double record_count, - table_map remaining_tables); - bool fix_splitting(SplM_plan_info *spl_plan, table_map remaining_tables, + SplM_plan_info *choose_best_splitting(uint idx, + table_map remaining_tables, + table_map *spl_pd_boundary); + bool fix_splitting(SplM_plan_info *spl_plan, table_map excluded_tables, bool is_const_table); } JOIN_TAB; @@ -1039,9 +1053,21 @@ public: */ KEYUSE *key; + /* Cardinality of current partial join ending with this position */ + double partial_join_cardinality; + /* Info on splitting plan used at this position */ SplM_plan_info *spl_plan; + /* + If spl_plan is NULL the value of spl_pd_boundary is 0. Otherwise + spl_pd_boundary contains the bitmap of the table from the current + partial join ending at this position that starts the sub-sequence of + tables S from which no conditions are allowed to be used in the plan + spl_plan for the split table joined at this position. + */ + table_map spl_pd_boundary; + /* Cost info for the range filter used at this position */ Range_rowid_filter_cost_info *range_rowid_filter_info; |