summaryrefslogtreecommitdiff
path: root/sql/opt_subselect.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2014-02-10 17:00:51 -0800
committerIgor Babaev <igor@askmonty.org>2014-02-10 17:00:51 -0800
commitf17079fa7eff75ed831ebe09b22046b7d4b017e3 (patch)
treed2573cd6ebd7b61e1540c35db78744d07ecf73f2 /sql/opt_subselect.cc
parent41fd4844e8492880f9139cd9f10992a3dac390df (diff)
parent3845a89b01ee0fa83812f5e3ac6b39b25da03d3d (diff)
downloadmariadb-git-f17079fa7eff75ed831ebe09b22046b7d4b017e3.tar.gz
Merge 5.3->5.5
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r--sql/opt_subselect.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index b8780b4c4ca..8135fe9dba1 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -5306,9 +5306,9 @@ bool setup_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list,
through Item::cleanup() calls).
*/
-void cleanup_empty_jtbm_semi_joins(JOIN *join)
+void cleanup_empty_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list)
{
- List_iterator<TABLE_LIST> li(*join->join_list);
+ List_iterator<TABLE_LIST> li(*join_list);
TABLE_LIST *table;
while ((table= li++))
{
@@ -5320,6 +5320,10 @@ void cleanup_empty_jtbm_semi_joins(JOIN *join)
table->table= NULL;
}
}
+ else if (table->nested_join && table->sj_subq_pred)
+ {
+ cleanup_empty_jtbm_semi_joins(join, &table->nested_join->join_list);
+ }
}
}