forked from mirror/go-sqlite3
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.
This commit is contained in:
parent
3abc337b8e
commit
db2c00ccd8
|
@ -96,7 +96,7 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
|
||||||
return nil, errors.New("sqlite succeeded without returning a database")
|
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 {
|
if rv != C.SQLITE_OK {
|
||||||
return nil, errors.New(C.GoString(C.sqlite3_errmsg(db)))
|
return nil, errors.New(C.GoString(C.sqlite3_errmsg(db)))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue