-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
"SELECT 1;;" means (rc *SQLiteRows) Next() enters an infinite loop (SQLITE_MISUSE) #1161
Comments
Digging into this I see According to the SQLite docs, getting
Does |
Dupe of #950 |
OK, thanks. So is there a reason #950 isn't fixed? You seem to have identified the issue, but it's not clear if it's much more difficult to fix that it seems. |
I can patch my copy of my fork, but it's just rather unfortunate that a simple string can bring down such an important library as this one. |
Because I have not had the time to deal with it. Feel free to raise a PR and I'll take a look. |
OK, let me see what I can do. |
Currently is there a way to detect this? Encountered the same issue when executing malformed empty SQL |
Spotted by rqlite/rqlite#1250
Apply the diff below, execute
time go test -run TestQueryer
and it will never return. Without the diff the test it runs fine, and exits normally. From instrumenting my own code (rqlite) it seems rows.Next() never returns an error. Should the code be more robust against this, or am I doing something wrong?The text was updated successfully, but these errors were encountered: