summaryrefslogtreecommitdiff
path: root/sql/opt_subselect.cc
diff options
context:
space:
mode:
authorGalina Shalygina <galina.shalygina@mariadb.com>2018-05-10 23:01:41 +0200
committerGalina Shalygina <galina.shalygina@mariadb.com>2018-05-12 12:42:42 +0200
commit8b26fea83572cf5c043721b7835c3828937f9c27 (patch)
tree51cffad343275d58bc38abe13986a63c19858a2e /sql/opt_subselect.cc
parent77867c147b8a278977203ad33d7daff0587a112a (diff)
downloadmariadb-git-8b26fea83572cf5c043721b7835c3828937f9c27.tar.gz
MDEV-16088: Pushdown into materialized views/derived tables doesn't
work in the IN subqueries The pushdown into the materialized derived table/view wasn't done because optimize() for the derived was called before any conditions that can be pushed down were extracted. So optimize() in convert_join_subqueries_to_semijoins() method is called too early and is unnecessary. The second optimize() call in mysql_handle_single_derived() is enough.
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r--sql/opt_subselect.cc2
1 files changed, 0 insertions, 2 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index 7b081218dea..90416e691d4 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -1092,8 +1092,6 @@ bool convert_join_subqueries_to_semijoins(JOIN *join)
while ((in_subq= li++))
{
SELECT_LEX *subq_sel= in_subq->get_select_lex();
- if (subq_sel->handle_derived(thd->lex, DT_OPTIMIZE))
- DBUG_RETURN(1);
if (subq_sel->handle_derived(thd->lex, DT_MERGE))
DBUG_RETURN(TRUE);
subq_sel->update_used_tables();