diff options
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sql/table.h b/sql/table.h index 8588f3c94c3..4d2b0b6fe91 100644 --- a/sql/table.h +++ b/sql/table.h @@ -433,7 +433,6 @@ typedef struct st_table_share bool waiting_on_cond; /* Protection against free */ bool deleting; /* going to delete this table */ ulong table_map_id; /* for row-based replication */ - ulonglong table_map_version; /* Cache for row-based replication table share checks that does not @@ -869,6 +868,7 @@ struct st_table { void prepare_for_position(void); void mark_columns_used_by_index_no_reset(uint index, MY_BITMAP *map); void mark_columns_used_by_index(uint index); + void add_read_columns_used_by_index(uint index); void restore_column_maps_after_mark_index(); void mark_auto_increment_column(void); void mark_columns_needed_for_update(void); @@ -1172,7 +1172,7 @@ struct TABLE_LIST } /* - List of tables local to a subquery (used by SQL_LIST). Considers + List of tables local to a subquery (used by SQL_I_List). Considers views as leaves (unlike 'next_leaf' below). Created at parse time in st_select_lex::add_table_to_list() -> table_list.link_in_list(). */ @@ -1703,7 +1703,11 @@ typedef struct st_nested_join */ table_map used_tables; table_map not_null_tables; /* tables that rejects nulls */ - struct st_join_table *first_nested;/* the first nested table in the plan */ + /** + Used for pointing out the first table in the plan being covered by this + join nest. It is used exclusively within make_outerjoin_info(). + */ + struct st_join_table *first_nested; /* Used to count tables in the nested join in 2 isolated places: 1. In make_outerjoin_info(). @@ -1718,6 +1722,15 @@ typedef struct st_nested_join */ uint n_tables; nested_join_map nj_map; /* Bit used to identify this nested join*/ + /** + True if this join nest node is completely covered by the query execution + plan. This means two things. + + 1. All tables on its @c join_list are covered by the plan. + + 2. All child join nest nodes are fully covered. + */ + bool is_fully_covered() const { return join_list.elements == counter; } } NESTED_JOIN; |