diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2009-06-11 12:07:59 +0200 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2009-06-11 12:07:59 +0200 |
commit | 506c7fd47dd28e5726852e47d117bfbb37677005 (patch) | |
tree | 796cc97d1d103e18e0672d9b57dee4c54857073c /libmysql | |
parent | 4557f4ee9e9975966be6fa7c4fa553b30992ca6d (diff) | |
parent | fbb96b339ae5fcce19446fd27a2fb75e49b960f8 (diff) | |
download | mariadb-git-506c7fd47dd28e5726852e47d117bfbb37677005.tar.gz |
Merge MySQL 5.1.35 into MySQL 5.4
Diffstat (limited to 'libmysql')
-rw-r--r-- | libmysql/libmysql.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index ca329eadf0f..50995601d1f 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -1617,7 +1617,7 @@ mysql_hex_string(char *to, const char *from, ulong length) ulong STDCALL mysql_escape_string(char *to,const char *from,ulong length) { - return escape_string_for_mysql(default_charset_info, to, 0, from, length); + return (uint) escape_string_for_mysql(default_charset_info, to, 0, from, length); } ulong STDCALL @@ -1625,8 +1625,8 @@ mysql_real_escape_string(MYSQL *mysql, char *to,const char *from, ulong length) { if (mysql->server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES) - return escape_quotes_for_mysql(mysql->charset, to, 0, from, length); - return escape_string_for_mysql(mysql->charset, to, 0, from, length); + return (uint) escape_quotes_for_mysql(mysql->charset, to, 0, from, length); + return (uint) escape_string_for_mysql(mysql->charset, to, 0, from, length); } void STDCALL @@ -3833,13 +3833,13 @@ static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field, #undef NOT_FIXED_DEC { /* - The 14 below is to ensure that the server and client has the same + DBL_DIG below is to ensure that the server and client has the same precisions. This will ensure that on the same machine you get the same value as a string independent of the protocol you use. */ sprintf(buff, "%-*.*g", (int) min(sizeof(buff)-1, param->buffer_length), - min(14,width), value); + min(DBL_DIG, width), value); end= strcend(buff, ' '); *end= 0; } |