1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00
allowed set functions aggregated in outer subqueries, allowed nested set functions.
This commit is contained in:
igor@rurik.mysql.com
2005-10-15 14:32:37 -07:00
parent a5c5b2c658
commit c136e9c43b
25 changed files with 772 additions and 75 deletions

View File

@ -4243,11 +4243,13 @@ bool setup_fields(THD *thd, Item **ref_pointer_array,
{
reg2 Item *item;
bool save_set_query_id= thd->set_query_id;
nesting_map save_allow_sum_func= thd->lex->allow_sum_func;
List_iterator<Item> it(fields);
DBUG_ENTER("setup_fields");
thd->set_query_id=set_query_id;
thd->allow_sum_func= allow_sum_func;
if (allow_sum_func)
thd->lex->allow_sum_func|= 1 << thd->lex->current_select->nest_level;
thd->where="field list";
/*
@ -4270,6 +4272,7 @@ bool setup_fields(THD *thd, Item **ref_pointer_array,
if (!item->fixed && item->fix_fields(thd, it.ref()) ||
(item= *(it.ref()))->check_cols(1))
{
thd->lex->allow_sum_func= save_allow_sum_func;
thd->set_query_id= save_set_query_id;
DBUG_RETURN(TRUE); /* purecov: inspected */
}
@ -4280,6 +4283,7 @@ bool setup_fields(THD *thd, Item **ref_pointer_array,
item->split_sum_func(thd, ref_pointer_array, *sum_func_list);
thd->used_tables|= item->used_tables();
}
thd->lex->allow_sum_func= save_allow_sum_func;
thd->set_query_id= save_set_query_id;
DBUG_RETURN(test(thd->net.report_error));
}