mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
- added commands --query_vertical and --query_horisontal to client/mysqltest.cc
- get my_strtod to return inf - get Field_float::store(double) and Field_double::store(float) to set null for nan value (as extra serg's recomendations to fix for patch on Bug #2082 'mysqldump converts "inf" to null')
This commit is contained in:
18
sql/field.cc
18
sql/field.cc
@ -2291,7 +2291,14 @@ int Field_float::store(double nr)
|
||||
float j;
|
||||
int error= 0;
|
||||
|
||||
if (isnan(nr) || unsigned_flag && nr < 0)
|
||||
if (isnan(nr))
|
||||
{
|
||||
j= 0;
|
||||
set_null();
|
||||
set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE);
|
||||
error= 1;
|
||||
}
|
||||
else if (unsigned_flag && nr < 0)
|
||||
{
|
||||
j= 0;
|
||||
set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE);
|
||||
@ -2581,7 +2588,14 @@ int Field_double::store(double nr)
|
||||
{
|
||||
int error= 0;
|
||||
|
||||
if (isnan(nr) || unsigned_flag && nr < 0)
|
||||
if (isnan(nr))
|
||||
{
|
||||
nr= 0;
|
||||
set_null();
|
||||
set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE);
|
||||
error= 1;
|
||||
}
|
||||
else if (unsigned_flag && nr < 0)
|
||||
{
|
||||
nr= 0;
|
||||
set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE);
|
||||
|
Reference in New Issue
Block a user