Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

left join with coalesce where clause return different results in 2.5.5 and 3.0 RC2 [CORE5150] #5433

Closed
firebird-automations opened this issue Mar 11, 2016 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Ugur Soyan (ugrsyn)

Is duplicated by CORE5149
Duplicates CORE5149

create table master(id integer not null primary key, x integer);
create table trn(id integer not null primary key, master_id integer);

insert into master(id,x) values(1,0);
insert into master(id,x) values(2,null);
insert into master(id,x) values(3,1);

insert into trn(id,master_id) values(1,1);
insert into trn(id,master_id) values(2,1);
insert into trn(id,master_id) values(3,2);
insert into trn(id,master_id) values(4,2);
insert into trn(id,master_id) values(5,3);
insert into trn(id,master_id) values(6,3);
insert into trn(id,master_id) values(7,3);

------------
Select http://t.id trn_id, t.master_id trn_master_id, http://m.id master_id, m.x
from trn t
left outer join master m on http://m.id = t.master_id
where coalesce( m.x ,0 ) = 0
------------

--- Firebird 2.5 Result ---

TRN_ID | TRN_MASTER_ID | MASTER_ID | X
------------------------------------------
1 | 1 | 1 | 0
2 | 1 | 1 | 0
3 | 2 | 2 |(null)
4 | 2 | 2 |(null)
------------------------------------------

--- Firebird 3 RC Result ---

TRN_ID | TRN_MASTER_ID | MASTER_ID | X
------------------------------------------
1 | 1 | 1 | 0
2 | 1 | 1 | 0
3 | 2 | 2 |(null)
4 | 2 | 2 |(null)
5 | 3 |(null) |(null)
6 | 3 |(null) |(null)
7 | 3 |(null) |(null)
------------------------------------------

====== Test Details ======

See test for core-5149

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

Link: This issue is duplicated by CORE5149 [ CORE5149 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue duplicates CORE5149 [ CORE5149 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Duplicate [ 3 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test => Covered by another test(s)

Test Details: See test for core-5149

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant