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 all statements are reset at Pool.Close #52

Open
crawshaw opened this issue Feb 8, 2019 · 1 comment
Open

Check all statements are reset at Pool.Close #52

crawshaw opened this issue Feb 8, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@crawshaw
Copy link
Owner

crawshaw commented Feb 8, 2019

We already check Conn.CheckReset in Pool.Put. All we have to do is make sure all connections are returned to the pool before Close is called.

@FiloSottile
Copy link
Contributor

I'm not sure CheckReset is checking the right thing. lastHasRow is false if the last step returned SQLITE_DONE, but I can't find anywhere in the docs a guarantee that it's the same as being reset.

For example, I wonder if the implicit transaction is committed:

An implicit transaction (a transaction that is started automatically, not a transaction started by BEGIN) is committed automatically when the last active statement finishes. A statement finishes when its prepared statement is reset or finalized.

Pool.Put should probably call Reset automatically if lastHasRow is false, though.

@AdamSLevy AdamSLevy added the enhancement New feature or request label Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants