bump to modernc.org/sqlite v1.29.7 (#2850)

This commit is contained in:
kim 2024-04-17 17:10:51 +01:00 committed by GitHub
commit b3f2d44143
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
120 changed files with 631479 additions and 58069 deletions

View file

@ -23,6 +23,7 @@ Josh Bleecher Snyder <josharian@gmail.com>
Josh Klein <josh.klein@outlook.com>
Kim <grufwub@gmail.com>
Logan Snow <logansnow@protonmail.com>
Mario Salgado <mariozalgo@gmail.com>
Mark Summerfield <mark@qtrac.eu>
Matthew Gabeler-Lee <fastcat@gmail.com>
Michael Hoffmann <mhoffm@posteo.de>

6
vendor/modernc.org/sqlite/Makefile generated vendored
View file

@ -29,6 +29,8 @@ build_all_targets:
GOOS=linux GOARCH=arm go build -v ./...
GOOS=linux GOARCH=arm64 go test -c -o /dev/null
GOOS=linux GOARCH=arm64 go build -v ./...
GOOS=linux GOARCH=loong64 go test -c -o /dev/null
GOOS=linux GOARCH=loong64 go build -v ./...
GOOS=linux GOARCH=ppc64le go test -c -o /dev/null
GOOS=linux GOARCH=ppc64le go build -v ./...
GOOS=linux GOARCH=riscv64 go test -c -o /dev/null
@ -55,7 +57,7 @@ clean:
edit:
@touch log
@if [ -f "Session.vim" ]; then novim -S & else novim -p Makefile go.mod builder.json all_test.go generator.go & fi
@if [ -f "Session.vim" ]; then novim -S & else novim -p Makefile go.mod builder.json all_test.go vendor_libsqlite3.go & fi
editor:
gofmt -l -s -w . 2>&1 | tee log-editor
@ -64,7 +66,7 @@ editor:
go build -o /dev/null vendor_libsqlite3.go
test:
go test -v -timeout 24h 2>&1 | tee log-test
go test -v -timeout 24h . ./functest 2>&1 | tee log-test
vendor:
go run vendor_libsqlite3.go && make build_all_targets

40
vendor/modernc.org/sqlite/bind_blob.go generated vendored Normal file
View file

@ -0,0 +1,40 @@
// Copyright 2024 The Sqlite Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !(linux && (amd64 || loong64))
package sqlite // import "modernc.org/sqlite"
import (
"unsafe"
"modernc.org/libc"
sqlite3 "modernc.org/sqlite/lib"
)
// C documentation
//
// int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
func (c *conn) bindBlob(pstmt uintptr, idx1 int, value []byte) (uintptr, error) {
if value != nil && len(value) == 0 {
if rc := sqlite3.Xsqlite3_bind_zeroblob(c.tls, pstmt, int32(idx1), 0); rc != sqlite3.SQLITE_OK {
return 0, c.errstr(rc)
}
return 0, nil
}
p, err := c.malloc(len(value))
if err != nil {
return 0, err
}
if len(value) != 0 {
copy((*libc.RawMem)(unsafe.Pointer(p))[:len(value):len(value)], value)
}
if rc := sqlite3.Xsqlite3_bind_blob(c.tls, pstmt, int32(idx1), p, int32(len(value)), 0); rc != sqlite3.SQLITE_OK {
c.free(p)
return 0, c.errstr(rc)
}
return p, nil
}

40
vendor/modernc.org/sqlite/bind_blob_musl.go generated vendored Normal file
View file

@ -0,0 +1,40 @@
// Copyright 2024 The Sqlite Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build linux && (amd64 || loong64)
package sqlite // import "modernc.org/sqlite"
import (
"unsafe"
"modernc.org/libc"
sqlite3 "modernc.org/sqlite/lib"
)
// C documentation
//
// int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
func (c *conn) bindBlob(pstmt uintptr, idx1 int, value []byte) (uintptr, error) {
if value == nil {
if rc := sqlite3.Xsqlite3_bind_null(c.tls, pstmt, int32(idx1)); rc != sqlite3.SQLITE_OK {
return 0, c.errstr(rc)
}
return 0, nil
}
p, err := c.malloc(len(value))
if err != nil {
return 0, err
}
if len(value) != 0 {
copy((*libc.RawMem)(unsafe.Pointer(p))[:len(value):len(value)], value)
}
if rc := sqlite3.Xsqlite3_bind_blob(c.tls, pstmt, int32(idx1), p, int32(len(value)), 0); rc != sqlite3.SQLITE_OK {
c.free(p)
return 0, c.errstr(rc)
}
return p, nil
}

View file

@ -1,6 +1,6 @@
{
"autogen": "<none>",
"autotag": "darwin/(amd64|arm64)|freebsd/(amd64|arm64)|linux/(386|amd64|arm|arm64|ppc64le|riscv64|s390x)|windows/(amd64|arm64)",
"autotag": "darwin/(amd64|arm64)|freebsd/(amd64|arm64)|linux/(386|amd64|arm|arm64|loong64|ppc64le|riscv64|s390x)|windows/(amd64|arm64)",
"autoupdate": "<none>",
"test": "darwin/(amd64|arm64)|freebsd/(amd64|arm64)|linux/(386|amd64|arm|arm64|loon64|ppc64le|riscv64|s390x)|windows/(amd64|arm64)"
"test": "darwin/(amd64|arm64)|freebsd/(amd64|arm64)|linux/(386|amd64|arm|arm64|loong64|ppc64le|riscv64|s390x)|windows/(amd64|arm64)"
}

27
vendor/modernc.org/sqlite/doc.go generated vendored
View file

@ -19,19 +19,20 @@
//
// OS Arch SQLite version
// ------------------------------
// darwin amd64 3.45.1
// darwin arm64 3.45.1
// freebsd amd64 3.45.1
// freebsd arm64 3.45.1
// linux 386 3.45.1
// linux amd64 3.45.1
// linux arm 3.45.1
// linux arm64 3.45.1
// linux ppc64le 3.45.1
// linux riscv64 3.45.1
// linux s390x 3.45.1
// windows amd64 3.45.1
// windows arm64 3.45.1
// darwin amd64 3.45.2
// darwin arm64 3.45.2
// freebsd amd64 3.45.2
// freebsd arm64 3.45.2
// linux 386 3.45.2
// linux amd64 3.45.2
// linux arm 3.45.2
// linux arm64 3.45.2
// linux loong64 3.45.2
// linux ppc64le 3.45.2
// linux riscv64 3.45.2
// linux s390x 3.45.2
// windows amd64 3.45.2
// windows arm64 3.45.2
//
// # Builders
//

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

223815
vendor/modernc.org/sqlite/lib/sqlite_linux_loong64.go generated vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

41
vendor/modernc.org/sqlite/sqlite.go generated vendored
View file

@ -1138,32 +1138,6 @@ func (c *conn) bindText(pstmt uintptr, idx1 int, value string) (uintptr, error)
return p, nil
}
// C documentation
//
// int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
func (c *conn) bindBlob(pstmt uintptr, idx1 int, value []byte) (uintptr, error) {
if value != nil && len(value) == 0 {
if rc := sqlite3.Xsqlite3_bind_zeroblob(c.tls, pstmt, int32(idx1), 0); rc != sqlite3.SQLITE_OK {
return 0, c.errstr(rc)
}
return 0, nil
}
p, err := c.malloc(len(value))
if err != nil {
return 0, err
}
if len(value) != 0 {
copy((*libc.RawMem)(unsafe.Pointer(p))[:len(value):len(value)], value)
}
if rc := sqlite3.Xsqlite3_bind_blob(c.tls, pstmt, int32(idx1), p, int32(len(value)), 0); rc != sqlite3.SQLITE_OK {
c.free(p)
return 0, c.errstr(rc)
}
return p, nil
}
// C documentation
//
// int sqlite3_bind_int(sqlite3_stmt*, int, int);
@ -1830,6 +1804,21 @@ type ExecQuerierContext interface {
driver.QueryerContext
}
// Commit releases all resources associated with the Backup object but does not
// close the destination database connection.
//
// The destination database connection is returned to the caller or an error if raised.
// It is the responsibility of the caller to handle the connection closure.
func (b *Backup) Commit() (driver.Conn, error) {
rc := sqlite3.Xsqlite3_backup_finish(b.srcConn.tls, b.pBackup)
if rc == sqlite3.SQLITE_OK {
return b.dstConn, nil
} else {
return nil, b.srcConn.errstr(rc)
}
}
// ConnectionHookFn function type for a connection hook on the Driver. Connection
// hooks are called after the connection has been set up.
type ConnectionHookFn func(

View file

@ -35,6 +35,7 @@ func main() {
{"linux", "amd64"},
{"linux", "arm"},
{"linux", "arm64"},
{"linux", "loong64"},
{"linux", "ppc64le"},
{"linux", "riscv64"},
{"linux", "s390x"},