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

order by group_func

This commit is contained in:
unknown
2004-11-25 17:02:44 +01:00
parent 79f4ee96bc
commit 8de438d5db
3 changed files with 21 additions and 6 deletions

View File

@ -262,11 +262,13 @@ inline int setup_without_group(THD *thd, Item **ref_pointer_array,
save_allow_sum_func= thd->allow_sum_func;
thd->allow_sum_func= 0;
res= (setup_conds(thd, tables, conds) ||
setup_order(thd, ref_pointer_array, tables, fields, all_fields,
order) ||
setup_group(thd, ref_pointer_array, tables, fields, all_fields,
group, hidden_group_fields));
res= setup_conds(thd, tables, conds);
thd->allow_sum_func= save_allow_sum_func;
res= res || setup_order(thd, ref_pointer_array, tables, fields, all_fields,
order);
thd->allow_sum_func= 0;
res= res || setup_group(thd, ref_pointer_array, tables, fields, all_fields,
group, hidden_group_fields);
thd->allow_sum_func= save_allow_sum_func;
DBUG_RETURN(res);
}
@ -11330,7 +11332,7 @@ int setup_order(THD *thd, Item **ref_pointer_array, TABLE_LIST *tables,
setup_group()
thd Thread handler
ref_pointer_array We store references to all fields that was not in
'fields' here.
'fields' here.
fields All fields in the select part. Any item in 'order'
that is part of these list is replaced by a pointer
to this fields.