Skip to content

fix(jdbc): mark prepared executeQuery result set as requested - #139

Merged
magnusp merged 1 commit into
mainfrom
fix/i107-prepared-resultset-flag
Oct 22, 2026
Merged

magnusp merged 1 commit into
mainfrom
fix/i107-prepared-resultset-flag

Conversation

@magnusp

@magnusp magnusp commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Fixes #107

LibsqlPreparedStatement.executeQuery() now passes true for the result-set-requested flag, matching the LibsqlStatement.executeQuery() contract from #85. ps.executeQuery(); ps.getResultSet() now throws ResultSet already requested, as sqlite-jdbc does.

Three-layer contract. Protocol-neutral: JDBC owns the result-set-requested lifecycle, and Hrana 3 supplies no field for it.

Files. LibsqlPreparedStatement.java and LibsqlStatementLifecycleTest.java.

Red. At trunk 91ad4c3 with the new case applied: Tests run: 9, Failures: 1 and the prepared case fails on getResultSet() returning the open result set instead of throwing (/tmp/xerial-parity-i107/lane-1-trunk-red.log).

Green. At head 7125986: Tests run: 9, Failures: 0 (/tmp/xerial-parity-i107/lane-1-unit-green.log).

Lanes at head 7125986.

  • Lane 1 regression, trunk red and head green: pass.
  • Lane 2 full lifecycle class: pass.
  • Lane 3 ResultSetWithoutResultsTest: 1 test, pass.
  • Lane 4 module suite: 246 tests, BUILD SUCCESS.
  • Lane 5 conformance: 123 tests, 0 failures, 1 skipped, BUILD SUCCESS with no new divergence line.
  • Lane 6 xerial control: 100 tests, 0 failures, 1 skipped, BUILD SUCCESS. No recorded difference; this change has no xerial-side divergence.
  • Lane 7 spotless:check: pass.
  • Lane 8 full reactor: BUILD SUCCESS.
  • Lane 9 plain-statement lifecycle cases: 7 tests, pass.
  • Lane 10 package: driver jar builds.

Perf. Wall clock of ./mvnw -pl libsql-jdbc test, three interleaved runs each. Trunk median 2.10 s, head median 2.08 s, within the 10 percent rule. The first run of each side is cold-cache at 3.11 s and 3.37 s and was excluded by the median.

Divergences. None.

Base. 91ad4c3. Head. 7125986.

Logs are under /tmp/xerial-parity-i107/.

@magnusp
magnusp merged commit c2038d1 into main Oct 22, 2026
6 checks passed
@magnusp
magnusp deleted the fix/i107-prepared-resultset-flag branch October 22, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PreparedStatement.executeQuery does not mark the result set as requested

1 participant