fix: enable SQLite RTree by default - #425
Merged
Merged
Conversation
(cherry picked from commit 3655b99)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
chrispader
marked this pull request as ready for review
October 1, 2026 10:00
This was referenced Oct 1, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Databases containing R*Tree tables fail with
no such module: rtreewhen the bundled SQLite engine lacks the module. This can also block ordinary table renames when a view references an R*Tree table. This PR enablesrtreeandrtree_i32by default and addsnitroSQLite.enableRTreeso apps can omit them from a native build.The original commit from #318 retains Trần Đình Huy's authorship. The follow-up adds persisted-database migration tests for both modules, verifies the default and disabled native configurations, and documents index maintenance, coordinate precision, locking, and the system-SQLite exception. Setting
enableRTreetofalseomits the macro, because definingSQLITE_ENABLE_RTREE=0still enables the module.Reproduction
In a default native build, create this schema:
Close and reopen the database, then run:
Both renames should succeed and the view should return
id = 1. Repeat withrtree_i32. The native probes passed locally against bundled SQLite, including the opt-out build where creating an R*Tree table reportsno such module: rtree. The iOS and Android harness suites will verify the app integration in CI.Fixes #218