summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r--sql/item_strfunc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index eb1fbf4855d..3dead7fe1e7 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -1808,7 +1808,7 @@ String *Item_func_format::val_str(String *str)
return 0; /* purecov: inspected */
nr= my_double_round(nr, decimals, FALSE);
/* Here default_charset() is right as this is not an automatic conversion */
- str->set(nr,decimals, default_charset());
+ str->set_real(nr,decimals, default_charset());
if (isnan(nr))
return str;
str_length=str->length();