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

isc_dsql_execute2 does not return errors when called with a non-NULL output SQLDA [CORE2552] #2962

Closed
firebird-automations opened this issue Jul 12, 2009 · 10 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @asfernandes

Jira_subtask_outward CORE2996

If this (and maybe others) function is called with a non-NULL output SQLDA, with a select statement that returns more than one row or throw errors, exceptions are not returned in the status vector.

Now, jrd/successful_completion is aborting in the debug build and clearing the error in the release build.

And in DSQL, the exception is rethrowed after swiching to the clean status vector.

Commits: 6bd4674 3cef554 284aa72 08bc7ea

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Seems dsql\execute_request should throw exception instead of direct manipulation with tdbb_status_vector.
Could you try it ?

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Yes, I think this too.

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Changing the description to not create a very similar ticket.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

description: If this (and maybe others) function is called with a non-NULL output SQLDA, with a select statement that returns more than one row, an isc_sing_select_err should be returned.

Now, jrd/successful_completion is aborting in the debug build and clearing the error in the release build.

=>

If this (and maybe others) function is called with a non-NULL output SQLDA, with a select statement that returns more than one row or throw errors, exceptions are not returned in the status vector.

Now, jrd/successful_completion is aborting in the debug build and clearing the error in the release build.

And in DSQL, the exception is rethrowed after swiching to the clean status vector.

summary: isc_dsql_execute2 does not return isc_sing_select_err errors => isc_dsql_execute2 does not return errors when called with a non-NULL output SQLDA

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5 Beta 2 [ 10300 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @aafemt

It looks like fix for the issue is a bit incorrect. Now when the query returns no records, isc_dsql_execute2 returns 335544569 instead of 335544338 or 335544374.

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

It seems that ERRD_post() in the both modified places should be replaced with status_exception::raise(), so that the generic DSQL error code wouldn't be added before the rest of the status vector. It will be compatible with the legacy behavior.

@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

2 participants