summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2010-04-08 23:03:07 +0200
committerSergei Golubchik <sergii@pisem.net>2010-04-08 23:03:07 +0200
commitc49726b93afbf3c4404557c4a8aaa90a1e77b2fb (patch)
tree6ed62b0a768042275157dead2751114098e54331 /sql
parentcda2c0ced46ceccfcef254ea6ce6a86d066c1341 (diff)
parent5b8c42d91d3d709ffa4fca27f4199e52f72ca38e (diff)
downloadmariadb-git-c49726b93afbf3c4404557c4a8aaa90a1e77b2fb.tar.gz
merged
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_select.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 1c91650c847..279c4bcac60 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -2335,7 +2335,13 @@ JOIN::destroy()
tab->cleanup();
}
tmp_join->tmp_join= 0;
+ /*
+ We need to clean up tmp_table_param for reusable JOINs (having non-zero
+ and different from self tmp_join) because it's not being cleaned up
+ anywhere else (as we need to keep the join is reusable).
+ */
tmp_table_param.cleanup();
+ tmp_join->tmp_table_param.copy_field= 0;
DBUG_RETURN(tmp_join->destroy());
}
cond_equal= 0;