edgarrmondragon commented on PR #5029: URL: https://github.com/apache/arrow-adbc/pull/5029#issuecomment-6958759410
> but shouldn't we reset when we get SQLITE_DONE at the end of a query IIUC, resetting on `SQLITE_DONE` shouldn't surface anything new, since "`SQLITE_DONE` means that the statement has finished executing successfully"[^1]. However, that does mean based on > For example, if an [INSERT](https://www.sqlite.org/lang_insert.html) statement with a [RETURNING](https://www.sqlite.org/lang_returning.html) clause is only stepped one time, that one call to [sqlite3_step(S)](https://www.sqlite.org/c3ref/step.html) might return SQLITE_ROW but the overall statement might still fail and the [sqlite3_reset(S)](https://www.sqlite.org/c3ref/reset.html) 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)](https://www.sqlite.org/c3ref/reset.html) even if no prior call to [sqlite3_step(S)](https://www.sqlite.org/c3ref/step.html) indicated a problem. that we should not discard the return code from the new `sqlite3_reset` call. Let me come up with a Python MRE for that. [^1]: https://www.sqlite.org/c3ref/step.html#:~:text=SQLITE_DONE%20means%20that%20the%20statement%20has%20finished%20executing%20successfully -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
