Commit 717a1ff5 authored by unknown's avatar unknown

Use item->charset() instead of item->str_value.charset()

parent fdff4a99
......@@ -950,7 +950,7 @@ sortlength(SORT_FIELD *sortorder, uint s_length)
#ifdef USE_STRCOLL
if (!sortorder->item->binary())
{
CHARSET_INFO *cs=sortorder->item->str_value.charset();
CHARSET_INFO *cs=sortorder->item->charset();
if (use_strnxfrm(cs))
sortorder->length= sortorder->length*cs->strxfrm_multiply;
}
......
......@@ -228,11 +228,9 @@ Field *Item_func::tmp_table_field(TABLE *t_arg)
break;
case STRING_RESULT:
if (max_length > 255)
res= new Field_blob(max_length, maybe_null, name, t_arg,
str_value.charset());
res= new Field_blob(max_length, maybe_null, name, t_arg, charset());
else
res= new Field_string(max_length, maybe_null, name, t_arg,
str_value.charset());
res= new Field_string(max_length, maybe_null, name, t_arg, charset());
break;
}
return res;
......
......@@ -3624,9 +3624,9 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
case STRING_RESULT:
if (item_sum->max_length > 255)
return new Field_blob(item_sum->max_length,maybe_null,
item->name,table,item->str_value.charset());
item->name,table,item->charset());
return new Field_string(item_sum->max_length,maybe_null,
item->name,table,item->str_value.charset());
item->name,table,item->charset());
}
}
thd->fatal_error=1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment