mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge MySQL 5.1.35 into MySQL 5.4
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user