Skip to content

JDBC driver production readiness #54

Closed

Description

@magnusp

Goal

Track the work needed before this driver can serve production JDBC workloads. The goal is a driver whose data conversions, metadata, transaction behavior, and conformance evidence are trustworthy enough to replace sqlite-jdbc in an application without silent behavior changes. Each item below is independent.

Value conversion

  • #31 Numeric getters do not follow SQLite text and blob coercion
  • #32 getBoolean uses custom truthiness instead of numeric conversion
  • #33 REAL values stringify with Double.toString instead of SQLite canonical text
  • #34 getObject(Class) ignores storage type for numeric targets

ResultSetMetaData

  • #35 getColumnType ignores runtime storage class
  • #36 getColumnClassName is wrong for empty and mixed-type result sets
  • #37 Table metadata fails for aliases, joins, subqueries, RETURNING, and views
  • #38 isAutoIncrement false-positives on identifiers containing AUTOINCREMENT
  • #46 Scalar metadata flags and type-name parsing diverge

Statement and transactions

  • #29 PreparedStatement executes SQL before validating result kind
  • #30 rollback() swallows failures and reports success
  • #39 getGeneratedKeys is unimplemented
  • #40 Transaction begin mode and commit/rollback lifecycle differ from sqlite-jdbc
  • #45 ResultSet navigation differs on duplicate labels and cursor state
  • #47 Statement lifecycle and getMoreResults argument handling differ
  • #48 TypeMap, fetch size, and holdability are silently accepted no-ops
  • #49 Concurrent close and execute can orphan a result set

DatabaseMetaData

  • #41 DatabaseMetaData.getTables ignores the types filter and returns non-table rows
  • #42 DatabaseMetaData.getColumns reports wrong types and sizes
  • #50 getTableTypes is incomplete and several metadata methods leak statements

Conformance setup

  • #43 Conformance file URLs do not persist across close and reopen
  • #44 Conformance suite does not verify it is connected to libSQL
  • #51 Conformance tests include weak assertions and an undocumented selection
  • #52 Namespace cleanup ignores failures and can leak or reuse state

Vendoring and CI

  • #53 Vendoring checksums and manifest are not enforced

Definition of done

Sequencing

Advisory schedule for parallel execution. Each subissue carries a Steering section with its lane, dependencies, corrections, and evidence rules. The dependency graph is authoritative; the waves below follow from it.

Rules for every lane

  • Contract. Match xerial 3.53.4.0 at the pinned tag, vendored under upstream-xerial_sqlite-jdbc/. The goal is a drop-in replacement, so parity is the default answer to every "which contract wins" question in these issues. Deviations only where the Hrana transport or sqld makes parity impossible, recorded with their reason in the PR body.
  • File boundaries. One agent per lane at a time. Lanes own disjoint files. Cross-lane edits are limited to additive, read-only accessors (the one known case is noted in getObject(Class) ignores storage type for numeric targets #34 and getColumnType ignores runtime storage class #35).
  • Evidence. Every fix lands with tests that fail on the current code and pass after it. Behavior tests, not implementation tests.
  • Priority. P0 first, then P1, then P2. All P0 and P1 items land by wave 4.
  • PR shape. One PR per issue, except getTableTypes is incomplete and several metadata methods leak statements #50, which delivers four sequenced PRs.

Lanes by file ownership

Waves

Corrections folded into steering

The #28 review corrections are carried in the steering sections of #32 (misstated libSQL probe results), #40 (scope limited to begin timing, mode, and re-begin; reproduction step 1 fixed), #45 (getRow behavior corrected; remaining xerial claims need re-probing), and #50 (four bundled defects delivered as four PRs).

Status after the #163 selection

All sub-issues are closed. The vendored selection now covers 13 xerial test classes plus Utils, and the control profile passes at the pinned tag with the same selection. The libSQL conformance lane runs 268 cases; the xerial control lane runs 245.

DBMetaDataTest, StatementTest, and PrepStmtTest are selected. Their driver gaps closed in #156, #158, and #157; each conformance copy records the cases Hrana or sqld cannot supply:

  • DBMetaDataTest: CREATE TEMP TABLE is skipped on libSQL because sqld rejects it with SQL_PARSE_ERROR.
  • StatementTest: multi-statement strings, TEMP tables, and DROP while a materialized result set is open are skipped or asserted per driver; the DATE-millis round trip is compared as a date-only value.
  • PrepStmtTest: the no-describe cases (parameter types, pre-execution metadata, pre-execution SQL validation) assert the libSQL contract or skip; the reused result set is reassigned per java.sql; DATE-millis is compared as a date-only value.

TypeMapTest stays upstream. #95 rejects type maps with SQLFeatureNotSupportedException because java.sql makes them optional, and the control run cannot assert the rejection and xerial's accepted map at once.

Activity

  1. added
    enhancementNew feature or request
    P1High priority: significant correctness or compatibility gap
    on Oct 21, 2026
  2. 3 remaining items

  3. magnusp commented on Oct 23, 2026

    @magnusp
    OwnerAuthor

    Closing the readiness tracker. The 35 review issues in the queue are merged. The three follow-up P1s surfaced by the conformance re-triage (#156, #157, #158) are fixed, and the three previously rejected suites are selected in #164. Final ./mvnw clean verify on main is green with 268 conformance tests and 7 skips, the itests module green, and the xerial control profile green at 245 tests with 2 skips. The only remaining follow-up is #155, a P2 tokenizer consolidation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High priority: significant correctness or compatibility gapenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions