diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-25 10:20:57 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-25 10:20:57 +0300 |
commit | e4394cc5472a18d791b48e56784742b512de2bf8 (patch) | |
tree | 4e20f1da804a86891d7477bb4cc20bbcb6b63564 /sql/sql_lex.cc | |
parent | ee455e6f2e6c9cda921c0801210786123d9f8b95 (diff) | |
parent | 2c9bf0ae8758b2c46ea5e02d1ea3d3ab5cab63b2 (diff) | |
download | mariadb-git-bb-10.4-merge.tar.gz |
Merge 10.3 into 10.4bb-10.4-merge
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index c840ae6990c..5937c43c95d 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -5047,6 +5047,27 @@ bool st_select_lex::save_prep_leaf_tables(THD *thd) } +/** + Set exclude_from_table_unique_test for selects of this select and all selects + belonging to the underlying units of derived tables or views +*/ + +void st_select_lex::set_unique_exclude() +{ + exclude_from_table_unique_test= TRUE; + for (SELECT_LEX_UNIT *unit= first_inner_unit(); + unit; + unit= unit->next_unit()) + { + if (unit->derived && unit->derived->is_view_or_derived()) + { + for (SELECT_LEX *sl= unit->first_select(); sl; sl= sl->next_select()) + sl->set_unique_exclude(); + } + } +} + + /* Return true if this select_lex has been converted into a semi-join nest within 'ancestor'. |