=== modified file 'sql/item.h' --- old/sql/item.h 2011-04-08 13:41:38 +0000 +++ new/sql/item.h 2011-04-21 03:12:12 +0000 @@ -2535,7 +2535,7 @@ item to the debug log. The second use of this method is as a helper function of print() and error messages, where it is applicable. To suit both goals it should return a meaningful, - distinguishable and sintactically correct string. This method + distinguishable and syntactically correct string. This method should not be used for runtime type identification, use enum {Sum}Functype and Item_func::functype()/Item_sum::sum_func() instead. === modified file 'sql/sql_select.cc' --- old/sql/sql_select.cc 2011-04-15 08:11:49 +0000 +++ new/sql/sql_select.cc 2011-04-21 03:12:12 +0000 @@ -20948,7 +20948,7 @@ ORDER *order, List &fields, List &all_fields, bool is_group_field) { - Item *order_item= *order->item; /* The item from the GROUP/ORDER caluse. */ + Item *order_item= *order->item; /* The item from the GROUP/ORDER clause. */ Item::Type order_item_type; Item **select_item; /* The corresponding item from the SELECT clause. */ Field *from_field; /* The corresponding field from the FROM clause. */ @@ -20980,14 +20980,13 @@ if (!select_item) return TRUE; /* The item is not unique, or some other error occured. */ - - /* Check whether the resolved field is not ambiguos. */ + /* Check whether the resolved field is not ambiguous. */ if (select_item != not_found_item) { Item *view_ref= NULL; /* If we have found field not by its alias in select list but by its - original field name, we should additionaly check if we have conflict + original field name, we should additionally check if we have conflict for this name (in case if we would perform lookup in all tables). */ if (resolution == RESOLVED_BEHIND_ALIAS && !order_item->fixed &&