diff options
author | Igor Babaev <igor@askmonty.org> | 2021-04-24 15:50:25 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2021-04-24 16:53:24 -0700 |
commit | 2c9bf0ae8758b2c46ea5e02d1ea3d3ab5cab63b2 (patch) | |
tree | 5190b3a67a03781fa363a50d327b32df8d12fd34 /sql/sql_lex.cc | |
parent | c425d93b92acbf00f03a339c117616d2308669b6 (diff) | |
download | mariadb-git-2c9bf0ae8758b2c46ea5e02d1ea3d3ab5cab63b2.tar.gz |
This commit adds the same call of st_select_lex::set_unique_exclude() that
complemented the fix for MDEV-24823 in 10.2. As it is the only call of
this function in 10.3 the commit also has added the code of the function.
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 fe4d086bd22..56046584b8b 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -4927,6 +4927,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'. |