mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch '10.1' into 10.2
This commit is contained in:
@ -804,7 +804,7 @@ JOIN::prepare(TABLE_LIST *tables_init,
|
||||
thd->lex->current_select->context_analysis_place;
|
||||
thd->lex->current_select->context_analysis_place= SELECT_LIST;
|
||||
if (setup_fields(thd, ref_ptrs, fields_list, MARK_COLUMNS_READ,
|
||||
&all_fields, 1))
|
||||
&all_fields, &select_lex->pre_fix, 1))
|
||||
DBUG_RETURN(-1);
|
||||
thd->lex->current_select->context_analysis_place= save_place;
|
||||
|
||||
@ -14708,10 +14708,23 @@ simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top,
|
||||
nested_join= table->nested_join;
|
||||
if (table->sj_on_expr && !in_sj)
|
||||
{
|
||||
/*
|
||||
If this is a semi-join that is not contained within another semi-join,
|
||||
leave it intact (otherwise it is flattened)
|
||||
*/
|
||||
/*
|
||||
If this is a semi-join that is not contained within another semi-join
|
||||
leave it intact (otherwise it is flattened)
|
||||
*/
|
||||
/*
|
||||
Make sure that any semi-join appear in
|
||||
the join->select_lex->sj_nests list only once
|
||||
*/
|
||||
List_iterator_fast<TABLE_LIST> sj_it(join->select_lex->sj_nests);
|
||||
TABLE_LIST *sj_nest;
|
||||
while ((sj_nest= sj_it++))
|
||||
{
|
||||
if (table == sj_nest)
|
||||
break;
|
||||
}
|
||||
if (sj_nest)
|
||||
continue;
|
||||
join->select_lex->sj_nests.push_back(table, join->thd->mem_root);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user