sqlite: fix stale column count in StatementSync.all()#64219
Open
araujogui wants to merge 2 commits into
Open
Conversation
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
Collaborator
|
Review requested:
|
geeksilva97
reviewed
Jun 30, 2026
geeksilva97
approved these changes
Jun 30, 2026
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
Member
Author
|
@geeksilva97 are we good to land this? |
Contributor
|
yes |
Collaborator
Commit Queue failed- Loading data for nodejs/node/pull/64219 ✔ Done loading data for nodejs/node/pull/64219 ----------------------------------- PR info ------------------------------------ Title sqlite: fix stale column count in StatementSync.all() (#64219) Author Guilherme Araújo <arauujogui@gmail.com> (@araujogui) Branch araujogui:sqlite-all-reprepare-num-cols -> nodejs:main Labels c++, author ready, commit-queue-squash, sqlite Commits 2 - sqlite: read column count after step in StatementSync.all() - sqlite: add schema-change regression tests Committers 1 - Guilherme Araújo <arauujogui@gmail.com> PR-URL: https://github.com/nodejs/node/pull/64219 Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/64219 Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com> -------------------------------------------------------------------------------- ℹ This PR was created on Tue, 30 Jun 2026 18:02:50 GMT ✔ Approvals: 1 ✔ - Edy Silva (@geeksilva97): https://github.com/nodejs/node/pull/64219#pullrequestreview-4603550693 ✘ This PR needs to wait 22 more hours to land (or 0 minutes if there is one more approval) ✔ Last GitHub CI successful ℹ Last Full PR CI on 2026-07-01T11:39:39Z: https://ci.nodejs.org/job/node-test-pull-request/74486/ - Querying data for job/node-test-pull-request/74486/ ✔ Build data downloaded ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/28821161836 |
jasnell
approved these changes
Jul 7, 2026
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.
If the schema changes after a statement is prepared, SQLite re-prepares it on the next
sqlite3_step()call.StatementSync.prototype.all()reads the column count (sqlite3_column_count()) before that step, so on the first call after a schema change the count is stale.StatementSync.prototype.get()is unaffected because it reads the count after stepping.