mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
filesort.cc:
Fixed that i mixed Field and Item in some cases sql/filesort.cc: Fixed that i mixed Field and Item in some cases
This commit is contained in:
parent
9f09ae660b
commit
ac44fe1f12
1 changed files with 3 additions and 5 deletions
|
@ -470,8 +470,7 @@ static void make_sortkey(register SORTPARAM *param,
|
|||
switch (sort_field->result_type) {
|
||||
case STRING_RESULT:
|
||||
{
|
||||
// BAR TODO: need checking that it is really Field_str based class
|
||||
CHARSET_INFO *cs=((Field_str*)(sort_field->field))->charset();
|
||||
CHARSET_INFO *cs=item->str_value.charset();
|
||||
|
||||
if (item->maybe_null)
|
||||
*to++=1;
|
||||
|
@ -947,9 +946,8 @@ sortlength(SORT_FIELD *sortorder, uint s_length)
|
|||
sortorder->length=sortorder->item->max_length;
|
||||
#ifdef USE_STRCOLL
|
||||
if (!sortorder->item->binary)
|
||||
{
|
||||
// BAR TODO: need checking that it is really Field_str based class
|
||||
CHARSET_INFO *cs=((Field_str*)(sortorder->field))->charset();
|
||||
{
|
||||
CHARSET_INFO *cs=sortorder->item->str_value.charset();
|
||||
if (use_strcoll(cs))
|
||||
sortorder->length= sortorder->length*cs->strxfrm_multiply;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue