diff options
author | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2009-09-04 12:20:53 +0500 |
---|---|---|
committer | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2009-09-04 12:20:53 +0500 |
commit | 643fbe4234a06e51746c8912223652a3b41fe133 (patch) | |
tree | 9f1ce478e9b8d35b3a8e3fe1a4d30d0135797c3c /sql | |
parent | 6e27ef435e3863382295f1a1d41424c9b8d4c197 (diff) | |
download | mariadb-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.cc | 2 |
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; |