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) ...@@ -950,7 +950,7 @@ sortlength(SORT_FIELD *sortorder, uint s_length)
#ifdef USE_STRCOLL #ifdef USE_STRCOLL
if (!sortorder->item->binary()) if (!sortorder->item->binary())
{ {
CHARSET_INFO *cs=sortorder->item->str_value.charset(); CHARSET_INFO *cs=sortorder->item->charset();
if (use_strnxfrm(cs)) if (use_strnxfrm(cs))
sortorder->length= sortorder->length*cs->strxfrm_multiply; sortorder->length= sortorder->length*cs->strxfrm_multiply;
} }
......
...@@ -228,11 +228,9 @@ Field *Item_func::tmp_table_field(TABLE *t_arg) ...@@ -228,11 +228,9 @@ Field *Item_func::tmp_table_field(TABLE *t_arg)
break; break;
case STRING_RESULT: case STRING_RESULT:
if (max_length > 255) if (max_length > 255)
res= new Field_blob(max_length, maybe_null, name, t_arg, res= new Field_blob(max_length, maybe_null, name, t_arg, charset());
str_value.charset());
else else
res= new Field_string(max_length, maybe_null, name, t_arg, res= new Field_string(max_length, maybe_null, name, t_arg, charset());
str_value.charset());
break; break;
} }
return res; return res;
......
...@@ -3624,9 +3624,9 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, ...@@ -3624,9 +3624,9 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
case STRING_RESULT: case STRING_RESULT:
if (item_sum->max_length > 255) if (item_sum->max_length > 255)
return new Field_blob(item_sum->max_length,maybe_null, 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, 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; 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