From 44135d4725dd3ad6d331c60b0bab1618472b8ae4 Mon Sep 17 00:00:00 2001 From: Kent Boortz Date: Thu, 30 Jun 2011 17:31:31 +0200 Subject: Updated/added copyright headers --- sql/filesort.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sql/filesort.cc') diff --git a/sql/filesort.cc b/sql/filesort.cc index 11be5d7f672..ddc905d7280 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright (c) 2000-2008 MySQL AB, 2010 Sun Microsystems, Inc. + Use is subject to license terms. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -11,7 +12,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* Sorts a database */ -- cgit v1.2.1 From 0c7db7839b052269e034d91a7597a74b3d1f90ba Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Thu, 25 Aug 2011 10:38:07 +0200 Subject: Bug#12856915 VALGRIND FAILURE IN FILESORT/CREATE_SORT_INDEX Suppress the known warnings generated by filesort(). The real fix belongs to worklog 1509: Pack values of non-sorted fields in the sort buffer (which is basically the same issue, but in an optimization context: We are writing the entire sort buffer to disk, including un-used space for varchar columns.) mysql-test/valgrind.supp: Add new Memcheck suppressions for filesort. sql/filesort.cc: Remove the ifdef HAVE_purify/bzero code, use valgrind suppressions instead. --- sql/filesort.cc | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'sql/filesort.cc') diff --git a/sql/filesort.cc b/sql/filesort.cc index 99e5156427a..0ff354b334c 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -959,21 +959,10 @@ static void make_sortkey(register SORTPARAM *param, if (addonf->null_bit && field->is_null()) { nulls[addonf->null_offset]|= addonf->null_bit; -#ifdef HAVE_purify - bzero(to, addonf->length); -#endif } else { -#ifdef HAVE_purify - uchar *end= field->pack(to, field->ptr); - uint length= (uint) ((to + addonf->length) - end); - DBUG_ASSERT((int) length >= 0); - if (length) - bzero(end, length); -#else (void) field->pack(to, field->ptr); -#endif } to+= addonf->length; } -- cgit v1.2.1 From c6de8c8c05d020f16817fb0bfb05c9c3df475a76 Mon Sep 17 00:00:00 2001 From: "Norvald H. Ryeng" Date: Tue, 30 Aug 2011 09:56:07 +0200 Subject: Bug#11765254 - 58200: ASSERTION FAILED: PARAM.SORT_LENGTH WHEN GROUPING BY FUNCTIONS.... (PART The bug was introduced in a patch for bug 49897. Problem: The assertion inserted by the original patch to guard against zero-lenght sort keys during merge phase triggers also when the whole set fits in memory. Fix: Move assert so that it does not trigger if the whole set is in memory. mysql-test/r/group_by.result: Add test for bug#11765254 mysql-test/t/group_by.test: Add test for bug#11765254 sql/filesort.cc: Move assertion --- sql/filesort.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sql/filesort.cc') diff --git a/sql/filesort.cc b/sql/filesort.cc index 0ff354b334c..715528bcd52 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -144,8 +144,6 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, error= 1; bzero((char*) ¶m,sizeof(param)); param.sort_length= sortlength(thd, sortorder, s_length, &multi_byte_charset); - /* filesort cannot handle zero-length records. */ - DBUG_ASSERT(param.sort_length); param.ref_length= table->file->ref_length; param.addon_field= 0; param.addon_length= 0; @@ -257,6 +255,9 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, } else { + /* filesort cannot handle zero-length records during merge. */ + DBUG_ASSERT(param.sort_length != 0); + if (table_sort.buffpek && table_sort.buffpek_len < maxbuffer) { x_free(table_sort.buffpek); -- cgit v1.2.1