summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/filesort.cc2
-rw-r--r--sql/item_func.cc6
-rw-r--r--sql/sql_select.cc4
3 files changed, 5 insertions, 7 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc
index 6fb9c699ffc..13c48b745cd 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -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;
}
diff --git a/sql/item_func.cc b/sql/item_func.cc
index c03e77821f1..8b2b2fc83a3 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -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;
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index b981ae329cd..8acb5fa5635 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -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;