Title: sqlite: statement iterator state is corrupted by coincident statement execution · Issue #61819 · nodejs/node · GitHub
Open Graph Title: sqlite: statement iterator state is corrupted by coincident statement execution · Issue #61819 · nodejs/node
X Title: sqlite: statement iterator state is corrupted by coincident statement execution · Issue #61819 · nodejs/node
Description: Statement iterators that have not finished iterating are not invalidated when the statement is reset. const { DatabaseSync } = require('node:sqlite'); const db = new DatabaseSync(':memory:') db.exec('CREATE TABLE test (value INTEGER NOT ...
Open Graph Description: Statement iterators that have not finished iterating are not invalidated when the statement is reset. const { DatabaseSync } = require('node:sqlite'); const db = new DatabaseSync(':memory:') db.exe...
X Description: Statement iterators that have not finished iterating are not invalidated when the statement is reset. const { DatabaseSync } = require('node:sqlite'); const db = new DatabaseSync(':memo...
Opengraph URL: https://github.com/nodejs/node/issues/61819
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"sqlite: statement iterator state is corrupted by coincident statement execution","articleBody":"Statement iterators that have not finished iterating are not invalidated when the statement is reset.\n\n```js\nconst { DatabaseSync } = require('node:sqlite');\nconst db = new DatabaseSync(':memory:')\ndb.exec('CREATE TABLE test (value INTEGER NOT NULL)');\nfor (let i = 0; i \u003c 10; i++) {\n db.prepare('INSERT INTO test (value) VALUES (?)').run(i);\n}\n\nconst stmt = db.prepare('SELECT * FROM test');\n\nconst it = stmt.iterate();\nit.next().value; // { value: 0 }\nit.next().value; // { value: 1 }\nit.next().value; // { value: 2 }\n\n// resets, executes and re-resets statement\nstmt.get(); // { value: 0 }\n\n// sqlite3_step restarts from beginning of result\nit.next().value; // { value: 0 }\nit.next().value; // { value: 1 }\nit.next().value; // { value: 2 }\n\n// these will race\nconst it2 = stmt.iterate();\nit.next().value; // { value: 0 }\nit2.next().value; // { value: 1 }\nit.next().value; // { value: 2 }\nit2.next().value; // { value: 3 }\n```\n\nIf the statement iterator is not done and the statement is reset, then the iterator should be invalidated and subsequent calls to `.next()` should throw.","author":{"url":"https://github.com/Renegade334","@type":"Person","name":"Renegade334"},"datePublished":"2026-02-14T17:09:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/61819/node/issues/61819"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a2737eb6-310d-285b-cec1-aedad8aa3728 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BAB8:6B261:480596:6400C6:6A4C8120 |
| html-safe-nonce | 4e672d918c81f9f75a1ded9bde7a358ea69647630112f4b73061fd3f5f1b30fd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQUI4OjZCMjYxOjQ4MDU5Njo2NDAwQzY6NkE0QzgxMjAiLCJ2aXNpdG9yX2lkIjoiNzQ4OTY3MjQ0NjI0MjIyNjQ2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1ef5883813546bd84d7b205b83ffa41577b4ed23aa93f531d7b6143f49598f43 |
| hovercard-subject-tag | issue:3941864853 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/61819/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1873e0e529c0628cddb7318f0db5e6110b4f731a0a306ba8cf906bbddaf1c913/nodejs/node/issues/61819 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1873e0e529c0628cddb7318f0db5e6110b4f731a0a306ba8cf906bbddaf1c913/nodejs/node/issues/61819 |
| og:image:alt | Statement iterators that have not finished iterating are not invalidated when the statement is reset. const { DatabaseSync } = require('node:sqlite'); const db = new DatabaseSync(':memory:') db.exe... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Renegade334 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cd470457e909b9d062f8002cf438ba870e6acff6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width