mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +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:
@@ -262,7 +262,8 @@ JOIN::prepare(TABLE_LIST *tables_init,
|
||||
thd->where="having clause";
|
||||
thd->allow_sum_func=1;
|
||||
select_lex->having_fix_field= 1;
|
||||
bool having_fix_rc= having->fix_fields(thd, tables_list, &having);
|
||||
bool having_fix_rc= (having->check_cols(1) ||
|
||||
having->fix_fields(thd, tables_list, &having));
|
||||
select_lex->having_fix_field= 0;
|
||||
if (having_fix_rc || thd->net.report_error)
|
||||
DBUG_RETURN(-1); /* purecov: inspected */
|
||||
@@ -6651,7 +6652,9 @@ find_order_in_list(THD *thd,TABLE_LIST *tables,ORDER *order,List<Item> &fields,
|
||||
return 0;
|
||||
}
|
||||
order->in_field_list=0;
|
||||
if ((*order->item)->fix_fields(thd, tables, order->item) || thd->fatal_error)
|
||||
Item *it= *order->item;
|
||||
if (it->check_cols(1) || it->fix_fields(thd, tables, order->item) ||
|
||||
thd->fatal_error)
|
||||
return 1; // Wrong field
|
||||
all_fields.push_front(*order->item); // Add new field to field list
|
||||
order->item=(Item**) all_fields.head_ref();
|
||||
|
||||
Reference in New Issue
Block a user