You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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: