summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2009-09-04 12:20:53 +0500
committerSergey Glukhov <Sergey.Glukhov@sun.com>2009-09-04 12:20:53 +0500
commit643fbe4234a06e51746c8912223652a3b41fe133 (patch)
tree9f1ce478e9b8d35b3a8e3fe1a4d30d0135797c3c /sql
parent6e27ef435e3863382295f1a1d41424c9b8d4c197 (diff)
downloadmariadb-git-643fbe4234a06e51746c8912223652a3b41fe133.tar.gz
Bug#45989 memory leak after explain encounters an error in the query
Memory allocated in TMP_TABLE_PARAM::copy_field is not cleaned up. The fix is to clean up TMP_TABLE_PARAM::copy_field array in JOIN::destroy. mysql-test/r/explain.result: test result mysql-test/t/explain.test: test case sql/sql_select.cc: Memory allocated in TMP_TABLE_PARAM::copy_field is not cleaned up. The fix is to clean up TMP_TABLE_PARAM::copy_field array in JOIN::destroy.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_select.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index ff179c432a8..b670e6e3637 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -2176,7 +2176,7 @@ JOIN::destroy()
}
}
tmp_join->tmp_join= 0;
- tmp_table_param.copy_field=0;
+ tmp_table_param.cleanup();
DBUG_RETURN(tmp_join->destroy());
}
cond_equal= 0;