Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
54999f4e
Commit
54999f4e
authored
May 23, 2018
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use std::isfinite in C++ code
This is addition to parent revision fixing build failures.
parent
031fa6d4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
sql/field.cc
sql/field.cc
+1
-1
sql/item_func.h
sql/item_func.h
+1
-1
sql/item_strfunc.cc
sql/item_strfunc.cc
+1
-1
storage/innobase/gis/gis0geo.cc
storage/innobase/gis/gis0geo.cc
+1
-1
storage/innobase/gis/gis0rtree.cc
storage/innobase/gis/gis0rtree.cc
+1
-1
No files found.
sql/field.cc
View file @
54999f4e
...
...
@@ -2873,7 +2873,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
;
...
...
sql/item_func.h
View file @
54999f4e
...
...
@@ -237,7 +237,7 @@ class Item_func :public Item_func_or_sum
*/
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
...
...
sql/item_strfunc.cc
View file @
54999f4e
...
...
@@ -2641,7 +2641,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
();
}
...
...
storage/innobase/gis/gis0geo.cc
View file @
54999f4e
...
...
@@ -355,7 +355,7 @@ mbr_join_square(
/* Check if finite (not infinity or NaN),
so we don't get NaN in calculations */
if
(
!
isfinite
(
square
))
{
if
(
!
std
::
isfinite
(
square
))
{
return
DBL_MAX
;
}
...
...
storage/innobase/gis/gis0rtree.cc
View file @
54999f4e
...
...
@@ -1952,7 +1952,7 @@ rtr_estimate_n_rows_in_range(
mtr
.
commit
();
if
(
!
isfinite
(
area
))
{
if
(
!
std
::
isfinite
(
area
))
{
return
(
HA_POS_ERROR
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment