sqlite: copy changeset before applying it - #65286
Open
mcollina wants to merge 1 commit into
Open
Conversation
SQLite can invoke JavaScript conflict and filter callbacks while applying a changeset. Copy the input first so detaching or modifying its backing buffer during a callback does not affect the active operation. Signed-off-by: Matteo Collina <hello@matteocollina.com>
Collaborator
|
Review requested:
|
mcollina
requested review from
Renegade334 and
trivikr
and removed request for
trivikr
August 14, 2026 14:41
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #65286 +/- ##
==========================================
+ Coverage 90.30% 90.31% +0.01%
==========================================
Files 759 751 -8
Lines 247597 250012 +2415
Branches 46679 47234 +555
==========================================
+ Hits 223591 225805 +2214
- Misses 15469 15571 +102
- Partials 8537 8636 +99
🚀 New features to boost your workflow:
|
geeksilva97
reviewed
Aug 14, 2026
| } | ||
|
|
||
| std::unique_ptr<BackingStore> changeset; | ||
| if (buf.length() > 0) { |
Contributor
There was a problem hiding this comment.
SQLite can invoke JavaScript conflict and filter callbacks while applying a changeset
We could check for the presence of filter and onConflict functions as well. If none is set, we don't need to copy.
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.
SQLite can invoke JavaScript conflict and filter callbacks while applying a changeset. Copy the input first so detaching or modifying its backing buffer during a callback does not affect the active operation.