diff options
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 2 |
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; |