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

Regression: NOT-null field from derived table became NULL when is referred outside DT [CORE4289] #4612

Closed
firebird-issue-importer opened this issue Dec 6, 2013 · 8 comments

Comments

@firebird-issue-importer
Copy link

firebird-issue-importer commented Dec 6, 2013

Submitted by: @pavel-zotov

It seems that last build has a bug when query contains derived table:

Script:

show version;
select q.n, case when q.n=0 then 'zero' when q.n<>0 then 'NON-zero' else 'Hm!..' end what_is_n
from (select 0 N from RDB$DATABASE) q;

result in revision 58891:

ISQL Version: WI-V2.5.3.26661 Firebird 2.5
Server version:
Firebird/linux AMD64 (access method), version "LI-T3.0.0.30780 Firebird 3.0 Alpha 1"
Firebird/linux AMD64 (remote server), version "LI-T3.0.0.30780 Firebird 3.0 Alpha 1/tcp (oel64)/P12"
Firebird/x86/Windows NT (remote interface), version "WI-V2.5.3.26661 Firebird 2.5/tcp (csprog)/P12"
on disk structure version 12.0
SQL> select q.n, case when q.n=0 then 'zero' when q.n<>0 then 'NON-zero' else 'Hm!..' end what_is_n
CON> from (select 0 N from RDB$DATABASE) q;

       N WHAT\_IS\_N

============ =========
0 Hm!.. -- that seems strange... ;-)

result in some of previous versions:

ISQL Version: WI-V2.5.3.26661 Firebird 2.5
Server version:
Firebird/x86/Windows NT (access method), version "WI-T3.0.0.30663 Firebird 3.0 Alpha 1"
Firebird/x86/Windows NT (remote server), version "WI-T3.0.0.30663 Firebird 3.0 Alpha 1/tcp (CSMIRROR)/P12"
Firebird/x86/Windows NT (remote interface), version "WI-V2.5.3.26661 Firebird 2.5/tcp (csprog)/P12"
on disk structure version 12.0
SQL> select q.n, case when q.n=0 then 'zero' when q.n<>0 then 'NON-zero' else 'Hm!..' end what_is_n
CON> from (select 0 N from RDB$DATABASE) q;

       N WHAT\_IS\_N

============ =========
0 zero -- thats of course OK.

PS. Same 'Hm!..' result for other data types:

select q.n, case when q.n='a' then 'a' when q.n<>'a' then 'NON-a' else 'Hm!..' end what_is_n
from (select 'a' N from RDB$DATABASE) q;

select q.n, case when q.n=current_date then 'current_date' when q.n<>current_date then 'NON-current_date' else 'Hm!..' end what_is_n
from (select current_date N from RDB$DATABASE) q;

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Dec 6, 2013

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Dec 6, 2013

Modified by: @dyemanov

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Dec 6, 2013

Commented by: @dyemanov

I've cleared the affected version field as it's just a temporary regression in some particular snapshot build.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Dec 6, 2013

Modified by: @dyemanov

Version: 3.0 Alpha 1 [ 10331 ] =>

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Dec 6, 2013

Modified by: @dyemanov

status: In Progress [ 3 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 2 [ 10560 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Dec 6, 2013

Modified by: Sean Leyne (seanleyne)

summary: NOT-null field from derived table became NULL when is referred outside DT => Regression: NOT-null field from derived table became NULL when is referred outside DT

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 27, 2014

Modified by: @pcisar

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

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented May 30, 2015

Modified by: @pavel-zotov

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

QA Status: Done successfully

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

2 participants