summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
authorevgen@moonbone.local <>2007-03-10 00:29:02 +0300
committerevgen@moonbone.local <>2007-03-10 00:29:02 +0300
commit04f5c46d5dd9911811bce2683b90e2acc711f94e (patch)
tree641d6571416a8d494af152f6753b253f49563548 /sql/sql_union.cc
parent999c1cdcc1a6c82b69ea75d6661f75ed55f405f1 (diff)
downloadmariadb-git-04f5c46d5dd9911811bce2683b90e2acc711f94e.tar.gz
Bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized
away. Additional fix for bug#22331. Now Item_field prints its value in the case of the const field.
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 16df0059217..1ec724a6338 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -621,6 +621,12 @@ bool st_select_lex_unit::cleanup()
join->tables= 0;
}
error|= fake_select_lex->cleanup();
+ if (fake_select_lex->order_list.elements)
+ {
+ ORDER *ord;
+ for (ord= (ORDER*)fake_select_lex->order_list.first; ord; ord= ord->next)
+ (*ord->item)->cleanup();
+ }
}
DBUG_RETURN(error);