1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

fixed bugs 442/443 (reduced subselect in ORDER/GROUP clauses)

mysql-test/r/subselect.result:
  test of reduced subselects in ORDER/GROUP
mysql-test/t/subselect.test:
  test of reduced subselects in ORDER/GROUP
sql/sql_select.cc:
  added reassigning temporary variable
This commit is contained in:
unknown
2003-05-19 15:32:38 +03:00
parent 7c189b0dcf
commit a33adc45bc
3 changed files with 38 additions and 2 deletions

View File

@ -7167,9 +7167,11 @@ find_order_in_list(THD *thd, Item **ref_pointer_array,
}
order->in_field_list=0;
Item *it= *order->item;
if (it->fix_fields(thd, tables, order->item) || it->check_cols(1) ||
if (it->fix_fields(thd, tables, order->item) ||
//'it' ressigned because fix_field can change it
(it= *order->item), it->check_cols(1) ||
thd->is_fatal_error)
return 1; // Wrong field
return 1; // Wrong field
uint el= all_fields.elements;
all_fields.push_front(it); // Add new field to field list
ref_pointer_array[el]= it;