diff options
author | Neeraj Bisht <neeraj.x.bisht@oracle.com> | 2012-10-18 23:45:15 +0530 |
---|---|---|
committer | Neeraj Bisht <neeraj.x.bisht@oracle.com> | 2012-10-18 23:45:15 +0530 |
commit | 4aaadc1236a45ac5327ad4c1f9aba2992b9fe014 (patch) | |
tree | 379682582832797a846224aa580cd39c0633c7cd | |
parent | 48519303e8010cc784bf289fa01f1663c2f09184 (diff) | |
download | mariadb-git-4aaadc1236a45ac5327ad4c1f9aba2992b9fe014.tar.gz |
Bug#13726751 - 8 BYTE MEMORY LEAK IN DO_SAVE_BLOB
Problem:-
When we execute a query which has subquery with GROUP BY, ORDER BY and have a
BLOB column,results a memory leak.
Analysis:-
In case of subquery, which have GROUP BY on BLOB and a ORDER BY on other field
and BLOB is not a key. We allocate a tmp buffer to copy_field to take care of
BLOB value.This copy_field value can have copies of its in two join(objects),
so while freeing this copy_field we have to take care that it is
not deleted twice.
The double deletion of tmp_table_param.copy_field is handled by two patches.
One by Kostja :
revid:sp1r-konstantin@mysql.com-20050627101056-55153
Fix the broken test suite in -debug build.
and other by Oleksandr
revid:sp1r-bell@sanja.is.com.ua-20060118114857-19905
Excluded posibility of tmp_table_param.copy_field double deletion (BUG#14851).
both of this patches are commited in different branch and while
merging they both get placed,but there is no need for Kostja patch as Oleksandr
patch handle this.
-rw-r--r-- | sql/sql_select.cc | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index bcf601e5142..de9f0ead7a3 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -7084,15 +7084,8 @@ void JOIN::cleanup(bool full) } } } - /* - We are not using tables anymore - Unlock all tables. We may be in an INSERT .... SELECT statement. - */ if (full) { - if (tmp_join) - tmp_table_param.copy_field= 0; - /* Ensure that the following delete_elements() would not be called twice for the same list. |