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
Constant columns getting empty value with subselect from procedure [CORE4073] #4401
Comments
Commented by: Thomas Beckmann (thbeckmann) (edited headline - first I though, it would happen inside SP or EB only) |
Modified by: Thomas Beckmann (thbeckmann)summary: Constant columns getting empty value with subselect from procedure in procedure or execute block => Constant columns getting empty value with subselect from procedure |
Modified by: Thomas Beckmann (thbeckmann)description: Hard to describe, see this example: set term ^ ; select A, TEXT from (select 2 as A, TEXT from P_TEST); returns
============ ========== and select A, TEXT from (select '2' as A, TEXT from P_TEST); returns A TEXT If the procedure is replaced like this select A, TEXT from (select '2' as A, '12345' as TEXT from RDB$DATABASE); everything works fine. (Of course the above stuff is a simplified test case) => Hard to describe, see this example: set term ^ ; select A, TEXT from (select 2 as A, TEXT from P_TEST); returns
============ ========== and select A, TEXT from (select '2' as A, TEXT from P_TEST); returns A TEXT If the procedure is replaced like this select A, TEXT from (select '2' as A, '12345' as TEXT from RDB$DATABASE); everything works fine. Queriing like this: select A, TEXT from (select 2 as A, TEXT from P_TEST union select null, null from RDB$DATABASE where 1=0); works, too. (Of course the above stuff is a simplified test case) |
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: @asfernandes Please use "Affects version = 3.0 Initial" instead of 3.0 Alpha 1 (not yet released). |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Alpha 1 [ 10331 ] |
Commented by: Thomas Beckmann (thbeckmann) Sorry for using the wrong version - and thank you very much for your very fast reaction! I'm looking forward to get the snapshot tonight! |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Thomas Beckmann (thbeckmann)
Hard to describe, see this example:
set term ^ ;
create or alter procedure P_TEST returns (TEXT D_VC10) as
begin
TEXT = '12345'; suspend;
end^
set term ; ^
select A, TEXT from (select 2 as A, TEXT from P_TEST);
returns
============ ==========
0 12345
and
select A, TEXT from (select '2' as A, TEXT from P_TEST);
returns
A TEXT
====== ==========
12345
If the procedure is replaced like this
select A, TEXT from (select '2' as A, '12345' as TEXT from RDB$DATABASE);
everything works fine.
Queriing like this:
select A, TEXT from (select 2 as A, TEXT from P_TEST union select null, null from RDB$DATABASE where 1=0);
works, too.
(Of course the above stuff is a simplified test case)
Commits: a74f8f1 FirebirdSQL/fbt-repository@2ba29c7
The text was updated successfully, but these errors were encountered: