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
For FBStatement, unprepare statement after statement completion [JDBC637] #667
Comments
Modified by: @mrotteveelFix Version: Jaybird 4.0.3 [ 10981 ] Fix Version: Jaybird 3.0.11 [ 10980 ] Fix Version: Jaybird 5 [ 10871 ] |
Commented by: @mrotteveel Note that DSQL_unprepare was introduced in Firebird 2.5, so maybe calling free(DSQL_unprepare) on 2.1 and earlier should either be a no-op or do free(DSQL_close) instead. |
Commented by: @mrotteveel There are some problems with doing this: getUpdateCounts can only be called after statement completion, and same goes for getLastExecutionPlan() and getLastExplainedExecutionPlan(). We could request those at statement completion, but if we do that, we should ask all of this in a single info request to avoid three extra roundtrips, or it might make more sense to (always) request the execution plans as part of prepare. |
Commented by: @mrotteveel Given this is more complicated than I first assumed, only implement this for Jaybird 5 (if there are no more hurdles) |
Modified by: @mrotteveelFix Version: Jaybird 4.0.3 [ 10981 ] => Fix Version: Jaybird 3.0.11 [ 10980 ] => |
Commented by: @mrotteveel I committed an unprepare method for FbStatement and implementations, but this is not called from JDBC yet. |
The complications with the lifetime requirements has made may decide not to implement this. |
Submitted by: @mrotteveel
Internally, FBStatement also prepares the statement, and keeps it prepared until the next statement is executed. It would probably be a good idea to automatically unprepare (free with DSQL_unprepare) the statement on statement completion to prevent retention of existence locks.
Commits: 517b055
The text was updated successfully, but these errors were encountered: