summaryrefslogtreecommitdiff
path: root/sql/filesort.cc
diff options
context:
space:
mode:
authorNorvald H. Ryeng <norvald.ryeng@oracle.com>2011-08-30 10:16:23 +0200
committerNorvald H. Ryeng <norvald.ryeng@oracle.com>2011-08-30 10:16:23 +0200
commitdd1f7eb13fc3ab5a238b2fed823b2967c457a22f (patch)
treeff05bec7de97f646049a5d9ee82e6848f7e8914c /sql/filesort.cc
parent74e7990a967e09012d0463b97a01a3050a92c2b3 (diff)
parentd6f4a80e570e928739fcdbfd4eeb9b1ade805074 (diff)
downloadmariadb-git-dd1f7eb13fc3ab5a238b2fed823b2967c457a22f.tar.gz
Merge 5.1 => 5.5
Diffstat (limited to 'sql/filesort.cc')
-rw-r--r--sql/filesort.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc
index 8a0b37af339..88e9353abe3 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -147,8 +147,6 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
error= 1;
bzero((char*) &param,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;
@@ -260,6 +258,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)
{
my_free(table_sort.buffpek);