Wrong aggregation result on a view with distinct

2 posts / 0 new
Last post
alex
alex's picture
Offline
Last seen: 15 hours 26 min ago
Joined: Jan 14 2014
Junior Boarder

Posts: 7

Alexander Shestakov
Wrong aggregation result on a view with distinct
InfiniDB version 4.5.1.
 
create table t (a integer) engine=InfiniDB;
 
create table u (b integer, c varchar(20)) engine=InfiniDB;
 
create or replace view vv as select distinct * from t
inner join u on t.a = u.b;
 
insert into t values (1);
 
insert into t values (2);
 
insert into u values (1, 2);
insert into u values (1, 1);
insert into u values (1, 3);
insert into u values (2, 1);
insert into u values (2, 2);
 
select * from vv;
+------+------+------+
| a    | b    | c    |
+------+------+------+
|    2 |    2 | 2    |
|    1 |    1 | 3    |
|    1 |    1 | 1    |
|    1 |    1 | 2    |
|    2 |    2 | 1    |
+------+------+------+
 
select count(*) from vv;
+----------+
| count(*) |
+----------+
|        2 |
+----------+
 

 

radams
radams's picture
Offline
Last seen: 11 hours 54 min ago
Joined: Jan 3 2011
Administrator

Posts: 492

Robert Adams
Wrong aggregation result on a view with distinct

 

 

Hi Alex,

 

We have opened a bug on this one and will have a fix in our next maintenace release.

 

Thank you,

 

Robert