Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check sqlite3_reset usages #1418

Closed
4 tasks
gwenn opened this issue Nov 24, 2023 · 1 comment · Fixed by #1419
Closed
4 tasks

Check sqlite3_reset usages #1418

gwenn opened this issue Nov 24, 2023 · 1 comment · Fixed by #1419

Comments

@gwenn
Copy link
Collaborator

gwenn commented Nov 24, 2023

https://www.sqlite.org/c3ref/reset.html

The sqlite3_reset(S) interface might also return an error code if there were no prior errors but the process of resetting the prepared statement caused a new error. For example, if an INSERT statement with a RETURNING clause is only stepped one time, that one call to sqlite3_step(S) might return SQLITE_ROW but the overall statement might still fail and the sqlite3_reset(S) call might return SQLITE_BUSY if locking constraints prevent the database change from committing. Therefore, it is important that applications check the return code from sqlite3_reset(S) even if no prior call to sqlite3_step(S) indicated a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant