summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeeraj Bisht <neeraj.x.bisht@oracle.com>2012-10-18 23:54:18 +0530
committerNeeraj Bisht <neeraj.x.bisht@oracle.com>2012-10-18 23:54:18 +0530
commitbecab17a872851793d741a7bcfadf59818d98f02 (patch)
treedb09badaeb6ef3384efda16b6a9c427a36ef06ba
parent2c3baab8f82c049e876ba655b5e3d4d732d9561c (diff)
parent4aaadc1236a45ac5327ad4c1f9aba2992b9fe014 (diff)
downloadmariadb-git-becab17a872851793d741a7bcfadf59818d98f02.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.cc7
1 files changed, 0 insertions, 7 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 5c216a44d70..97ccf16ddd3 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -7196,15 +7196,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.