run 'go get -u; make revendor'
Signed-off-by: Stephan Renatus <srenatus@chef.io>
This commit is contained in:
3
vendor/github.com/mattn/go-sqlite3/sqlite3_load_extension.go
generated
vendored
3
vendor/github.com/mattn/go-sqlite3/sqlite3_load_extension.go
generated
vendored
@@ -2,6 +2,7 @@
|
||||
//
|
||||
// Use of this source code is governed by an MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !sqlite_omit_load_extension
|
||||
|
||||
package sqlite3
|
||||
@@ -31,6 +32,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 +44,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 {
|
||||
|
Reference in New Issue
Block a user