summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-06-25 16:32:47 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-06-25 16:32:47 +0300
commit5e0aaa2613bb5394395cb06d7e56a29cd7e952f3 (patch)
tree45ae72f4a1e319c48f0c80ac2781c4246338f0c1 /sql
parent8241532516c9018882f2cde1b8e70ba1b544bc68 (diff)
parent2b2e09086cf2b2fcbe32b2555ef51d52481487da (diff)
downloadmariadb-git-5e0aaa2613bb5394395cb06d7e56a29cd7e952f3.tar.gz
merge
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_select.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 3e03920980f..211119de6f1 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -7358,7 +7358,8 @@ remove_const(JOIN *join,ORDER *first_order, COND *cond,
*simple_order=0; // Must do a temp table to sort
else if (!(order_tables & not_const_tables))
{
- if (order->item[0]->with_subselect)
+ if (order->item[0]->with_subselect &&
+ !(join->select_lex->options & SELECT_DESCRIBE))
order->item[0]->val_str(&order->item[0]->str_value);
DBUG_PRINT("info",("removing: %s", order->item[0]->full_name()));
continue; // skip const item