1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

BUG#803457: Wrong result with semijoin + view + outer join in maria-5.3-subqueries-mwl90

- Correct handling of outer joins + DuplicateWeedout (docs pending)
This commit is contained in:
Sergey Petrunya
2011-07-21 19:14:34 +04:00
parent ef2b4b14e1
commit c86ffc23ee
4 changed files with 95 additions and 0 deletions

View File

@@ -2477,6 +2477,15 @@ void advance_sj_state(JOIN *join, table_map remaining_tables,
nest->nested_join->sj_depends_on |
nest->nested_join->sj_corr_tables;
}
if (pos->dupsweedout_tables)
{
/* we're in the process of constructing a DuplicateWeedout range */
TABLE_LIST *emb= new_join_tab->table->pos_in_table_list->embedding;
/* and we've entered an inner side of an outer join*/
if (emb && emb->on_expr)
pos->dupsweedout_tables |= emb->nested_join->used_tables;
}
if (pos->dupsweedout_tables &&
!(remaining_tables &