From db2c00ccd82fdbe1424e55b19aa43f3cf13aa5cb Mon Sep 17 00:00:00 2001 From: John Gallagher Date: Sat, 7 Apr 2012 00:24:39 -0400 Subject: [PATCH] Increase busy timeout to 5 seconds. 500ms is short enough that go-sql-test sometimes fails with "database locked", and it's the value used by Python's sqlite3 driver. --- sqlite3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlite3.go b/sqlite3.go index 26cd3d1..bff9aec 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -96,7 +96,7 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) { return nil, errors.New("sqlite succeeded without returning a database") } - rv = C.sqlite3_busy_timeout(db, 500) + rv = C.sqlite3_busy_timeout(db, 5000) if rv != C.SQLITE_OK { return nil, errors.New(C.GoString(C.sqlite3_errmsg(db))) }