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
7cb11f0d
Commit
7cb11f0d
authored
May 26, 2011
by
Sergey Glukhov
Browse files
Options
Browse Files
Download
Plain Diff
5.1 -> 5.5 merge
parents
33af0021
6d2e6612
Changes
3
Show 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 @
7cb11f0d
...
@@ -543,6 +543,12 @@ ROUND(LEAST(15, -4939092, 0.2704), STDDEV('a'))
...
@@ -543,6 +543,12 @@ ROUND(LEAST(15, -4939092, 0.2704), STDDEV('a'))
-4939092.0000
-4939092.0000
Warnings:
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
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
End of 5.1 tests
#
#
# Bug #8433: Overflow must be an error
# Bug #8433: Overflow must be an error
...
...
mysql-test/t/func_math.test
View file @
7cb11f0d
...
@@ -370,6 +370,12 @@ DROP TABLE t1;
...
@@ -370,6 +370,12 @@ DROP TABLE t1;
SELECT
ROUND
(
LEAST
(
15
,
-
4939092
,
0.2704
),
STDDEV
(
'a'
));
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
End
of
5.1
tests
--
echo
#
--
echo
#
...
...
sql/item_func.cc
View file @
7cb11f0d
...
@@ -2259,6 +2259,9 @@ void Item_func_round::fix_length_and_dec()
...
@@ -2259,6 +2259,9 @@ void Item_func_round::fix_length_and_dec()
}
}
val1
=
args
[
1
]
->
val_int
();
val1
=
args
[
1
]
->
val_int
();
if
((
null_value
=
args
[
1
]
->
is_null
()))
return
;
val1_unsigned
=
args
[
1
]
->
unsigned_flag
;
val1_unsigned
=
args
[
1
]
->
unsigned_flag
;
if
(
val1
<
0
)
if
(
val1
<
0
)
decimals_to_set
=
val1_unsigned
?
INT_MAX
:
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