mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
checking columns of top items
mysql-test/r/row_test.result: changed error message (report requestet columns number) new tests mysql-test/t/row_test.test: new tests sql/item.h: checking columns of wrapper items
This commit is contained in:
@ -2101,7 +2101,8 @@ int setup_fields(THD *thd, TABLE_LIST *tables, List<Item> &fields,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item->fix_fields(thd, tables, it.ref()))
|
||||
if (item->check_cols(1) ||
|
||||
item->fix_fields(thd, tables, it.ref()))
|
||||
DBUG_RETURN(-1); /* purecov: inspected */
|
||||
item= *(it.ref()); //Item can be chenged in fix fields
|
||||
if (item->with_sum_func && item->type() != Item::SUM_FUNC_ITEM &&
|
||||
@ -2255,7 +2256,7 @@ int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds)
|
||||
if (*conds)
|
||||
{
|
||||
thd->where="where clause";
|
||||
if ((*conds)->fix_fields(thd, tables, conds))
|
||||
if ((*conds)->check_cols(1) || (*conds)->fix_fields(thd, tables, conds))
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
@ -2266,7 +2267,8 @@ 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, &table->on_expr))
|
||||
if (table->on_expr->check_cols(1) ||
|
||||
table->on_expr->fix_fields(thd, tables, &table->on_expr))
|
||||
DBUG_RETURN(1);
|
||||
thd->cond_count++;
|
||||
|
||||
|
Reference in New Issue
Block a user