diff options
author | unknown <dlenev@brandersnatch.localdomain> | 2004-05-27 17:54:40 +0400 |
---|---|---|
committer | unknown <dlenev@brandersnatch.localdomain> | 2004-05-27 17:54:40 +0400 |
commit | 2d1384e44282bc9518d61fb4e9c149a40612f26f (patch) | |
tree | 0a3ac45d591f6d81591a9b4ec19f2d45e2c29570 /client/mysql.cc | |
parent | a1bcf38257fcb124b1ed8432137d82aed95da32d (diff) | |
download | mariadb-git-2d1384e44282bc9518d61fb4e9c149a40612f26f.tar.gz |
Made my_snprintf() behavior snprintf() compatible when printing %x arguments (it should
produce hex digits in lower case). (fixed version)
Replaced _dig_vec array with two _dig_vec_upper/_dig_vec_lower arrays.
Added extra argument to int2str function which controls case of digits you get.
Replaced lot of invocations of int2str for decimal radix with more optimized int10_to_str()
function.
Removed unused my_itoa/my_ltoa functions.
client/mysql.cc:
Replaced int2str invocations with radix argument equal to 10 with optimized int10_to_str()
call.
client/mysqladmin.c:
Replaced int2str invocations with radix argument equal to 10 with optimized int10_to_str()
call.
dbug/dbug.c:
_dig_vec became _dig_vec_upper.
include/m_string.h:
_dig_vec is obsoleted by _dig_vec_upper/_dig_vec_lower.
my_itoa()/my_ltoa() functions were removed because they were never used in our code.
int2str() now has one more argument which controls case of digits it will produce.
include/my_global.h:
my_itoa()/my_ltoa() functions were removed because they were never used in our code.
isam/isamchk.c:
Replaced int2str invocations with radix argument equal to 10 with optimized int10_to_str()
call.
libmysql/libmysql.def:
_dig_vec is obsoleted by _dig_vec_upper/_dig_vec_lower.
myisam/myisamchk.c:
Replaced int2str invocation with radix argument equal to 10 with optimized int10_to_str()
call.
mysys/mf_tempfile.c:
_dig_vec became _dig_vec_upper.
mysys/my_error.c:
Replaced int2str invocations with radix argument equal to 10 with optimized int10_to_str()
call.
mysys/my_tempnam.c:
_dig_vec became _dig_vec_upper.
sql-common/client.c:
Replaced int2str invocation with radix argument equal to 10 with optimized int10_to_str()
call.
sql/item_strfunc.cc:
_dig_vec became _dig_vec_upper. Also we don't need hex[] array in this file now because we
have _dig_vec_lower instead.
sql/mysqld.cc:
Replaced int2str invocations with radix argument equal to 10 with optimized int10_to_str()
call.
sql/password.c:
_dig_vec became _dig_vec_upper.
sql/sql_bitmap.h:
_dig_vec became _dig_vec_upper.
strings/int2str.c:
Replaced _dig_vec by _dig_vec_upper/_dig_vec_lower pair.
int2str() now has one more argument which controls case of digits it will produce.
my_itoa()/my_ltoa() functions were removed because they were never used in our code.
strings/longlong2str-x86.s:
_dig_vec became _dig_vec_upper.
strings/longlong2str.c:
_dig_vec became _dig_vec_upper.
strings/my_vsnprintf.c:
If my_snprintf() is printing %x argument it should produce lower case hexadecimal digits
to be snprintf() compatible.
Diffstat (limited to 'client/mysql.cc')
-rw-r--r-- | client/mysql.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 6e5a1d17842..98bc7e750e1 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1872,7 +1872,7 @@ com_go(String *buffer,char *line __attribute__((unused))) { *pos++= ','; *pos++= ' '; - pos=int2str(warnings, pos, 10); + pos=int10_to_str(warnings, pos, 10); pos=strmov(pos, " warning"); if (warnings != 1) *pos++= 's'; @@ -3090,21 +3090,21 @@ static void nice_time(double sec,char *buff,bool part_second) { tmp=(ulong) floor(sec/(3600.0*24)); sec-=3600.0*24*tmp; - buff=int2str((long) tmp,buff,10); + buff=int10_to_str((long) tmp, buff, 10); buff=strmov(buff,tmp > 1 ? " days " : " day "); } if (sec >= 3600.0) { tmp=(ulong) floor(sec/3600.0); sec-=3600.0*tmp; - buff=int2str((long) tmp,buff,10); + buff=int10_to_str((long) tmp, buff, 10); buff=strmov(buff,tmp > 1 ? " hours " : " hour "); } if (sec >= 60.0) { tmp=(ulong) floor(sec/60.0); sec-=60.0*tmp; - buff=int2str((long) tmp,buff,10); + buff=int10_to_str((long) tmp, buff, 10); buff=strmov(buff," min "); } if (part_second) |