mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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.
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user