mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
subselect in having clause
fixed bug in sum function in subselect mysql-test/r/subselect.result: subselect in having clause mysql-test/t/subselect.test: subselect in having clause sql/item.cc: subselect in having clause sql/item.h: subselect in having clause sql/item_cmpfunc.cc: subselect in having clause sql/item_cmpfunc.h: subselect in having clause sql/item_func.cc: subselect in having clause sql/item_func.h: subselect in having clause sql/item_strfunc.h: subselect in having clause sql/item_subselect.cc: subselect in having clause sql/item_subselect.h: subselect in having clause sql/item_uniq.h: subselect in having clause sql/sql_base.cc: subselect in having clause sql/sql_class.cc: subselect in having clause sql/sql_class.h: subselect in having clause sql/sql_handler.cc: subselect in having clause sql/sql_lex.cc: subselect in having clause sql/sql_lex.h: subselect in having clause sql/sql_prepare.cc: subselect in having clause sql/sql_yacc.yy: subselect in having clause
This commit is contained in:
@ -1874,7 +1874,7 @@ int setup_fields(THD *thd, TABLE_LIST *tables, List<Item> &fields,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item->fix_fields(thd,tables))
|
||||
if (item->fix_fields(thd, tables, it.ref()))
|
||||
DBUG_RETURN(-1); /* purecov: inspected */
|
||||
if (item->with_sum_func && item->type() != Item::SUM_FUNC_ITEM &&
|
||||
sum_func_list)
|
||||
@ -2025,7 +2025,7 @@ int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds)
|
||||
if (*conds)
|
||||
{
|
||||
thd->where="where clause";
|
||||
if ((*conds)->fix_fields(thd,tables))
|
||||
if ((*conds)->fix_fields(thd, tables, conds))
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
@ -2036,7 +2036,7 @@ int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds)
|
||||
{
|
||||
/* Make a join an a expression */
|
||||
thd->where="on clause";
|
||||
if (table->on_expr->fix_fields(thd,tables))
|
||||
if (table->on_expr->fix_fields(thd, tables, &table->on_expr))
|
||||
DBUG_RETURN(1);
|
||||
thd->cond_count++;
|
||||
|
||||
|
Reference in New Issue
Block a user