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
Comments
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Modified by: @dyemanovstatus: Open [ 1 ] => In Progress [ 3 ] |
Commented by: @dyemanov I've cleared the affected version field as it's just a temporary regression in some particular snapshot build. |
Modified by: @dyemanovVersion: 3.0 Alpha 1 [ 10331 ] => |
Modified by: @dyemanovstatus: In Progress [ 3 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Alpha 2 [ 10560 ] |
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 |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
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;
============ =========
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;
============ =========
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;
The text was updated successfully, but these errors were encountered: