-
Notifications
You must be signed in to change notification settings - Fork 14
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
WIP: Hold a reference to the statement in a LOB stream #19
base: master
Are you sure you want to change the base?
Conversation
Otherwise, the statement can be freed before the LOB can be used. The strategy used is like how pdo_oci8 does it (hold ref to handle) and not like pdo_pgsql does it (hold a hashmap of handles). Related to GH-18
This is still a bit busted; the statement handle in SQL/CLI is still getting freed, though it no longer faults. |
Looks like it gets freed before it even gets a chance to call |
Sorry, I don't it gets freed; the handle number gets recycled and I think that is valid. On LUW, it returns a function sequence error. On i, that is documented, which indicates it's probably not seeking properly? Especially if |
Holiday here, but writing this down from what I remember in Slack so I don't forget:
|
Locators don't rely on the state of the cursor; they last until they are freed. Usually they are left to be implicitly freed at various execution points, eg. commit/rollback, etc. More info: https://www.ibm.com/docs/en/i/7.3?topic=objects-large-object-locators. For IBM i CLI, there's also the FYI for IBM i Host Server jobs (ODBC, JDBC, etc which doesn't apply here AFAIK) the LOB_LOCATOR_THRESHOLD QAQQINI option determines how many locators are left open before freeing. |
Otherwise, the statement can be freed before the LOB can be used. The strategy used is like how pdo_oci8 does it (hold ref to handle) and not like pdo_pgsql does it (hold a hashmap of handles).
Related to GH-18