-
Notifications
You must be signed in to change notification settings - Fork 26
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
Server resources not released on PreparedStatement destruction [PYFB34] #54
Comments
Modified by: @pcisarstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 1.2 [ 10530 ] |
Commented by: @pcisar Fix was not correct. There are problems with PerapedStatement __del__ method that reports bad statement handle for some tests in fbtest. |
Commented by: @pcisar Reopenned to change fix for version. |
Commented by: @pcisar Fix version changed. |
Modified by: @pcisarstatus: Reopened [ 4 ] => Closed [ 6 ] resolution: Fixed [ 1 ] Fix Version: 1.1.1 [ 10540 ] Fix Version: 1.2 [ 10530 ] => |
Submitted by: @pcisar
Releasing the Cursor instance does not permanently free the prepared statement on the server side. During the destructor of the Cursor instance the internal managed PreparedStatement instances will also be released. This will call the method _close from PreparedStatement. Inside the _close Method the release of the server side statement resource will only be triggered if there is an open connection. But to get this connection the PreparedStatement instance uses the cursor Attribute which is a weak reference to the Cursor instance. But this Cursor instance is no longer available because the program execution is inside the destructor (__del__) of this cursor. The weak reference is dead.
It seems that Cursor and PreparedStatement instances are released on the client side but the following statement from the _close method of
PreparedStatement doesn't get executed.
api.isc_dsql_free_statement(self._isc_status, stmt_handle,
ibase.DSQL_drop)
Commits: b59ab8f bee6db8 43545f1 FirebirdSQL/fbt-repository@16788b7 FirebirdSQL/fbt-repository@2dc5a90 FirebirdSQL/fbt-repository@1061333
The text was updated successfully, but these errors were encountered: