summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorGleb Shchepa <gshchepa@mysql.com>2009-05-01 00:27:10 +0500
committerGleb Shchepa <gshchepa@mysql.com>2009-05-01 00:27:10 +0500
commit24457353c70cf09a1d02da28b5691cc45d3b5560 (patch)
tree33557cb33805f2f6a95a729c7e71491efc2110f3 /sql/sql_select.cc
parent20378a2b9192e13fbbf97b256b6c06e30def099e (diff)
parentf0791b8b6b02286a7a01b7659050f3bd900a3529 (diff)
downloadmariadb-git-24457353c70cf09a1d02da28b5691cc45d3b5560.tar.gz
auto-upmerge 5.0-bugteam --> 5.1-bugteam (bug 37362)
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 901e058d934..9fdf88448da 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -2248,6 +2248,14 @@ JOIN::destroy()
cond_equal= 0;
cleanup(1);
+ /* Cleanup items referencing temporary table columns */
+ if (!tmp_all_fields3.is_empty())
+ {
+ List_iterator_fast<Item> it(tmp_all_fields3);
+ Item *item;
+ while ((item= it++))
+ item->cleanup();
+ }
if (exec_tmp_table1)
free_tmp_table(thd, exec_tmp_table1);
if (exec_tmp_table2)