diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-09-19 09:47:08 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-09-19 09:47:08 +0200 |
commit | f9bdc7c01af52c04a05b5d0e890f86c77323d3b0 (patch) | |
tree | 09779236c1d7061fb1706524c2e3b357369eae8e /sql/item_subselect.h | |
parent | f7be8cf2854fc0c2871c1537e60b1d7cb1931a61 (diff) | |
parent | f566a4f83c8c255e0192afa525fdeb0897927167 (diff) | |
download | mariadb-git-f9bdc7c01af52c04a05b5d0e890f86c77323d3b0.tar.gz |
Merge branch '10.2' into bb-10.2-jan
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r-- | sql/item_subselect.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h index c39735384ed..83340573e8a 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -126,7 +126,14 @@ public: bool changed; /* TRUE <=> The underlying SELECT is correlated w.r.t some ancestor select */ - bool is_correlated; + bool is_correlated; + + /* + TRUE <=> the subquery contains a recursive reference in the FROM list + of one of its selects. In this case some of subquery optimization + strategies cannot be applied for the subquery; + */ + bool with_recursive_reference; enum subs_type {UNKNOWN_SUBS, SINGLEROW_SUBS, EXISTS_SUBS, IN_SUBS, ALL_SUBS, ANY_SUBS}; @@ -250,6 +257,9 @@ public: } void init_expr_cache_tracker(THD *thd); + + Item* build_clone(THD *thd, MEM_ROOT *mem_root) { return 0; } + Item* get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; } friend class select_result_interceptor; @@ -755,7 +765,8 @@ public: ROWID_MERGE_ENGINE, TABLE_SCAN_ENGINE}; subselect_engine(Item_subselect *si, - select_result_interceptor *res) + select_result_interceptor *res): + thd(NULL) { result= res; item= si; @@ -771,7 +782,7 @@ public: Should be called before prepare(). */ void set_thd(THD *thd_arg); - THD * get_thd() { return thd; } + THD * get_thd() { return thd ? thd : current_thd; } virtual int prepare(THD *)= 0; virtual void fix_length_and_dec(Item_cache** row)= 0; /* |