From af4421e82d3d458ea8f19cda6376503be6c49143 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Mon, 29 May 2017 00:27:14 -0700 Subject: Fixed the bug mdev-12931. 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. --- sql/sql_select.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/sql_select.cc') 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 *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. */ -- cgit v1.2.1