Stored Procedure Fix, Attempt to reclose a closed cursor.

Forum related to Firebird

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
andrevanzuydam
Zeos Dev Team
Zeos Dev Team
Posts: 32
Joined: 22.10.2005, 08:53
Location: Bloemfontein
Contact:

Stored Procedure Fix, Attempt to reclose a closed cursor.

Post by andrevanzuydam »

Problem: Firebird 2.5 RC2 & 3 close the cursor on Stored Proc execution and insert / update returning statements

I have the following suggestions to fix this for firebird 2.5, but this may require some type of if statement on the FreeStatement:

Possible Solution and Seems to Work in my test environment:

For ExecProc and ExeclSQL statements add

FreeStatement (GetPlainDriver, STmntHandle, DSQL_UNPREPARE);

This needs a new constant added in FirebirdConstants

DSQL_UNPREPARE = 4

The side effects of this are apparent when the same exec procedure is called again, extra params are added to the statement -> Possible cause is in

TZabstratRODataset.SetPrepared ()

InternalPrepare is called only once then for the stored proc with current code and never reinitialised.

OR

Find out why when calling stored proc second time extra params are added ?

Some comments on this are welcome, where should I put my test code ?
Image
Nothing is impossible!
andrevanzuydam
Zeos Dev Team
Zeos Dev Team
Posts: 32
Joined: 22.10.2005, 08:53
Location: Bloemfontein
Contact:

Post by andrevanzuydam »

I have solved the problem of the returning values and now will start testing for backward compatibility.
Image
Nothing is impossible!
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

andrevanzuydam,

Did you finish the backward compatibility tests? What's the patch I should apply? (Unified diff file available?)

Mark
Image
andrevanzuydam
Zeos Dev Team
Zeos Dev Team
Posts: 32
Joined: 22.10.2005, 08:53
Location: Bloemfontein
Contact:

Post by andrevanzuydam »

Hi Mark

The changes for the Firebird 2.5 release will cause us to make a new driver library for selection in the database options as there are new constants and the API calls have changed in how they work.

I am testing the code for production purposes on Firebird on a comercial system specifically for Firebird 2.5 release. Id be happy to backward test, on my old applications I am having no negative problems, going back to 1.5.

I would like a way to submit code via SVN or the like so that I can submit my changes as I fix things, my main focus will be on the Firebird engine.

Please can you add me to the project

Thanks
Image
Nothing is impossible!
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Hi Andre,

I can't give you access to the SVN directory myself. I need to ask the provider that hosts the repository by mail. I did already send the mail. Let's hope it doesn't land in their spam filter. Because they didn't hear from me since a long time.

I've only 2 important 'conditions' for new committers. I hope they are reasonable:
- Only commit to testing branch without prior discussion
- Please run the test suite for the database(s) you're working with prior to committing. And compare the results to the run before you applied changes.

Mark
Image
andrevanzuydam
Zeos Dev Team
Zeos Dev Team
Posts: 32
Joined: 22.10.2005, 08:53
Location: Bloemfontein
Contact:

Post by andrevanzuydam »

Please find the patches on the test branch
Image
Nothing is impossible!
Post Reply