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
cef95249
Commit
cef95249
authored
Mar 07, 2005
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug #8465 (MIN, MAX return incorrect result)
parent
b8e5df4b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
mysql-test/r/func_group.result
mysql-test/r/func_group.result
+13
-0
mysql-test/t/func_group.test
mysql-test/t/func_group.test
+13
-0
No files found.
mysql-test/r/func_group.result
View file @
cef95249
...
...
@@ -842,3 +842,16 @@ col1 count(col1) sum(col1) avg(col1)
-5.000000000010 4 -20.000000000040 -5.0000000000100000
-5.000000000000 2 -10.000000000000 -5.0000000000000000
DROP TABLE t1;
create table t1 (col1 decimal(16,12));
insert into t1 values (-5.00000000001);
insert into t1 values (-5.00000000001);
select col1,sum(col1),max(col1),min(col1) from t1 group by col1;
col1 sum(col1) max(col1) min(col1)
-5.000000000010 -10.000000000020 -5.000000000010 -5.000000000010
delete from t1;
insert into t1 values (5.00000000001);
insert into t1 values (5.00000000001);
select col1,sum(col1),max(col1),min(col1) from t1 group by col1;
col1 sum(col1) max(col1) min(col1)
5.000000000010 10.000000000020 5.000000000010 5.000000000010
DROP TABLE t1;
mysql-test/t/func_group.test
View file @
cef95249
...
...
@@ -548,3 +548,16 @@ insert into t1 select * from t1;
select
col1
,
count
(
col1
),
sum
(
col1
),
avg
(
col1
)
from
t1
group
by
col1
;
DROP
TABLE
t1
;
#
# BUG#8465 decimal MIN and MAX return incorrect result
#
create
table
t1
(
col1
decimal
(
16
,
12
));
insert
into
t1
values
(
-
5.00000000001
);
insert
into
t1
values
(
-
5.00000000001
);
select
col1
,
sum
(
col1
),
max
(
col1
),
min
(
col1
)
from
t1
group
by
col1
;
delete
from
t1
;
insert
into
t1
values
(
5.00000000001
);
insert
into
t1
values
(
5.00000000001
);
select
col1
,
sum
(
col1
),
max
(
col1
),
min
(
col1
)
from
t1
group
by
col1
;
DROP
TABLE
t1
;
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