bradfitz/go-sql-test — Issue #1: Test fails with SQLite
Author: gwenn
Created: 2012-03-02 15:16:18+00:00
State: open

With "github.com/mattn/go-sqlite3" driver:
--- FAIL: TestPreparedStmt_SQLite (0.01 seconds)
sql_test.go:306: Insert: database is locked

With "github.com/gwenn/gosqlite" driver (and sqlite3_log activated):
LOG: Library used incorrectly, Dangling statement
...
--- FAIL: TestPreparedStmt_SQLite (0.01 seconds)
sql_test.go:306: Insert: The database file is locked: database is locked

I am using the weekly.2012-02-22 branch and SQLite 3.7.10.

The 'sel' Stmt locks the 'ins' Stmt because the 'sel' Stmt is "busy" (not reset).

A solution may be to Reset the 'sel' Stmt when 'QueryRow' is called/finished but currently there is no such method in the Stmt interface.

Regards.