update modernc/sqlite to v1.33.1 (with our concurrency workaround) (#3367)

This commit is contained in:
kim 2024-09-27 22:53:36 +00:00 committed by GitHub
commit 3f9a1dbfff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
70 changed files with 622427 additions and 148036 deletions

1
vendor/modernc.org/sqlite/AUTHORS generated vendored
View file

@ -26,4 +26,5 @@ Morgan Bazalgette <morgan@howl.moe>
Ross Light <ross@zombiezen.com>
Saed SayedAhmed <saadmtsa@gmail.com>
Steffen Butzer <steffen(dot)butzer@outlook.com>
Toni Spets <toni.spets@beeper.com>
W. Michael Petullo <mike@flyn.org>

View file

@ -34,5 +34,6 @@ Ross Light <ross@zombiezen.com>
Saed SayedAhmed <saadmtsa@gmail.com>
Sean McGivern <sean@mcgivern.me.uk>
Steffen Butzer <steffen(dot)butzer@outlook.com>
Toni Spets <toni.spets@beeper.com>
W. Michael Petullo <mike@flyn.org>
Yaacov Akiba Slama <ya@slamail.org>

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

@ -43,8 +43,8 @@ build_all_targets:
GOOS=openbsd GOARCH=amd64 go build -v ./...
GOOS=openbsd GOARCH=arm64 go test -c -o /dev/null
GOOS=openbsd GOARCH=arm64 go build -v ./...
# GOOS=windows GOARCH=386 go test -c -o /dev/null
# GOOS=windows GOARCH=386 go build -v ./...
GOOS=windows GOARCH=386 go test -c -o /dev/null
GOOS=windows GOARCH=386 go build -v ./...
GOOS=windows GOARCH=amd64 go test -c -o /dev/null
GOOS=windows GOARCH=amd64 go build -v ./...
GOOS=windows GOARCH=arm64 go test -c -o /dev/null
@ -66,7 +66,7 @@ editor:
go build -o /dev/null vendor_libsqlite3.go
test:
go test -v -timeout 24h . ./functest 2>&1 | tee log-test
go test -v -timeout 24h 2>&1 | tee log-test
vendor:
go run vendor_libsqlite3.go && make build_all_targets

View file

@ -2,7 +2,7 @@
// 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))
//go:build !(linux && (amd64 || arm64 || loong64))
package sqlite // import "modernc.org/sqlite"

View file

@ -2,7 +2,7 @@
// 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)
//go:build linux && (amd64 || arm64 || loong64)
package sqlite // import "modernc.org/sqlite"

View file

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

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

@ -19,20 +19,21 @@
//
// OS Arch SQLite version
// ------------------------------
// darwin amd64 3.45.3
// darwin arm64 3.45.3
// freebsd amd64 3.45.3
// freebsd arm64 3.45.3
// linux 386 3.45.3
// linux amd64 3.45.3
// linux arm 3.45.3
// linux arm64 3.45.3
// linux loong64 3.45.3
// linux ppc64le 3.45.3
// linux riscv64 3.45.3
// linux s390x 3.45.3
// windows amd64 3.45.3
// windows arm64 3.45.3
// darwin amd64 3.46.0
// darwin arm64 3.46.0
// freebsd amd64 3.46.0
// freebsd arm64 3.46.0
// linux 386 3.46.0
// linux amd64 3.46.0
// linux arm 3.46.0
// linux arm64 3.46.0
// linux loong64 3.46.0
// linux ppc64le 3.46.0
// linux riscv64 3.46.0
// linux s390x 3.46.0
// windows 386 3.46.0
// windows amd64 3.46.0
// windows arm64 3.46.0
//
// # Builders
//
@ -50,6 +51,14 @@
//
// # Changelog
//
// 2024-07-22: v1.31.0
//
// Support windows/386.
//
// 2024-06-04: v1.30.0
//
// Upgrade to SQLite 3.46.0, release notes at https://sqlite.org/releaselog/3_46_0.html.
//
// 2024-02-13: v1.29.0
//
// Upgrade to SQLite 3.45.1, release notes at https://sqlite.org/releaselog/3_45_1.html.

47
vendor/modernc.org/sqlite/fcntl.go generated vendored Normal file
View file

@ -0,0 +1,47 @@
// 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.
package sqlite // import "modernc.org/sqlite"
import (
"runtime"
"unsafe"
"modernc.org/libc"
sqlite3 "modernc.org/sqlite/lib"
)
// Access to sqlite3_file_control
type FileControl interface {
// Set or query SQLITE_FCNTL_PERSIST_WAL, returns set mode or query result
FileControlPersistWAL(dbName string, mode int) (int, error)
}
var _ FileControl = (*conn)(nil)
func (c *conn) FileControlPersistWAL(dbName string, mode int) (int, error) {
i32 := int32(mode)
pi32 := &i32
var p runtime.Pinner
p.Pin(pi32)
defer p.Unpin()
err := c.fileControl(dbName, sqlite3.SQLITE_FCNTL_PERSIST_WAL, (uintptr)(unsafe.Pointer(pi32)))
return int(i32), err
}
func (c *conn) fileControl(dbName string, op int, pArg uintptr) error {
zDbName, err := libc.CString(dbName)
if err != nil {
return err
}
defer c.free(zDbName)
if rc := sqlite3.Xsqlite3_file_control(c.tls, c.db, zDbName, int32(op), pArg); rc != sqlite3.SQLITE_OK {
return c.errstr(rc)
}
return nil
}

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

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

301020
vendor/modernc.org/sqlite/lib/sqlite_windows_386.go generated vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -39,14 +39,15 @@ func main() {
{"linux", "ppc64le"},
{"linux", "riscv64"},
{"linux", "s390x"},
{"windows", "386"},
{"windows", "amd64"},
} {
fmt.Printf("%s/%s\n", v.goos, v.goarch)
base := fmt.Sprintf("ccgo_%s_%s.go", v.goos, v.goarch)
if v.goos == "windows" {
if v.goos == "windows" && v.goarch == "amd64" {
base = "ccgo_windows.go"
}
ifn := filepath.Join("..", "libsqlite3", base)
fmt.Printf("%s/%s\t%s\n", v.goos, v.goarch, ifn)
in, err := os.ReadFile(ifn)
if err != nil {
fail(1, "%s\n", err)