summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-08-25 12:40:09 +0200
committerSergei Golubchik <serg@mariadb.org>2016-08-25 12:40:09 +0200
commit6b1863b8304662189a3b9a4aef1e1bebef035b86 (patch)
tree48ba2cbdda863b644108e93ace3668333ae0d193 /sql/sql_union.cc
parentea91bb6801b1b619d64fa137ea351eca9de683ec (diff)
parent5bbe929d706e26cb3f9b291da6009526a17b1545 (diff)
downloadmariadb-git-6b1863b8304662189a3b9a4aef1e1bebef035b86.tar.gz
Merge branch '10.0' into 10.1
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 8145cec5f25..2086d1d6c03 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -1043,6 +1043,12 @@ bool st_select_lex_unit::cleanup()
join->tables_list= 0;
join->table_count= 0;
join->top_join_tab_count= 0;
+ if (join->tmp_join && join->tmp_join != join)
+ {
+ join->tmp_join->tables_list= 0;
+ join->tmp_join->table_count= 0;
+ join->tmp_join->top_join_tab_count= 0;
+ }
}
error|= fake_select_lex->cleanup();
/*