Skip to content

A failed product version lookup is cached for the whole connection #112

Closed

Description

@magnusp

LibsqlDatabaseMetaData.resolveDatabaseProductVersion catches SQLException and stores "3.0" in cachedDatabaseProductVersion. #94 caches the metadata instance per connection. One network error now pins getDatabaseProductVersion() to "3.0" for the life of the connection. getDatabaseMajorVersion() and getDatabaseMinorVersion() return 3 and 0.

On a closed connection the method also returns "3.0", while getTables and getColumns throw. The cache field is not synchronized.

This is separate from the statement leak in #92.

Expected:

  • Do not cache the fallback value. Let the exception propagate, or retry on the next call.
  • Throw on a closed connection.
  • Add a test with a failing version query followed by a successful one.

Activity

  1. added
    bugSomething isn't working
    P2Normal priority: edge case, feature gap, or test/process improvement
    on Oct 22, 2026
  2. added a commit that references this issue on Oct 22, 2026
    0e83a57
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

    P2Normal priority: edge case, feature gap, or test/process improvementbugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions