Skip to content

Conversation

JoshuaWise
Copy link
Member

This is an automated pull request, updating SQLite to version 3.50.2.

@JoshuaWise JoshuaWise requested a review from a team as a code owner June 28, 2025 16:02
@mceachen
Copy link
Member

From copilot:

This pull request updates the SQLite dependency in the WiseLibs/better-sqlite3 project from version 3.49.2 to 3.50.2. The changes are entirely in the vendored SQLite source files: sqlite3.c, sqlite3.h, and sqlite3ext.h. Here’s a summary and review of the changes:


Highlights of the Update

1. SQLite Version Bump

  • SQLITE_VERSION is updated from "3.49.2" to "3.50.2".
  • SQLITE_VERSION_NUMBER and SQLITE_SOURCE_ID updated accordingly.

2. New Features & API Additions

  • Blocking WAL Connects:

    • Added SQLITE_FCNTL_BLOCK_ON_CONNECT (value 44) for VFS-level control.
    • Added API: int sqlite3_setlk_timeout(sqlite3*, int ms, int flags);
      • Allows configuration of blocking timeouts for WAL mode connections.
      • Introduces the flag SQLITE_SETLK_BLOCK_ON_CONNECT to enable blocking on connect.
    • These are only effective in builds with SQLITE_ENABLE_SETLK_TIMEOUT and supporting VFS.
  • Extension API:

    • sqlite3ext.h and the API routines struct now include the new setlk_timeout function pointer and macro.

3. Documentation Improvements & Clarifications

  • Improved and clarified documentation for:
    • Lookaside memory configuration: Expanded details and corrected several doc errors.
    • Function parameter descriptions: More precise wording (e.g., changing "where" to "were", "has" to "as", etc.).
    • Various other doc fixes: Typos, grammar, and consistency across the header.

4. Removed/Deprecated API

  • Removed:
    • sqlite3changeset_upgrade() is removed from the public header, indicating deprecation or internalization.

5. Other Minor Fixes

  • Corrections to typos and ambiguities throughout the C API docs.
  • Minor clarifications about internal behavior, state transitions, and function usage.

Potential Impact for better-sqlite3 Users

  • New API Support:
    • If you build with the new SQLite and opt into SQLITE_ENABLE_SETLK_TIMEOUT, you can leverage the new lock timeout and blocking features for WAL databases.
  • No Breaking Changes:
    • The changes are backwards-compatible unless you rely on the removed sqlite3changeset_upgrade() API, which is unlikely for most consumers.
  • Improved Reliability:
    • The doc improvements make it easier for developers to understand correct usage and error conditions.

Summary

This is a routine dependency update to the latest SQLite, plus all upstream documentation improvements and new features. The main technical addition is support for blocking WAL connect timeouts, which is only relevant if enabled at compile time and used explicitly. No core API changes should break existing usage.

If you depend on the latest SQLite features or want improved documentation and minor bug fixes, this upgrade is beneficial and safe.


Recommendation:
LGTM. Safe to merge, with minimal risk and useful upstream improvements. If you use custom extensions, double-check if you depend on sqlite3changeset_upgrade(). If not, no issues are expected.

@mceachen mceachen merged commit 8df03a2 into master Jun 28, 2025
22 checks passed
@mceachen mceachen deleted the sqlite-update-3500200 branch June 28, 2025 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants