From fde2777b2722a2b81f995c74e74cc3e47c0f8788 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Wed, 11 Dec 2013 10:13:08 -0800 Subject: [PATCH] Another attempt to fix the memory leak of mdev-5400. --- sql/sql_select.cc | 1 + sql/sql_union.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index a66c6bd15d8..d38363f15d1 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -10533,6 +10533,7 @@ void JOIN::cleanup(bool full) { tab->cleanup(); } + table= 0; } else { diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 5c4a9a8db5f..f82657a837c 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -628,6 +628,7 @@ bool st_select_lex_unit::exec() { ha_rows records_at_start= 0; thd->lex->current_select= sl; + fake_select_lex->uncacheable|= sl->uncacheable; { set_limit(sl);