diff options
author | bar@bar.mysql.r18.ru <> | 2002-11-06 17:43:22 +0400 |
---|---|---|
committer | bar@bar.mysql.r18.ru <> | 2002-11-06 17:43:22 +0400 |
commit | 2434be61f8bdf32af2f42f8aa0d758e27b1fc98b (patch) | |
tree | da00e60b2fd7b0ab3f00cdd758ad27aac80f49ce /sql/sql_string.cc | |
parent | 86b633379cdee7707b5dd69a3658e7ba1afa0946 (diff) | |
download | mariadb-git-2434be61f8bdf32af2f42f8aa0d758e27b1fc98b.tar.gz |
String->copy() now has a charset arg
Diffstat (limited to 'sql/sql_string.cc')
-rw-r--r-- | sql/sql_string.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc index 1276020e3c3..f0f31004544 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -117,7 +117,7 @@ bool String::set(double num,uint decimals, CHARSET_INFO *cs) if (decimals >= NOT_FIXED_DEC) { sprintf(buff,"%.14g",num); // Enough for a DATETIME - return copy(buff, (uint32) strlen(buff)); + return copy(buff, (uint32) strlen(buff), my_charset_latin1); } #ifdef HAVE_FCONVERT int decpt,sign; @@ -182,7 +182,7 @@ end: #else sprintf(buff,"%.*f",(int) decimals,num); #endif - return copy(buff,(uint32) strlen(buff)); + return copy(buff,(uint32) strlen(buff), my_charset_latin1); #endif } @@ -208,13 +208,14 @@ bool String::copy(const String &str) return FALSE; } -bool String::copy(const char *str,uint32 arg_length) +bool String::copy(const char *str,uint32 arg_length, CHARSET_INFO *cs) { if (alloc(arg_length)) return TRUE; if ((str_length=arg_length)) memcpy(Ptr,str,arg_length); Ptr[arg_length]=0; + str_charset=cs; return FALSE; } |