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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ecb7ce78
Commit
ecb7ce78
authored
Aug 03, 2016
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-10467 Assertion `nr >= 0.0' failed in Item_sum_std::val_real()
Backporting MDEV-5781 from 10.0.
parent
35c9c856
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
mysql-test/r/func_math.result
mysql-test/r/func_math.result
+12
-0
mysql-test/t/func_math.test
mysql-test/t/func_math.test
+12
-0
sql/item_func.cc
sql/item_func.cc
+3
-0
No files found.
mysql-test/r/func_math.result
View file @
ecb7ce78
...
...
@@ -761,3 +761,15 @@ select 5 div 2.0;
select 5.9 div 2, 1.23456789e3 DIV 2, 1.23456789e9 DIV 2, 1.23456789e19 DIV 2;
5.9 div 2 1.23456789e3 DIV 2 1.23456789e9 DIV 2 1.23456789e19 DIV 2
2 617 617283945 6172839450000000000
#
# MDEV-10467 Assertion `nr >= 0.0' failed in Item_sum_std::val_real()
#
CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (1),(2);
SELECT STDDEV_SAMP(ROUND('0', 309)) FROM t1;
STDDEV_SAMP(ROUND('0', 309))
0
DROP TABLE t1;
#
# End of 5.5 tests
#
mysql-test/t/func_math.test
View file @
ecb7ce78
...
...
@@ -567,3 +567,15 @@ select 5.0 div 2.0;
select
5.0
div
2
;
select
5
div
2.0
;
select
5.9
div
2
,
1.23456789e3
DIV
2
,
1.23456789e9
DIV
2
,
1.23456789e19
DIV
2
;
--
echo
#
--
echo
# MDEV-10467 Assertion `nr >= 0.0' failed in Item_sum_std::val_real()
--
echo
#
CREATE
TABLE
t1
(
i
INT
);
INSERT
INTO
t1
VALUES
(
1
),(
2
);
SELECT
STDDEV_SAMP
(
ROUND
(
'0'
,
309
))
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 5.5 tests
--
echo
#
sql/item_func.cc
View file @
ecb7ce78
...
...
@@ -2661,6 +2661,9 @@ 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
return
value
;
if
(
dec_negative
&&
my_isinf
(
tmp
))
tmp2
=
0.0
;
else
if
(
!
dec_negative
&&
my_isinf
(
value_mul_tmp
))
...
...
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