Repository navigation
Honor JDBC getMoreResults result lifecycle - #906
Merged
staticlibs merged 2 commits intoOct 10, 2026
Merged
staticlibs merged 2 commits into
staticlibs merged 2 commits into
Conversation
Signed-off-by: hutiefang76 <137664623+hutiefang76@users.noreply.github.com>
staticlibs
requested changes
Oct 9, 2026
staticlibs
left a comment
Member
There was a problem hiding this comment.
Thanks for the PR! It looks good to me, just please change the exception creation bit.
Signed-off-by: hutiefang76 <137664623+hutiefang76@users.noreply.github.com>
staticlibs
added a commit
that referenced
this pull request
Oct 10, 2026
This is a baclport of the PR #906 to `v2.0-variegata` branch. Co-Authored-By: hutiefang76 <137664623+hutiefang76@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
getMoreResults()currently returns false while leaving the current ResultSet open and the previous update count visible. A normal JDBC result loop can therefore see a spurious update count after reaching the end of the results. Move the statement to the end-of-results state, close results according to the requested flag, and reject invalid flags.KEEP_CURRENT_RESULT leaves the returned object usable; a subsequent CLOSE_CURRENT_RESULT does not close that kept object, while CLOSE_ALL_RESULTS and statement close release it. State is detached before closing so closeOnCompletion can safely close the statement.
Regression coverage includes result sets, update counts, all three flags, rejected calls, statement reuse, kept-result cleanup and closeOnCompletion on Statement and PreparedStatement. Five regressions failed against the original source. An incremental build and the official TestPrepare (37 tests) and TestClosure (32 tests) runners passed on JDK 17. This is focused validation, not a full-suite result; the independent writable-vector validity race is addressed in #904.
AI assistance: DeepSeek assisted implementation and initial review. The full patch and actual regression output were checked before submission.