Skip to content

chore: vendor latest bedrock (52082d4b80) - #61

Merged
darkgnotic merged 1 commit into
mainfrom
darkgnotic/wal2-fix
Nov 18, 2026
Merged

darkgnotic merged 1 commit into
mainfrom
darkgnotic/wal2-fix

Conversation

@darkgnotic

Copy link
Copy Markdown
Contributor

Summary

Update the vendored SQLite from bedrock 2137918d6a (2026-08-10) to
52082d4b80 (2026-11-09). SQLITE_VERSION goes from 3.54.0 to 3.55.0.

The reason is the upstream fix for a wal2 bug: when a COMMIT switches
wal files, walRestartLog() releases its exclusive locks and then takes
a shared lock on the new file. A checkpointer that locks the file in that
gap makes the shared lock fail, and COMMIT returns a spurious
SQLITE_BUSY that busy_timeout doesn't cover. Upstream fixed it in
wal2 check-in 4bc8fdd581, which was merged into bedrock as
52082d4b80. Forum report:
https://sqlite.org/forum/forumpost/63ba0208a6

This lets zero-cache drop its COMMIT retry workaround
(rocicorp/mono-internal#372).

What else comes with it

Bedrock has had no check-ins since the merge. The seven trunk merges
between the old pin and this one bring in:

  • SQLite 3.54.0 and 3.54.1 (planner improvements, about 4% fewer CPU
    cycles on SQLite's benchmark).
  • Most fixes queued for 3.54.2, including:
    • two writer races that could return spurious SQLITE_READONLY_RECOVERY
      or SQLITE_READONLY_CANTINIT
    • the -shm content copied during recovery is now always initialised
    • a b-tree cursor's cached cell info is cleared when the cell is deleted
    • ALTER TABLE DROP COLUMN could leave a stale index
    • wrong results from the OR optimisation on the left side of a LEFT
      JOIN, vector NOT IN with a DESC index, and compound SELECTs with
      COLLATE
    • FTS5 and recover hardening

Not included (not yet merged into bedrock): a Nov 3 ORDER BY/collation
fix and a Nov 12 incremental-blob fix (zero-sqlite3 doesn't expose
incremental blobs).

Move the bundled SQLite from bedrock 2137918d6a (2026-08-10) to
52082d4b80 (2026-11-09, reports 3.55.0).

This picks up the wal2 fix for the writer/checkpointer race
(4bc8fdd581): when a COMMIT switches wal files, a checkpointer taking
a lock in the gap could make the writer return a spurious
SQLITE_BUSY. See https://sqlite.org/forum/forumpost/63ba0208a6

Also included:
- SQLite 3.54.0 and 3.54.1
- most fixes queued for 3.54.2, including two WAL/shm recovery race
  fixes, a b-tree cursor cell-cache fix, ALTER TABLE DROP COLUMN
  leaving a stale index, and several wrong-result query fixes

Only CHECKIN in deps/download.sh and the regenerated deps/sqlite3/*
change.
@darkgnotic
darkgnotic requested a review from tantaman November 18, 2026 07:00
@darkgnotic
darkgnotic enabled auto-merge November 18, 2026 07:01
@darkgnotic
darkgnotic added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 9ff7961 Nov 18, 2026
14 of 15 checks passed
@darkgnotic
darkgnotic deleted the darkgnotic/wal2-fix branch November 18, 2026 07:03
@darkgnotic darkgnotic mentioned this pull request Nov 18, 2026
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.

1 participant