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
97464146
Commit
97464146
authored
Apr 20, 2011
by
Sergey Glukhov
Browse files
Options
Browse Files
Download
Plain Diff
5.1 -> 5.5 merge
parents
d431a83f
7bb4f98b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
3 deletions
+38
-3
mysql-test/r/func_math.result
mysql-test/r/func_math.result
+22
-0
mysql-test/t/func_math.test
mysql-test/t/func_math.test
+16
-0
sql/item_func.cc
sql/item_func.cc
+0
-3
No files found.
mysql-test/r/func_math.result
View file @
97464146
...
...
@@ -521,6 +521,28 @@ CREATE TABLE t1 SELECT CEIL(LINESTRINGFROMWKB(1) DIV NULL);
DROP TABLE t1;
CREATE TABLE t1 SELECT FLOOR(LINESTRINGFROMWKB(1) DIV NULL);
DROP TABLE t1;
#
# Bug#11765923 58937: MANY VALGRIND ERRORS AFTER GROUPING BY RESULT OF DECIMAL COLUMN FUNCTION
#
CREATE TABLE t1(f1 DECIMAL(22,1));
INSERT INTO t1 VALUES (0),(1);
SELECT ROUND(f1, f1) FROM t1;
ROUND(f1, f1)
0.0
1.0
SELECT ROUND(f1, f1) FROM t1 GROUP BY 1;
ROUND(f1, f1)
0.0
1.0
DROP TABLE t1;
#
# Bug#11764671 57533: UNINITIALISED VALUES IN COPY_AND_CONVERT (SQL_STRING.CC) WITH CERTAIN CHA
#
SELECT ROUND(LEAST(15, -4939092, 0.2704), STDDEV('a'));
ROUND(LEAST(15, -4939092, 0.2704), STDDEV('a'))
-4939092.0000
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
End of 5.1 tests
#
# Bug #8433: Overflow must be an error
...
...
mysql-test/t/func_math.test
View file @
97464146
...
...
@@ -354,6 +354,22 @@ DROP TABLE t1;
CREATE
TABLE
t1
SELECT
FLOOR
(
LINESTRINGFROMWKB
(
1
)
DIV
NULL
);
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug#11765923 58937: MANY VALGRIND ERRORS AFTER GROUPING BY RESULT OF DECIMAL COLUMN FUNCTION
--
echo
#
CREATE
TABLE
t1
(
f1
DECIMAL
(
22
,
1
));
INSERT
INTO
t1
VALUES
(
0
),(
1
);
SELECT
ROUND
(
f1
,
f1
)
FROM
t1
;
SELECT
ROUND
(
f1
,
f1
)
FROM
t1
GROUP
BY
1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug#11764671 57533: UNINITIALISED VALUES IN COPY_AND_CONVERT (SQL_STRING.CC) WITH CERTAIN CHA
--
echo
#
SELECT
ROUND
(
LEAST
(
15
,
-
4939092
,
0.2704
),
STDDEV
(
'a'
));
--
echo
End
of
5.1
tests
--
echo
#
...
...
sql/item_func.cc
View file @
97464146
...
...
@@ -2407,10 +2407,7 @@ my_decimal *Item_func_round::decimal_op(my_decimal *decimal_value)
if
(
!
(
null_value
=
(
args
[
0
]
->
null_value
||
args
[
1
]
->
null_value
||
my_decimal_round
(
E_DEC_FATAL_ERROR
,
value
,
(
int
)
dec
,
truncate
,
decimal_value
)
>
1
)))
{
decimal_value
->
frac
=
decimals
;
return
decimal_value
;
}
return
0
;
}
...
...
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