[
https://issues.apache.org/jira/browse/DERBY-3457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kristian Waagan resolved DERBY-3457.
------------------------------------
Resolution: Fixed
Derby Info: (was: [Patch Available])
I committed patch 'derby-3457-1c-stmt_closing.diff' to trunk with revision
632112.
Regarding the issues mentioned in my previous comment, I need to look more into
it. For now I do know that LogicalConnection re-prepares open statements when a
new logical connection is obtained. This breaks the statement cache, as there
might be statements that are no longer valid there.
A typical example of an invalid statement, is one that is referring to a table
that has been deleted. With the current strategy (and statement pooling
enabled), the user won't get the exception before calling ps.execute(), where
as he/she would get it on Connection.prepare() earlier. If there is no matching
statement in the cache, the behavior will be unchanged.
Regardless of the issues above, logical statements must still be marked as
closed when the logical connection is closed.
Further issues will be handled as bugs under separate JIRAs, and tests will be
committed as part of DERBY-3329.
> Closing a logical connection must close all associated logical statements
> -------------------------------------------------------------------------
>
> Key: DERBY-3457
> URL: https://issues.apache.org/jira/browse/DERBY-3457
> Project: Derby
> Issue Type: Task
> Components: JDBC, Network Client
> Affects Versions: 10.4.0.0
> Environment: Client-server with statement pooling enabled in the
> client driver.
> Reporter: Kristian Waagan
> Assignee: Kristian Waagan
> Fix For: 10.4.0.0
>
> Attachments: derby-3457-1a-stmt_closing.diff,
> derby-3457-1a-stmt_closing.stat, derby-3457-1b-stmt_closing.diff,
> derby-3457-1c-stmt_closing.diff, derby-3457-2a-stmt_registration.diff
>
>
> When a logical connection is closed, all open logical statements created by
> this connection must be closed.
> The closing is important per the general principle of cleaning up resources,
> but especially so in the case of statement pooling, as not closing the
> logical statement can cause side effects on another logical connection
> (sharing the same physical connection).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.