Skip to content

fix(flightsql): isolate example SQLite databases - #1067

Open
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/flightsql-createdb-isolation
Open

fix(flightsql): isolate example SQLite databases#1067
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/flightsql-createdb-isolation

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #916

Problem

CreateDB always opened the same named in-memory SQLite database with cache=shared. Independent server instances created in the same process therefore shared tables and data unexpectedly.

Change

Generate a unique database name for each CreateDB call while retaining cache=shared. Connections obtained from the same sql.DB still share one in-memory database, but separate CreateDB calls are isolated.

Coverage

The regression test verifies both sides of the contract:

  • two CreateDB calls cannot see each other’s tables
  • two connections from one sql.DB see the same data

Validation

go test ./arrow/flight/flightsql/example

@fallintoplace
fallintoplace requested a review from zeroshade as a code owner July 30, 2026 19:50
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.

flightsql/example: isolate CreateDB shared in-memory SQLite databases

1 participant