Commit d7210fc8 authored by cznic's avatar cznic
Browse files

CHANGELOG.md: correct the !134 DSN shorthand-key entry

The v1.55.0 entry said the new mattn-compatible keys were "parsed but had
no effect in prior releases". They were not parsed at all; applyQueryParams
never looked at them. It also described an unrecognized value as failing
"instead of being silently ignored", a contrast against an unreleased
iteration of !134 rather than against v1.54.0, which would read to a user
upgrading as though their DSN had previously been tolerated and ignored.

Restate both breaks against the last released version: keys that were
ignored now take effect (with the consequence spelled out rather than just
the key named), and a value outside the accepted set now fails the
connection where the same DSN previously opened successfully - e.g. a
duration-style _busy_timeout=5s, which is not the integer that key
requires. The latter was missing entirely and is the sharper of the two.

Co-Authored-By: default avatarClaude Opus 4.8 <noreply@anthropic.com>
parent b31f5212
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# Changelog

 - 2026-07-20 v1.55.0:
     - Add `github.com/mattn/go-sqlite3`-compatible shorthand DSN query parameters to ease migration from that driver: `_busy_timeout`/`_timeout`, `_foreign_keys`/`_fk`, `_journal_mode`/`_journal`, `_synchronous`/`_sync`, `_auto_vacuum`/`_vacuum`, and `_query_only`, each setting the correspondingly named PRAGMA. Values are validated against the same set `mattn/go-sqlite3` accepts (case-insensitive); an unrecognized value now fails the connection with an error instead of being silently ignored, so a typo such as `_synchronous=fu1l` or `_foreign_keys=yes_please` is reported rather than silently downgrading durability or dropping foreign-key enforcement. The keys are applied in a fixed order independent of their order in the DSN — `_busy_timeout` and `_auto_vacuum` before any `_pragma` values (`auto_vacuum` must be set before the database is first written), the rest after, and `_query_only` last — and where a key and its alias are both supplied the alias wins, matching `mattn/go-sqlite3`. Behavior change to note: these keys were parsed but had no effect in prior releases, so a DSN carried over from a `mattn/go-sqlite3` setup that includes e.g. `_foreign_keys=on`, `_journal_mode=wal`, or `_query_only=1` now takes effect where it previously did nothing; review such DSNs before upgrading. `_pragma` and all other existing parameters are unchanged.
     - Add `github.com/mattn/go-sqlite3`-compatible shorthand DSN query parameters to ease migration from that driver: `_busy_timeout`/`_timeout`, `_foreign_keys`/`_fk`, `_journal_mode`/`_journal`, `_synchronous`/`_sync`, `_auto_vacuum`/`_vacuum`, and `_query_only`, each setting the correspondingly named PRAGMA. Values are validated against the same set `mattn/go-sqlite3` accepts (case-insensitive) and an unrecognized value fails the connection with an error, so a typo such as `_synchronous=fu1l` or `_foreign_keys=yes_please` is reported rather than silently downgrading durability or dropping foreign-key enforcement. The keys are applied in a fixed order independent of their order in the DSN — `_busy_timeout` and `_auto_vacuum` before any `_pragma` values (`auto_vacuum` must be set before the database is first written), the rest after, and `_query_only` last — and where a key and its alias are both supplied the alias wins, matching `mattn/go-sqlite3`. Behavior change to note: prior releases ignored these keys entirely, so a DSN carried over from a `mattn/go-sqlite3` setup changes in two ways. A recognized key that previously did nothing now takes effect — `_foreign_keys=on` begins enforcing constraints against data that may already violate them, `_journal_mode=wal` persistently converts the database file, and `_query_only=1` makes the connection read-only. And a value outside the accepted set now fails the connection with an error where the same DSN previously opened successfully — for example a duration-style `_busy_timeout=5s` or `_timeout=5000ms`, neither of which is the integer that key requires. Review such DSNs before upgrading. `_pragma` and all other existing parameters are unchanged.
     - See [GitLab merge request #134](https://gitlab.com/cznic/sqlite/-/merge_requests/134), thanks Toni Spets (@beeper-hifi) and Ian Chechin!

 - 2026-07-15 v1.54.0: