summaryrefslogtreecommitdiff
path: root/sql/filesort.cc
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2012-09-18 17:32:02 +0200
committerTor Didriksen <tor.didriksen@oracle.com>2012-09-18 17:32:02 +0200
commitb04427802069576e3ab7180c5565d50d9698d98a (patch)
tree2a6b26202a60f99e2c4316ffd53539df5cae2b3a /sql/filesort.cc
parent9f11f46526956ebcb5c0883852233279a987b90a (diff)
downloadmariadb-git-b04427802069576e3ab7180c5565d50d9698d98a.tar.gz
Bug#14542543 FIX BUG #12694872 IN 5.5
Bug#14530242 CRASH / MEMORY CORRUPTION IN FILESORT_BUFFER::GET_RECORD_BUFFER WITH MYISAM This is a backport of Bug#12694872 - VALGRIND: 18,816 BYTES IN 196 BLOCKS ARE DEFINITELY LOST Bug#13340270: assertion table->sort.record_pointers == __null Bug#14536113 CRASH IN CLOSEFRM (TABLE.CC) OR UNPACK (FIELD.H) ON SUBQUERY WITH MYISAM TABLES Also: removed and re-added test files with file-ids from trunk.
Diffstat (limited to 'sql/filesort.cc')
-rw-r--r--sql/filesort.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc
index dba09c969e3..a11be501991 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -138,6 +138,7 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
*/
memcpy(&table_sort, &table->sort, sizeof(FILESORT_INFO));
table->sort.io_cache= NULL;
+ DBUG_ASSERT(table_sort.record_pointers == NULL);
outfile= table_sort.io_cache;
my_b_clear(&tempfile);
@@ -366,6 +367,7 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
void filesort_free_buffers(TABLE *table, bool full)
{
+ DBUG_ENTER("filesort_free_buffers");
my_free(table->sort.record_pointers);
table->sort.record_pointers= NULL;
@@ -383,6 +385,7 @@ void filesort_free_buffers(TABLE *table, bool full)
my_free(table->sort.addon_field);
table->sort.addon_buf= NULL;
table->sort.addon_field= NULL;
+ DBUG_VOID_RETURN;
}
/** Make a array of string pointers. */