summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2017-05-29 00:27:14 -0700
committerIgor Babaev <igor@askmonty.org>2017-05-29 00:27:14 -0700
commitaf4421e82d3d458ea8f19cda6376503be6c49143 (patch)
tree7048ccae979d06d6f4bf61717b856ba4d776bf1f /sql/sql_select.cc
parente4d10e09cf318aad237143254c45458d16009f70 (diff)
downloadmariadb-git-af4421e82d3d458ea8f19cda6376503be6c49143.tar.gz
Fixed the bug mdev-12931.mariadb-10.1.24
This corrects the patch for mdev-10006. The current code supports only those semi-join nests that are placed at the join top level. So such nests cannot depend on other tables or nests.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 559473b8c19..50f121ce47f 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -14493,7 +14493,8 @@ simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top,
table->table->maybe_null= FALSE;
table->outer_join= 0;
if (!(straight_join || table->straight))
- table->dep_tables= table->embedding? table->embedding->dep_tables: 0;
+ table->dep_tables= table->embedding && !table->embedding->sj_subq_pred ?
+ table->embedding->dep_tables : 0;
if (table->on_expr)
{
/* Add ON expression to the WHERE or upper-level ON condition. */