summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-06-25 16:20:22 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-06-25 16:20:22 +0300
commit8fc01031bfbb5618a9168bd7629e577b4866ede9 (patch)
tree28538bb1c31b321181e20d14b1b17dba7b28b452 /sql
parent2a86768e9e1ca85ec4380e29df72fbdcea34a85d (diff)
parent93013ae6307fad0525c5317b798e3f394de95cbd (diff)
downloadmariadb-git-8fc01031bfbb5618a9168bd7629e577b4866ede9.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 c9cca2e601f..b61f7d1eb37 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -7238,7 +7238,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