summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2014-10-19 09:50:50 -0700
committerIgor Babaev <igor@askmonty.org>2014-10-19 09:50:50 -0700
commitd24919969a4dcebf5bd206ee2678d23c72ca726a (patch)
tree7c7e150fa0b14d38ce7ab0377a510f7381e46825 /sql/sql_union.cc
parentec89abfef4d0ceef06e4037e8fa1a3cdad7ca18d (diff)
downloadmariadb-git-d24919969a4dcebf5bd206ee2678d23c72ca726a.tar.gz
Correction for the fix of the bug mdev-6874.
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 45d27116c36..490123b644b 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -784,6 +784,8 @@ bool st_select_lex_unit::exec()
if (uncacheable || !item || !item->assigned() || describe)
{
+ if (!fake_select_lex)
+ union_result->cleanup();
for (SELECT_LEX *sl= select_cursor; sl; sl= sl->next_select())
{
ha_rows records_at_start= 0;