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

The nullable flag of a stored procedure parameter seems to be wrong [DNET335] #346

Closed
firebird-issue-importer opened this issue Jul 25, 2010 · 4 comments

Comments

@firebird-issue-importer

Submitted by: Alexander Muylaert (alexander_gonline.be)

Attachments:
test.xml

Hi Jiri

I was having an argument with the guys from llblgenpro. They said that there is no way to know if a stored procedure parameter is nullable or not. I disagreed, since in firebird this seems to work. I tried proving them wrong.

I made a stored procedure that contains all possible declarations of a parameter to me.

create procedure SMURF (
IN_NULLABLE_BOOL D_BOOL,
IN_NOT_NULLABLE_BOOL D_BOOL_NN,
IN_NULLABLE_BOOL2 type of D_BOOL,
IN_NOT_NULLABLE_BOOL2 type of D_BOOL_NN,
IN_NULLABLE_BOOL3 smallint,
IN_NOT_NULLABLE_BOOL3 smallint not null,
IN_NULLABLE_BOOL4 type of column T_PRODUCT_STOCK.F_PRS_STRICT,
IN_NOT_NULLABLE_BOOL4 type of column T_PRODUCT_STOCK.F_PRS_ACTIVE)
as
begin
/* Procedure Text */
suspend;
end

and then I asked for the schema information.

    var parametersInStoredProcedure = connection\.GetSchema\("ProcedureParameters", new\[\] \{ null, null, "SMURF" \}\);
    parametersInStoredProcedure\.WriteXml\(@"c:\\test\.xml"\);

Attached you'll find the test.xml. It looks to me that the syntax used for IN_NOT_NULLABLE_BOOL3 doesn't return the correct flag for IsNullable.

<ProcedureParameters>
<PROCEDURE_NAME>SMURF</PROCEDURE_NAME>
<PARAMETER_NAME>IN_NOT_NULLABLE_BOOL3</PARAMETER_NAME>
<PARAMETER_DATA_TYPE>smallint</PARAMETER_DATA_TYPE>
<PARAMETER_SUB_TYPE>0</PARAMETER_SUB_TYPE>
<ORDINAL_POSITION>5</ORDINAL_POSITION>
<PARAMETER_DIRECTION>1</PARAMETER_DIRECTION>
<PARAMETER_SIZE>2</PARAMETER_SIZE>
<NUMERIC_PRECISION>0</NUMERIC_PRECISION>
<NUMERIC_SCALE>0</NUMERIC_SCALE>
<CHARACTER_OCTET_LENGTH>0</CHARACTER_OCTET_LENGTH>
<IS_NULLABLE>true</IS_NULLABLE>
</ProcedureParameters>

is this something fixable?

Thanks

Alexander

Commits: aa9e546

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 25, 2010

Modified by: Alexander Muylaert (alexander_gonline.be)

Attachment: test.xml [ 11690 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 25, 2010

Commented by: Alexander Muylaert (alexander_gonline.be)

If I think about it.

IN_NOT_NULLABLE_BOOL2 type of D_BOOL_NN,

This is marked as "not nullable" when actually it is.

You can put null types inside this parameters, hence the syntax of type of.

If you decide to fix the first part, maybe you can fix the second part to?

thanks

Alexander

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 25, 2016

Modified by: @cincuranet

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 25, 2016

Modified by: @cincuranet

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

resolution: Fixed [ 1 ]

Fix Version: vNext [ 10761 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants