Fix build
This commit is contained in:
parent
fcd455919e
commit
c1abf95b38
|
@ -292,10 +292,11 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
|
||||||
|
|
||||||
// _busy_timeout
|
// _busy_timeout
|
||||||
if val := params.Get("_busy_timeout"); val != "" {
|
if val := params.Get("_busy_timeout"); val != "" {
|
||||||
busy_timeout = int(strconv.ParseInt(val, 10, 64))
|
iv, err := strconv.ParseInt(val, 10, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("Invalid _busy_timeout: %v: %v", val, err)
|
return nil, fmt.Errorf("Invalid _busy_timeout: %v: %v", val, err)
|
||||||
}
|
}
|
||||||
|
busy_timeout = int(iv)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !strings.HasPrefix(dsn, "file:") {
|
if !strings.HasPrefix(dsn, "file:") {
|
||||||
|
|
|
@ -640,7 +640,7 @@ func TestTimezoneConversion(t *testing.T) {
|
||||||
zones := []string{"UTC", "US/Central", "US/Pacific", "Local"}
|
zones := []string{"UTC", "US/Central", "US/Pacific", "Local"}
|
||||||
for _, tz := range zones {
|
for _, tz := range zones {
|
||||||
tempFilename := TempFilename()
|
tempFilename := TempFilename()
|
||||||
db, err := sql.Open("sqlite3", tempFilename+"?loc="+url.QueryEscape(tz))
|
db, err := sql.Open("sqlite3", tempFilename+"?_loc="+url.QueryEscape(tz))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal("Failed to open database:", err)
|
t.Fatal("Failed to open database:", err)
|
||||||
}
|
}
|
||||||
|
@ -845,7 +845,7 @@ func TestStress(t *testing.T) {
|
||||||
func TestDateTimeLocal(t *testing.T) {
|
func TestDateTimeLocal(t *testing.T) {
|
||||||
zone := "Asia/Tokyo"
|
zone := "Asia/Tokyo"
|
||||||
tempFilename := TempFilename()
|
tempFilename := TempFilename()
|
||||||
db, err := sql.Open("sqlite3", tempFilename+"?loc="+zone)
|
db, err := sql.Open("sqlite3", tempFilename+"?_loc="+zone)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal("Failed to open database:", err)
|
t.Fatal("Failed to open database:", err)
|
||||||
}
|
}
|
||||||
|
@ -888,7 +888,7 @@ func TestDateTimeLocal(t *testing.T) {
|
||||||
db.Exec("INSERT INTO foo VALUES(?);", dt)
|
db.Exec("INSERT INTO foo VALUES(?);", dt)
|
||||||
|
|
||||||
db.Close()
|
db.Close()
|
||||||
db, err = sql.Open("sqlite3", tempFilename+"?loc="+zone)
|
db, err = sql.Open("sqlite3", tempFilename+"?_loc="+zone)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal("Failed to open database:", err)
|
t.Fatal("Failed to open database:", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue