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
5269d378
Commit
5269d378
authored
Aug 08, 2016
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-10468 Assertion `nr >= 0.0' failed in Item_sum_std::val_real()
parent
1b3430a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
mysql-test/r/func_group.result
mysql-test/r/func_group.result
+12
-0
mysql-test/t/func_group.test
mysql-test/t/func_group.test
+6
-0
sql/item_sum.cc
sql/item_sum.cc
+2
-0
No files found.
mysql-test/r/func_group.result
View file @
5269d378
...
...
@@ -2297,3 +2297,15 @@ FROM t1;
C_1 C_2 C_3
NULL 100 200
DROP TABLE t1;
#
# MDEV-10468 Assertion `nr >= 0.0' failed in Item_sum_std::val_real()
#
SELECT STDDEV_POP(f) FROM (SELECT "1e+309" AS f UNION SELECT "-1e+309" AS f) tbl;
STDDEV_POP(f)
1.7976931348623157e308
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e+309'
Warning 1292 Truncated incorrect DOUBLE value: '-1e+309'
SELECT STDDEV(f) FROM (SELECT 1.7976931348623157e+308 AS f UNION SELECT -1.7976931348623157e+308 AS f) tbl;
STDDEV(f)
1.7976931348623157e308
mysql-test/t/func_group.test
View file @
5269d378
...
...
@@ -1590,3 +1590,9 @@ SELECT
SUM
(
data3
)
AS
C_3
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-10468 Assertion `nr >= 0.0' failed in Item_sum_std::val_real()
--
echo
#
SELECT
STDDEV_POP
(
f
)
FROM
(
SELECT
"1e+309"
AS
f
UNION
SELECT
"-1e+309"
AS
f
)
tbl
;
SELECT
STDDEV
(
f
)
FROM
(
SELECT
1.7976931348623157e+308
AS
f
UNION
SELECT
-
1.7976931348623157e+308
AS
f
)
tbl
;
sql/item_sum.cc
View file @
5269d378
...
...
@@ -1762,6 +1762,8 @@ double Item_sum_std::val_real()
{
DBUG_ASSERT
(
fixed
==
1
);
double
nr
=
Item_sum_variance
::
val_real
();
if
(
my_isinf
(
nr
))
return
DBL_MAX
;
DBUG_ASSERT
(
nr
>=
0.0
);
return
sqrt
(
nr
);
}
...
...
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