forked from forgejo/forgejo
vendor: update sqlite to fix "database is locked" errors (#2116)
closes #2040
upstream commit: acfa601240
This commit is contained in:
parent
a52cd59727
commit
2ef33b5338
18 changed files with 10627 additions and 5910 deletions
2
vendor/github.com/mattn/go-sqlite3/sqlite3_load_extension.go
generated
vendored
2
vendor/github.com/mattn/go-sqlite3/sqlite3_load_extension.go
generated
vendored
|
@ -31,6 +31,7 @@ func (c *SQLiteConn) loadExtensions(extensions []string) error {
|
|||
defer C.free(unsafe.Pointer(cext))
|
||||
rv = C.sqlite3_load_extension(c.db, cext, nil, nil)
|
||||
if rv != C.SQLITE_OK {
|
||||
C.sqlite3_enable_load_extension(c.db, 0)
|
||||
return errors.New(C.GoString(C.sqlite3_errmsg(c.db)))
|
||||
}
|
||||
}
|
||||
|
@ -42,6 +43,7 @@ func (c *SQLiteConn) loadExtensions(extensions []string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// LoadExtension load the sqlite3 extension.
|
||||
func (c *SQLiteConn) LoadExtension(lib string, entry string) error {
|
||||
rv := C.sqlite3_enable_load_extension(c.db, 1)
|
||||
if rv != C.SQLITE_OK {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue