1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge olga.mysql.com:/home/igor/mysql-5.0-opt

into  olga.mysql.com:/home/igor/mysql-5.1-opt
This commit is contained in:
igor@olga.mysql.com
2007-02-13 13:31:23 -08:00
3 changed files with 52 additions and 14 deletions

View File

@ -12993,15 +12993,15 @@ SORT_FIELD *make_unireg_sortorder(ORDER *order, uint *length,
for (;order;order=order->next,pos++)
{
pos->field=0; pos->item=0;
if (order->item[0]->type() == Item::FIELD_ITEM)
pos->field= ((Item_field*) (*order->item))->field;
else if (order->item[0]->type() == Item::SUM_FUNC_ITEM &&
!order->item[0]->const_item())
pos->field= ((Item_sum*) order->item[0])->get_tmp_table_field();
else if (order->item[0]->type() == Item::COPY_STR_ITEM)
Item *item= order->item[0]->real_item();
pos->field= 0; pos->item= 0;
if (item->type() == Item::FIELD_ITEM)
pos->field= ((Item_field*) item)->field;
else if (item->type() == Item::SUM_FUNC_ITEM && !item->const_item())
pos->field= ((Item_sum*) item)->get_tmp_table_field();
else if (item->type() == Item::COPY_STR_ITEM)
{ // Blob patch
pos->item= ((Item_copy_string*) (*order->item))->item;
pos->item= ((Item_copy_string*) item)->item;
}
else
pos->item= *order->item;