Skip to content

Conversation

ganigeorgiev
Copy link

This small PR is supposed to fix #950.

@rittneje
Copy link
Collaborator

I don't think we should return io.EOF. An empty query is likely a bug, and doing this would mask it.

@ganigeorgiev
Copy link
Author

It is an empty statement. I don't see why it would be considered bug.

I have no strong opinion on this but note that https://pkg.go.dev/modernc.org/sqlite also seems to behave this way and doesn't hang.

@ganigeorgiev
Copy link
Author

ganigeorgiev commented Oct 11, 2024

It is also similar to the behavior of the already merged #973 for Exec.

For me it doesn't make sense db.Query("") to fail and db.Exec("") not.

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 this pull request may close these issues.

Empty query causes loop
2 participants