1
0
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:
vva@eagle.mysql.r18.ru
2004-03-06 03:00:21 +04:00
parent b097995293
commit a8bbcc52a9
6 changed files with 65 additions and 42 deletions

View File

@ -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);