summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/field.cc6
-rw-r--r--sql/item_func.cc6
-rw-r--r--sql/item_func.h2
-rw-r--r--sql/item_strfunc.cc2
-rw-r--r--sql/item_sum.cc4
5 files changed, 10 insertions, 10 deletions
diff --git a/sql/field.cc b/sql/field.cc
index a23004ebd96..09e82acb009 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -2904,7 +2904,7 @@ int Field_decimal::store(double nr)
return 1;
}
- if (!isfinite(nr)) // Handle infinity as special case
+ if (!std::isfinite(nr)) // Handle infinity as special case
{
overflow(nr < 0.0);
return 1;
@@ -4821,7 +4821,7 @@ int truncate_double(double *nr, uint field_length, uint dec,
int error= 0;
double res= *nr;
- if (isnan(res))
+ if (std::isnan(res))
{
*nr= 0;
return -1;
@@ -4843,7 +4843,7 @@ int truncate_double(double *nr, uint field_length, uint dec,
max_value-= 1.0 / log_10[dec];
/* Check for infinity so we don't get NaN in calculations */
- if (!my_isinf(res))
+ if (!std::isinf(res))
{
double tmp= rint((res - floor(res)) * log_10[dec]) / log_10[dec];
res= floor(res) + tmp;
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 7719e0faa87..6ca74a79b9c 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -2553,12 +2553,12 @@ double my_double_round(double value, longlong dec, bool dec_unsigned,
volatile double value_div_tmp= value / tmp;
volatile double value_mul_tmp= value * tmp;
- if (!dec_negative && my_isinf(tmp)) // "dec" is too large positive number
+ if (!dec_negative && std::isinf(tmp)) // "dec" is too large positive number
return value;
- if (dec_negative && my_isinf(tmp))
+ if (dec_negative && std::isinf(tmp))
tmp2= 0.0;
- else if (!dec_negative && my_isinf(value_mul_tmp))
+ else if (!dec_negative && std::isinf(value_mul_tmp))
tmp2= value;
else if (truncate)
{
diff --git a/sql/item_func.h b/sql/item_func.h
index 1193daea106..496109b0e24 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -241,7 +241,7 @@ public:
*/
inline double check_float_overflow(double value)
{
- return isfinite(value) ? value : raise_float_overflow();
+ return std::isfinite(value) ? value : raise_float_overflow();
}
/**
Throw an error if the input BIGINT value represented by the
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index dcfbd272809..8738af7ac56 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -2655,7 +2655,7 @@ String *Item_func_format::val_str_ascii(String *str)
return 0; /* purecov: inspected */
nr= my_double_round(nr, (longlong) dec, FALSE, FALSE);
str->set_real(nr, dec, &my_charset_numeric);
- if (!isfinite(nr))
+ if (!std::isfinite(nr))
return str;
str_length=str->length();
}
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 5bed0d32009..06c01c58948 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -1808,7 +1808,7 @@ double Item_sum_std::val_real()
{
DBUG_ASSERT(fixed == 1);
double nr= Item_sum_variance::val_real();
- if (isnan(nr))
+ if (std::isnan(nr))
{
/*
variance_fp_recurrence_next() can overflow in some cases and return "nan":
@@ -1820,7 +1820,7 @@ double Item_sum_std::val_real()
null_value= true; // Convert "nan" to NULL
return 0;
}
- if (my_isinf(nr))
+ if (std::isinf(nr))
return DBL_MAX;
DBUG_ASSERT(nr >= 0.0);
return sqrt(nr);