Skip to content

Regression: Incorrect result in subquery with aggregate [CORE4574] #4891

@firebird-automations

Description

@firebird-automations

Submitted by: Alex Bekhtin (afgm)

with A(ID) as
(
select 1 from rdb$database
union all
select 2 from rdb$database
union all
select 3 from rdb$database
),
B(ID1, ID2) as
(
select 1, null from rdb$database
union all
select 2, null from rdb$database
union all
select 3, null from rdb$database
)
select
sum((select count(*) from B where B.ID1 = http://A.ID))
,
sum((select count(*) from B where B.ID2 = http://A.ID))
-- must be (3,0) (FB2.5) , but not (3,3) (FB3.0)
from A

Commits: 3a6c109 FirebirdSQL/fbt-repository@8d54daa

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions