Skip to content

Fix SQLite storage test for SQLite >= 3.39.0#94

Merged
Matus Tomlein (matus-tomlein) merged 1 commit intosnowplow:masterfrom
stm-ableton:sqlite-storage-test-fix
Jan 29, 2026
Merged

Fix SQLite storage test for SQLite >= 3.39.0#94
Matus Tomlein (matus-tomlein) merged 1 commit intosnowplow:masterfrom
stm-ableton:sqlite-storage-test-fix

Conversation

@stm-ableton
Copy link
Copy Markdown
Contributor

This test constructs an SqliteStorage object with a bogus database name, and expects to see a failure. The internal call to sqlite3_open succeeds with "~/" when linking against versions of SQLite from 3.39.0 onwards, however (and creates a file with the name "~" in the working directory). In these newer versions, trailing slashes are stripped from the input, likely as a byproduct of the following change (from the changelog):

The unix os interface resolves all symbolic links in database filenames
to create a canonical name for the database before the file is opened.

Using "." produces the expected failure.

This test constructs an SqliteStorage object with a bogus database
name, and expects to see a failure. The internal call to sqlite3_open
succeeds with "~/" when linking against versions of SQLite from 3.39.0
onwards (and creates a file with the name "~" in the working
directory). In these newer versions, trailing slashes are stripped from
the input, likely as a byproduct of the following change:

>The unix os interface resolves all symbolic links in database filenames
>to create a canonical name for the database before the file is opened.

See https://sqlite.org/changes.html.

Using "." produces the expected failure.
@snowplowcla Snowplow CLA bot (snowplowcla) added the cla:yes [Auto generated] Snowplow Contributor License Agreement has been signed. label Jan 27, 2026
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution!

@matus-tomlein Matus Tomlein (matus-tomlein) merged commit 6e30827 into snowplow:master Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla:yes [Auto generated] Snowplow Contributor License Agreement has been signed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants