mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Moved long running query to type_newdecimal-big.test
Removed warnings that depends on floating point comparisions in type_newdecimal.test which caused failures in some setups
This commit is contained in:
@ -972,12 +972,18 @@ int decimal2double(decimal_t *from, double *to)
|
||||
int double2decimal(double from, decimal_t *to)
|
||||
{
|
||||
/* TODO: fix it, when we'll have dtoa */
|
||||
char s[400], *end;
|
||||
sprintf(s, "%.16G", from);
|
||||
end= strend(s);
|
||||
return string2decimal(s, to, &end);
|
||||
char buff[400], *end;
|
||||
int length, res;
|
||||
DBUG_ENTER("double2decimal");
|
||||
length= my_sprintf(buff, (buff, "%.16G", from));
|
||||
DBUG_PRINT("info",("from: %g from_as_str: %s", from, buff));
|
||||
end= buff+length;
|
||||
res= string2decimal(buff, to, &end);
|
||||
DBUG_PRINT("exit", ("res: %d", res));
|
||||
DBUG_RETURN(res);
|
||||
}
|
||||
|
||||
|
||||
static int ull2dec(ulonglong from, decimal_t *to)
|
||||
{
|
||||
int intg1, error=E_DEC_OK;
|
||||
|
Reference in New Issue
Block a user