diff options
author | guillep2k <18600385+guillep2k@users.noreply.github.com> | 2020-02-26 20:51:37 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-27 07:51:37 +0800 |
commit | 4a2d23981d39be8559757b54f0201adcba5496c3 (patch) | |
tree | df7a3847585ed389c7965c0f8752bb79f42bc457 /integrations/migration-test | |
parent | 7ffc2427daad725e448abfa1828b10acdba1a02c (diff) | |
download | gitea-4a2d23981d39be8559757b54f0201adcba5496c3.tar.gz gitea-4a2d23981d39be8559757b54f0201adcba5496c3.zip |
Fix SQLite concurrency problems by using BEGIN IMMEDIATE (#10368)
* Test locking immediate for SQLite3
* fix url field separator
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'integrations/migration-test')
-rw-r--r-- | integrations/migration-test/migration_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/integrations/migration-test/migration_test.go b/integrations/migration-test/migration_test.go index 6cdfbf7d7d..a4d01efef3 100644 --- a/integrations/migration-test/migration_test.go +++ b/integrations/migration-test/migration_test.go @@ -126,7 +126,7 @@ func restoreOldDB(t *testing.T, version string) bool { err := os.MkdirAll(path.Dir(setting.Database.Path), os.ModePerm) assert.NoError(t, err) - db, err := sql.Open("sqlite3", fmt.Sprintf("file:%s?cache=shared&mode=rwc&_busy_timeout=%d", setting.Database.Path, setting.Database.Timeout)) + db, err := sql.Open("sqlite3", fmt.Sprintf("file:%s?cache=shared&mode=rwc&_busy_timeout=%d&_txlock=immediate", setting.Database.Path, setting.Database.Timeout)) assert.NoError(t, err) defer db.Close() |