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:
@ -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;
|
||||
|
Reference in New Issue
Block a user