1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00
This commit is contained in:
bell@sanja.is.com.ua
2002-11-27 19:31:11 +02:00
47 changed files with 550 additions and 131 deletions

View File

@ -23,6 +23,7 @@
#endif
#include <m_ctype.h>
#include "sql_sort.h"
#include "assert.h"
#ifndef THREAD
#define SKIP_DBUG_IN_FILESORT
@ -83,7 +84,7 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
#endif
// BAR TODO: this is not absolutely correct, but OK for now
for(i=0;i<table->fields;i++)
for (i=0;i<table->fields;i++)
if (!table->field[i]->binary())
charset=table->field[i]->charset();
// /BAR TODO
@ -579,6 +580,10 @@ static void make_sortkey(register SORTPARAM *param,
change_double_for_sort(value,(byte*) to);
break;
}
case ROW_RESULT:
// This case should never be choosen
DBUG_ASSERT(0);
break;
}
}
if (sort_field->reverse)
@ -965,6 +970,10 @@ sortlength(SORT_FIELD *sortorder, uint s_length)
case REAL_RESULT:
sortorder->length=sizeof(double);
break;
case ROW_RESULT:
// This case should never be choosen
DBUG_ASSERT(0);
break;
}
if (sortorder->item->maybe_null)
length++; // Place for NULL marker