mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Use item->charset() instead of item->str_value.charset()
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user