bugfix: rowcount doesn't work with select statements#2631
Merged
ulope merged 1 commit intoraiden-network:masterfrom Sep 28, 2018
Merged
bugfix: rowcount doesn't work with select statements#2631ulope merged 1 commit intoraiden-network:masterfrom
ulope merged 1 commit intoraiden-network:masterfrom
Conversation
From the python3's sqlite3 docs: > As required by the Python DB API Spec, the rowcount attribute “is -1 in > case no executeXX() has been performed on the cursor or the rowcount of > the last operation is not determinable by the interface”. This includes > SELECT statements because we cannot determine the number of rows a query > produced until all rows were fetched. rowcount always returned -1, and the code to load the latest snapshot assumed there was never a snapshot available, as a consequence all the state changes where replaied on restarts
Collaborator
|
Nice catch, that should probably make #2632 less of an issue. |
Contributor
|
Very nice catch. This explains a lot. But still from the way it's phrased it does not make sense why it would return The |
hackaugusto
pushed a commit
to hackaugusto/raiden
that referenced
this pull request
Oct 5, 2018
[skip ci]
hackaugusto
pushed a commit
to hackaugusto/raiden
that referenced
this pull request
Oct 5, 2018
[skip ci]
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.
From the python3's sqlite3 docs:
rowcount always returned -1, and the code to load the latest snapshot
assumed there was never a snapshot available, as a consequence all the
state changes where replaied on restarts