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
9d42d36e
Commit
9d42d36e
authored
May 26, 2011
by
Sergey Glukhov
Browse files
Options
Browse Files
Download
Plain Diff
5.1 -> 5.5 merge
parents
b5009ee6
3efbf304
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
mysql-test/r/func_math.result
mysql-test/r/func_math.result
+6
-0
mysql-test/t/func_math.test
mysql-test/t/func_math.test
+6
-0
sql/item_func.cc
sql/item_func.cc
+3
-0
No files found.
mysql-test/r/func_math.result
View file @
9d42d36e
...
...
@@ -543,6 +543,12 @@ ROUND(LEAST(15, -4939092, 0.2704), STDDEV('a'))
-4939092.0000
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
#
# Bug#12392636 ASSERTION FAILED: SCALE >= 0 && PRECISION > 0 && SCALE <= PRECISION
#
SELECT SUM(DISTINCT (TRUNCATE((.1), NULL)));
SUM(DISTINCT (TRUNCATE((.1), NULL)))
NULL
End of 5.1 tests
#
# Bug #8433: Overflow must be an error
...
...
mysql-test/t/func_math.test
View file @
9d42d36e
...
...
@@ -370,6 +370,12 @@ DROP TABLE t1;
SELECT
ROUND
(
LEAST
(
15
,
-
4939092
,
0.2704
),
STDDEV
(
'a'
));
--
echo
#
--
echo
# Bug#12392636 ASSERTION FAILED: SCALE >= 0 && PRECISION > 0 && SCALE <= PRECISION
--
echo
#
SELECT
SUM
(
DISTINCT
(
TRUNCATE
((
.
1
),
NULL
)));
--
echo
End
of
5.1
tests
--
echo
#
...
...
sql/item_func.cc
View file @
9d42d36e
...
...
@@ -2259,6 +2259,9 @@ void Item_func_round::fix_length_and_dec()
}
val1
=
args
[
1
]
->
val_int
();
if
((
null_value
=
args
[
1
]
->
is_null
()))
return
;
val1_unsigned
=
args
[
1
]
->
unsigned_flag
;
if
(
val1
<
0
)
decimals_to_set
=
val1_unsigned
?
INT_MAX
:
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