summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorram@gw.mysql.r18.ru <>2004-03-16 16:28:50 +0400
committerram@gw.mysql.r18.ru <>2004-03-16 16:28:50 +0400
commitf54827e5d05cfe6953554ff2215946e98fc47eeb (patch)
tree5bc1f719d81b520270ea937e64f9616301e7aeda /sql/item_func.cc
parent0be2ef688cef9b73073da74de0eb7f87250c1a3c (diff)
downloadmariadb-git-f54827e5d05cfe6953554ff2215946e98fc47eeb.tar.gz
Fix for the bug #3118: Subquery and order by
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 0327204dbfd..d5e94c7bd35 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -205,7 +205,7 @@ Item_func::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
{
Item *item;
/* We can't yet set item to *arg as fix_fields may change *arg */
- if ((*arg)->fix_fields(thd, tables, arg) ||
+ if ((!(*arg)->fixed && (*arg)->fix_fields(thd, tables, arg)) ||
(*arg)->check_cols(allowed_arg_cols))
return 1; /* purecov: inspected */
item= *arg;