summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <igor@olga.mysql.com>2007-02-12 23:10:33 -0800
committerunknown <igor@olga.mysql.com>2007-02-12 23:10:33 -0800
commite656c582bc68ed708e2a74c78487cca5528907e1 (patch)
treeaefd2a4e397489236f9f67539ec9edb4533f29c0 /sql
parent4c2bc81ae762072973528e306c8fa80031b076b2 (diff)
parentac8e029357ab18279ce0609eb1d5c898a00a4019 (diff)
downloadmariadb-git-e656c582bc68ed708e2a74c78487cca5528907e1.tar.gz
Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug26209 sql/sql_select.cc: Auto merged
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_select.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 63f2604a934..e7b18201a0a 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -12744,15 +12744,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;