1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00
New num->str functions
strings/ctype-simple.c@1.16
    New num->str functions
strings/ctype-utf8.c@1.18
    New num->str functions


sql/sql_string.cc:
  New num->str functions
strings/ctype-simple.c:
  New num->str functions
strings/ctype-utf8.c:
  New num->str functions
This commit is contained in:
unknown
2002-12-11 15:26:49 +04:00
parent c8a50df16c
commit 6cdf5c6543
3 changed files with 201 additions and 24 deletions

View File

@ -97,14 +97,7 @@ bool String::set(longlong num, CHARSET_INFO *cs)
if (alloc(l))
return TRUE;
if (cs->snprintf == my_snprintf_8bit)
{
str_length=(uint32) (longlong10_to_str(num,Ptr,-10)-Ptr);
}
else
{
str_length=cs->snprintf(cs,Ptr,l,"%d",num);
}
str_length=(uint32) cs->ll10tostr(cs,Ptr,l,-10,num);
str_charset=cs;
return FALSE;
}
@ -115,14 +108,7 @@ bool String::set(ulonglong num, CHARSET_INFO *cs)
if (alloc(l))
return TRUE;
if (cs->snprintf == my_snprintf_8bit)
{
str_length=(uint32) (longlong10_to_str(num,Ptr,10)-Ptr);
}
else
{
str_length=cs->snprintf(cs,Ptr,l,"%d",num);
}
str_length=(uint32) cs->ll10tostr(cs,Ptr,l,10,num);
str_charset=cs;
return FALSE;
}