diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-04 16:46:58 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-04 16:46:58 +0200 |
commit | 9835f7b80fc0eaa7fe4969ae87ae1bfbcc7aa157 (patch) | |
tree | 8c12732d7d80790d1f70ed5e302398600b733186 /sql/sql_lex.h | |
parent | 74d648db12e100c628548fb2e5aa67de718bd1fb (diff) | |
parent | 91e4f00389483d22fa81517bbcdcd21499fd283a (diff) | |
download | mariadb-git-9835f7b80fc0eaa7fe4969ae87ae1bfbcc7aa157.tar.gz |
Merge 10.1 into 10.2
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 53f2ec15341..2af1d527cd3 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -752,6 +752,10 @@ public: :tmp_field(fld), producing_item(item) {} }; + +#define TOUCHED_SEL_COND 1/* WHERE/HAVING/ON should be reinited before use */ +#define TOUCHED_SEL_DERIVED (1<<1)/* derived should be reinited before use */ + /* SELECT_LEX - store information of parsed SELECT statment */ @@ -926,7 +930,8 @@ public: subquery. Prepared statements work OK in that regard, as in case of an error during prepare the PS is not created. */ - bool first_execution; + uint8 changed_elements; // see TOUCHED_SEL_* + /* TODO: add foloowing first_* to bitmap above */ bool first_natural_join_processing; bool first_cond_optimization; /* do not wrap view fields with Item_ref */ @@ -3157,6 +3162,31 @@ public: */ bool tmp_table() const { return create_info.tmp_table(); } bool if_exists() const { return create_info.if_exists(); } + + /* + Run specified phases for derived tables/views in the given list + + @param table_list - list of derived tables/view to handle + @param phase - phases to process tables/views through + + @details + This method runs phases specified by the 'phases' on derived + tables/views found in the 'table_list' with help of the + TABLE_LIST::handle_derived function. + 'this' is passed as an argument to the TABLE_LIST::handle_derived. + + @return false - ok + @return true - error + */ + bool handle_list_of_derived(TABLE_LIST *table_list, uint phases) + { + for (TABLE_LIST *tl= table_list; tl; tl= tl->next_local) + { + if (tl->is_view_or_derived() && tl->handle_derived(this, phases)) + return true; + } + return false; + } }; |