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
constraints on sp output parameters are checked even when the sp returns zero rows [CORE2204] #2632
Comments
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: Sean Leyne (seanleyne) Cosmin, I believe that the functionality is working exactly as intended, null does not meet the domain check, as such the value is not allowed. |
Commented by: Cosmin Apreutesei (cosmin_ap2) The procedure does not return any records. How can a domain check be applied where there is no value to apply to? Does that make any sense? Theory aside, the practical implication is that I now have to uselessly initialize all my output parameters regardless whether the proc ever returns any records or not. |
Commented by: @asfernandes Output parameters (when not initialized) are validated at procedure end or suspending. If no value is returned, looks like a bug for me if they are validated. |
Modified by: @asfernandes |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Alpha 1 [ 10331 ] |
Modified by: @asfernandes |
Modified by: @asfernandes |
Commented by: @pcisar Test created. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Cosmin Apreutesei (cosmin_ap2)
Is duplicated by CORE2839
Is duplicated by CORE3751
Is related to CORE4184
Is related to QA541
CREATE DOMAIN BOOLEAN AS INTEGER NOT NULL CHECK (value = 0 or value = 1);
CREATE PROCEDURE TEST returns (b boolean)
as
begin
if (1 = 0) then
suspend;
end;
select * from test
The select throws "validation error for variable B, value *** null ***".
The answer is correct for execute procedure test returning b into x but not for select from test.
Commits: c268c1f
The text was updated successfully, but these errors were encountered: