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?
$ git diff
diff --git a/sqlite3_test.go b/sqlite3_test.go
index 326361e..df317f2 100644
--- a/sqlite3_test.go
+++ b/sqlite3_test.go
@@ -1114,9 +1114,7 @@ func TestQueryer(t *testing.T) {
if err != nil {
t.Error("Failed to call db.Exec:", err)
}
- rows, err := db.Query(`
- select id from foo order by id;
- `)
+ rows, err := db.Query(`SELECT 1;;`)
if err != nil {
t.Error("Failed to call db.Query:", err)
}