mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch '5.5' into 10.0
This commit is contained in:
@ -787,7 +787,7 @@ JOIN::prepare(Item ***rref_pointer_array,
|
||||
wild_num)) ||
|
||||
select_lex->setup_ref_array(thd, real_og_num) ||
|
||||
setup_fields(thd, (*rref_pointer_array), fields_list, MARK_COLUMNS_READ,
|
||||
&all_fields, 1) ||
|
||||
&all_fields, &select_lex->pre_fix, 1) ||
|
||||
setup_without_group(thd, (*rref_pointer_array), tables_list,
|
||||
select_lex->leaf_tables, fields_list,
|
||||
all_fields, &conds, order, group_list,
|
||||
@ -14237,10 +14237,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);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user