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

Wrong evaluation of domain's check constraint for sp input parameter [CORE2070] #958

Closed
firebird-automations opened this issue Sep 8, 2008 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Cosmin Apreutesei (cosmin_ap2)

Duplicates CORE2039

The code to reproduce the error is below (always happens for me). Try to execute New_Procedure(NULL). It wil give you ISC error 335544879 which means not_valid_for_var Validation error for variable @1, value "@2". The check should instead evaluate to TRUE for a NULL value and so let the value pass. It evaluates correctly if applied to a table field though, I only get this behavior for sp parameters.

CREATE DOMAIN MY_DOMAIN AS VARCHAR(200) CHARACTER SET ASCII
CHECK (VALUE IS NULL OR TRIM(VALUE) <> '')
COLLATE ASCII;

create procedure New_Procedure (x my_domain)
returns (y my_domain)
as
begin
if (x IS NULL OR TRIM(x) <> '') then
y = 'valid';
else
y = 'not valid';
suspend;
end

@firebird-automations
Copy link
Collaborator Author

Commented by: Cosmin Apreutesei (cosmin_ap2)

I just updated to LI-V2.1.1.17910 (superserver, ntpl binary) and the error persists.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue duplicates CORE2039 [ CORE2039 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Duplicates CORE2039. Fixed for v2.1.2.

@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

QA Status: No test

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