mirror of
https://codeberg.org/superseriousbusiness/gotosocial.git
synced 2024-12-19 23:52:04 +03:00
[chore] bumps modernc/sqlite version to v1.34.2 on our custom fork (#3599)
This commit is contained in:
parent
55d6731497
commit
79f2e85f51
23 changed files with 172 additions and 288 deletions
2
go.mod
2
go.mod
|
@ -6,7 +6,7 @@ go 1.23
|
|||
replace github.com/go-swagger/go-swagger => github.com/superseriousbusiness/go-swagger v0.31.0-gts-go1.23-fix
|
||||
|
||||
// Replace modernc/sqlite with our version that fixes the concurrency INTERRUPT issue
|
||||
replace modernc.org/sqlite => gitlab.com/NyaaaWhatsUpDoc/sqlite v1.33.1-concurrency-workaround
|
||||
replace modernc.org/sqlite => gitlab.com/NyaaaWhatsUpDoc/sqlite v1.34.2-concurrency-workaround
|
||||
|
||||
// Below pin otel libraries to v1.29.0 until we can figure out issues
|
||||
replace go.opentelemetry.io/otel => go.opentelemetry.io/otel v1.29.0
|
||||
|
|
4
go.sum
generated
4
go.sum
generated
|
@ -630,8 +630,8 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
|
|||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yuin/goldmark v1.7.8 h1:iERMLn0/QJeHFhxSt3p6PeN9mGnvIKSpG9YYorDMnic=
|
||||
github.com/yuin/goldmark v1.7.8/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
|
||||
gitlab.com/NyaaaWhatsUpDoc/sqlite v1.33.1-concurrency-workaround h1:pFMJnlc1PuH+jcVz4vz53vcpnoZG+NqFBr3qikDmEB4=
|
||||
gitlab.com/NyaaaWhatsUpDoc/sqlite v1.33.1-concurrency-workaround/go.mod h1:pXV2xHxhzXZsgT/RtTFAPY6JJDEvOTcTdwADQCCWD4k=
|
||||
gitlab.com/NyaaaWhatsUpDoc/sqlite v1.34.2-concurrency-workaround h1:Z/9vgdPNZm8ZDANnIJ7ZGeYKJ5biqPY1OQbN+DLCtec=
|
||||
gitlab.com/NyaaaWhatsUpDoc/sqlite v1.34.2-concurrency-workaround/go.mod h1:dnR723UrTtjKpoHCAMN0Q/gZ9MT4r+iRvIBb9umWFkU=
|
||||
go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80=
|
||||
go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
|
|
1
vendor/modernc.org/sqlite/CONTRIBUTORS
generated
vendored
1
vendor/modernc.org/sqlite/CONTRIBUTORS
generated
vendored
|
@ -37,3 +37,4 @@ 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>
|
||||
Prathyush PV <prathyush.pv@temporal.io>
|
||||
|
|
2
vendor/modernc.org/sqlite/Makefile
generated
vendored
2
vendor/modernc.org/sqlite/Makefile
generated
vendored
|
@ -57,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 vendor_libsqlite3.go & fi
|
||||
@if [ -f "Session.vim" ]; then gvim -S & else gvim -p Makefile go.mod builder.json all_test.go vendor_libsqlite3.go & fi
|
||||
|
||||
editor:
|
||||
gofmt -l -s -w . 2>&1 | tee log-editor
|
||||
|
|
84
vendor/modernc.org/sqlite/README.md
generated
vendored
84
vendor/modernc.org/sqlite/README.md
generated
vendored
|
@ -1,81 +1,7 @@
|
|||
# sqlite
|
||||
![logo](logo.png)
|
||||
|
||||
Package sqlite is a cgo-free port of SQLite. Although you could see mattn's driver (`github.com/mattn/go-sqlite3`) in go.mod file, we import it for tests only.
|
||||
[![Go Reference](https://pkg.go.dev/badge/modernc.org/sqlite.svg)](https://pkg.go.dev/modernc.org/sqlite)
|
||||
|
||||
SQLite is an in-process implementation of a self-contained, serverless,
|
||||
zero-configuration, transactional SQL database engine.
|
||||
|
||||
## Thanks
|
||||
|
||||
This project is sponsored by Schleibinger Geräte Teubert u. Greim GmbH by
|
||||
allowing one of the maintainers to work on it also in office hours.
|
||||
|
||||
## Installation
|
||||
|
||||
$ go get modernc.org/sqlite
|
||||
|
||||
## Documentation
|
||||
|
||||
[pkg.go.dev/modernc.org/sqlite](https://pkg.go.dev/modernc.org/sqlite)
|
||||
|
||||
## Builders
|
||||
|
||||
[modern-c.appspot.com/-/builder/?importpath=modernc.org%2fsqlite](https://modern-c.appspot.com/-/builder/?importpath=modernc.org%2fsqlite)
|
||||
|
||||
## Speedtest1
|
||||
|
||||
Numbers for the pure Go version were produced by
|
||||
|
||||
~/src/modernc.org/sqlite/speedtest1$ go build && ./speedtest1
|
||||
|
||||
Numbers for the pure C version were produced by
|
||||
|
||||
~/src/modernc.org/sqlite/testdata/sqlite-src-3410200/test$ gcc speedtest1.c ../../sqlite-amalgamation-3410200/sqlite3.c -lpthread -ldl && ./a.out
|
||||
|
||||
The results are from Go version 1.20.4 and GCC version 10.2.1 on a
|
||||
Linux/amd64 machine, CPU: AMD Ryzen 9 3900X 12-Core Processor × 24, 128GB
|
||||
RAM. Shown are the best of 3 runs.
|
||||
|
||||
Go C
|
||||
|
||||
-- Speedtest1 for SQLite 3.41.2 2023-03-22 11:56:21 0d1fc92f94cb6b76bffe3ec34d69 -- Speedtest1 for SQLite 3.41.2 2023-03-22 11:56:21 0d1fc92f94cb6b76bffe3ec34d69
|
||||
100 - 50000 INSERTs into table with no index...................... 0.071s 100 - 50000 INSERTs into table with no index...................... 0.077s
|
||||
110 - 50000 ordered INSERTS with one index/PK..................... 0.114s 110 - 50000 ordered INSERTS with one index/PK..................... 0.082s
|
||||
120 - 50000 unordered INSERTS with one index/PK................... 0.137s 120 - 50000 unordered INSERTS with one index/PK................... 0.099s
|
||||
130 - 25 SELECTS, numeric BETWEEN, unindexed...................... 0.083s 130 - 25 SELECTS, numeric BETWEEN, unindexed...................... 0.091s
|
||||
140 - 10 SELECTS, LIKE, unindexed................................. 0.210s 140 - 10 SELECTS, LIKE, unindexed................................. 0.120s
|
||||
142 - 10 SELECTS w/ORDER BY, unindexed............................ 0.276s 142 - 10 SELECTS w/ORDER BY, unindexed............................ 0.182s
|
||||
145 - 10 SELECTS w/ORDER BY and LIMIT, unindexed.................. 0.183s 145 - 10 SELECTS w/ORDER BY and LIMIT, unindexed.................. 0.099s
|
||||
150 - CREATE INDEX five times..................................... 0.172s 150 - CREATE INDEX five times..................................... 0.127s
|
||||
160 - 10000 SELECTS, numeric BETWEEN, indexed..................... 0.080s 160 - 10000 SELECTS, numeric BETWEEN, indexed..................... 0.078s
|
||||
161 - 10000 SELECTS, numeric BETWEEN, PK.......................... 0.080s 161 - 10000 SELECTS, numeric BETWEEN, PK.......................... 0.078s
|
||||
170 - 10000 SELECTS, text BETWEEN, indexed........................ 0.187s 170 - 10000 SELECTS, text BETWEEN, indexed........................ 0.169s
|
||||
180 - 50000 INSERTS with three indexes............................ 0.196s 180 - 50000 INSERTS with three indexes............................ 0.154s
|
||||
190 - DELETE and REFILL one table................................. 0.200s 190 - DELETE and REFILL one table................................. 0.155s
|
||||
200 - VACUUM...................................................... 0.180s 200 - VACUUM...................................................... 0.142s
|
||||
210 - ALTER TABLE ADD COLUMN, and query........................... 0.004s 210 - ALTER TABLE ADD COLUMN, and query........................... 0.005s
|
||||
230 - 10000 UPDATES, numeric BETWEEN, indexed..................... 0.093s 230 - 10000 UPDATES, numeric BETWEEN, indexed..................... 0.080s
|
||||
240 - 50000 UPDATES of individual rows............................ 0.153s 240 - 50000 UPDATES of individual rows............................ 0.137s
|
||||
250 - One big UPDATE of the whole 50000-row table................. 0.024s 250 - One big UPDATE of the whole 50000-row table................. 0.019s
|
||||
260 - Query added column after filling............................ 0.004s 260 - Query added column after filling............................ 0.005s
|
||||
270 - 10000 DELETEs, numeric BETWEEN, indexed..................... 0.278s 270 - 10000 DELETEs, numeric BETWEEN, indexed..................... 0.263s
|
||||
280 - 50000 DELETEs of individual rows............................ 0.188s 280 - 50000 DELETEs of individual rows............................ 0.180s
|
||||
290 - Refill two 50000-row tables using REPLACE................... 0.411s 290 - Refill two 50000-row tables using REPLACE................... 0.359s
|
||||
300 - Refill a 50000-row table using (b&1)==(a&1)................. 0.175s 300 - Refill a 50000-row table using (b&1)==(a&1)................. 0.151s
|
||||
310 - 10000 four-ways joins....................................... 0.427s 310 - 10000 four-ways joins....................................... 0.365s
|
||||
320 - subquery in result set...................................... 0.440s 320 - subquery in result set...................................... 0.521s
|
||||
400 - 70000 REPLACE ops on an IPK................................. 0.125s 400 - 70000 REPLACE ops on an IPK................................. 0.106s
|
||||
410 - 70000 SELECTS on an IPK..................................... 0.081s 410 - 70000 SELECTS on an IPK..................................... 0.078s
|
||||
500 - 70000 REPLACE on TEXT PK.................................... 0.174s 500 - 70000 REPLACE on TEXT PK.................................... 0.116s
|
||||
510 - 70000 SELECTS on a TEXT PK.................................. 0.153s 510 - 70000 SELECTS on a TEXT PK.................................. 0.117s
|
||||
520 - 70000 SELECT DISTINCT....................................... 0.083s 520 - 70000 SELECT DISTINCT....................................... 0.067s
|
||||
980 - PRAGMA integrity_check...................................... 0.436s 980 - PRAGMA integrity_check...................................... 0.377s
|
||||
990 - ANALYZE..................................................... 0.107s 990 - ANALYZE..................................................... 0.038s
|
||||
TOTAL....................................................... 5.525s TOTAL....................................................... 4.637s
|
||||
|
||||
This particular test executes 16.1% faster in the C version.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
* Q: **How can I write to a database concurrently without getting the `database is locked` error (or `SQLITE_BUSY`)?**
|
||||
* A: You can't. The C sqlite implementation does not allow concurrent writes, and this libary does not modify that behaviour. You can, however, use [DB.SetMaxOpenConns(1)](https://pkg.go.dev/database/sql#DB.SetMaxOpenConns) so that only 1 connection is ever used by the `DB`, allowing concurrent access to DB without making the writes concurrent. More information on issues [#65](https://gitlab.com/cznic/sqlite/-/issues/65) and [#106](https://gitlab.com/cznic/sqlite/-/issues/106).
|
||||
[![LiberaPay](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/jnml/donate)
|
||||
[![receives](https://img.shields.io/liberapay/receives/jnml.svg?logo=liberapay)](https://liberapay.com/jnml/donate)
|
||||
[![patrons](https://img.shields.io/liberapay/patrons/jnml.svg?logo=liberapay)](https://liberapay.com/jnml/donate)
|
||||
|
|
197
vendor/modernc.org/sqlite/doc.go
generated
vendored
197
vendor/modernc.org/sqlite/doc.go
generated
vendored
|
@ -8,6 +8,14 @@
|
|||
// SQLite is an in-process implementation of a self-contained, serverless,
|
||||
// zero-configuration, transactional SQL database engine.
|
||||
//
|
||||
// # Fragile modernc.org/libc dependency
|
||||
//
|
||||
// When you import this package you should use in your go.mod file the exact
|
||||
// same version of modernc.org/libc as seen in the go.mod file of this
|
||||
// repository.
|
||||
//
|
||||
// See the discussion at https://gitlab.com/cznic/sqlite/-/issues/177 for more details.
|
||||
//
|
||||
// # Thanks
|
||||
//
|
||||
// This project is sponsored by Schleibinger Geräte Teubert u. Greim GmbH by
|
||||
|
@ -41,175 +49,98 @@
|
|||
//
|
||||
// https://modern-c.appspot.com/-/builder/?importpath=modernc.org%2fsqlite
|
||||
//
|
||||
// # Fragile modernc.org/libc dependency
|
||||
//
|
||||
// When you import this package you should use in your go.mod file the exact
|
||||
// same version of modernc.org/libc as seen in the go.mod file of this
|
||||
// repository.
|
||||
//
|
||||
// See the discussion at https://gitlab.com/cznic/sqlite/-/issues/177 for more details.
|
||||
//
|
||||
// # Changelog
|
||||
//
|
||||
// 2024-07-22: v1.31.0
|
||||
// - 2024-11-16 v1.34.0: Implement ResetSession and IsValid methods in connection
|
||||
//
|
||||
// Support windows/386.
|
||||
// - 2024-07-22 v1.31.0: Support windows/386.
|
||||
//
|
||||
// 2024-06-04: v1.30.0
|
||||
// - 2024-06-04 v1.30.0: Upgrade to SQLite 3.46.0, release notes at
|
||||
// https://sqlite.org/releaselog/3_46_0.html.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// 2024-02-13: v1.29.0
|
||||
// - 2023-12-14: v1.28.0: Add (*Driver).RegisterConnectionHook,
|
||||
// ConnectionHookFn, ExecQuerierContext, RegisterConnectionHook.
|
||||
//
|
||||
// Upgrade to SQLite 3.45.1, release notes at https://sqlite.org/releaselog/3_45_1.html.
|
||||
// - 2023-08-03 v1.25.0: enable SQLITE_ENABLE_DBSTAT_VTAB.
|
||||
//
|
||||
// 2023-12-14 v1.28.0:
|
||||
// - 2023-07-11 v1.24.0: Add
|
||||
// (*conn).{Serialize,Deserialize,NewBackup,NewRestore} methods, add Backup
|
||||
// type.
|
||||
//
|
||||
// (*Driver).RegisterConnectionHook: added
|
||||
// ConnectionHookFn: added
|
||||
// ExecQuerierContext: added
|
||||
// RegisterConnectionHook: added
|
||||
// - 2023-06-01 v1.23.0: Allow registering aggregate functions.
|
||||
//
|
||||
// 2023-08-03 v1.25.0: enable SQLITE_ENABLE_DBSTAT_VTAB.
|
||||
// - 2023-04-22 v1.22.0: Support linux/s390x.
|
||||
//
|
||||
// 2023-07-11 v1.24.0:
|
||||
// - 2023-02-23 v1.21.0: Upgrade to SQLite 3.41.0, release notes at
|
||||
// https://sqlite.org/releaselog/3_41_0.html.
|
||||
//
|
||||
// Add (*conn).{Serialize,Deserialize,NewBackup,NewRestore} methods, add Backup type.
|
||||
// - 2022-11-28 v1.20.0: Support linux/ppc64le.
|
||||
//
|
||||
// 2023-06-01 v1.23.0:
|
||||
// - 2022-09-16 v1.19.0: Support frebsd/arm64.
|
||||
//
|
||||
// Allow registering aggregate functions.
|
||||
// - 2022-07-26 v1.18.0: Add support for Go fs.FS based SQLite virtual
|
||||
// filesystems, see function New in modernc.org/sqlite/vfs and/or TestVFS in
|
||||
// all_test.go
|
||||
//
|
||||
// 2023-04-22 v1.22.0:
|
||||
// - 2022-04-24 v1.17.0: Support windows/arm64.
|
||||
//
|
||||
// Support linux/s390x.
|
||||
// - 2022-04-04 v1.16.0: Support scalar application defined functions written
|
||||
// in Go. See https://www.sqlite.org/appfunc.html
|
||||
//
|
||||
// 2023-02-23 v1.21.0:
|
||||
// - 2022-03-13 v1.15.0: Support linux/riscv64.
|
||||
//
|
||||
// Upgrade to SQLite 3.41.0, release notes at https://sqlite.org/releaselog/3_41_0.html.
|
||||
// - 2021-11-13 v1.14.0: Support windows/amd64. This target had previously
|
||||
// only experimental status because of a now resolved memory leak.
|
||||
//
|
||||
// 2022-11-28 v1.20.0
|
||||
// - 2021-09-07 v1.13.0: Support freebsd/amd64.
|
||||
//
|
||||
// Support linux/ppc64le.
|
||||
// - 2021-06-23 v1.11.0: Upgrade to use sqlite 3.36.0, release notes at
|
||||
// https://www.sqlite.org/releaselog/3_36_0.html.
|
||||
//
|
||||
// 2022-09-16 v1.19.0:
|
||||
//
|
||||
// Support frebsd/arm64.
|
||||
//
|
||||
// 2022-07-26 v1.18.0:
|
||||
//
|
||||
// Adds support for Go fs.FS based SQLite virtual filesystems, see function New
|
||||
// in modernc.org/sqlite/vfs and/or TestVFS in all_test.go
|
||||
//
|
||||
// 2022-04-24 v1.17.0:
|
||||
//
|
||||
// Support windows/arm64.
|
||||
//
|
||||
// 2022-04-04 v1.16.0:
|
||||
//
|
||||
// Support scalar application defined functions written in Go.
|
||||
//
|
||||
// https://www.sqlite.org/appfunc.html
|
||||
//
|
||||
// 2022-03-13 v1.15.0:
|
||||
//
|
||||
// Support linux/riscv64.
|
||||
//
|
||||
// 2021-11-13 v1.14.0:
|
||||
//
|
||||
// Support windows/amd64. This target had previously only experimental status
|
||||
// because of a now resolved memory leak.
|
||||
//
|
||||
// 2021-09-07 v1.13.0:
|
||||
//
|
||||
// Support freebsd/amd64.
|
||||
//
|
||||
// 2021-06-23 v1.11.0:
|
||||
//
|
||||
// Upgrade to use sqlite 3.36.0, release notes at https://www.sqlite.org/releaselog/3_36_0.html.
|
||||
//
|
||||
// 2021-05-06 v1.10.6:
|
||||
//
|
||||
// Fixes a memory corruption issue
|
||||
// - 2021-05-06 v1.10.6: Fixes a memory corruption issue
|
||||
// (https://gitlab.com/cznic/sqlite/-/issues/53). Versions since v1.8.6 were
|
||||
// affected and should be updated to v1.10.6.
|
||||
//
|
||||
// 2021-03-14 v1.10.0:
|
||||
// - 2021-03-14 v1.10.0: Update to use sqlite 3.35.0, release notes at
|
||||
// https://www.sqlite.org/releaselog/3_35_0.html.
|
||||
//
|
||||
// Update to use sqlite 3.35.0, release notes at https://www.sqlite.org/releaselog/3_35_0.html.
|
||||
// - 2021-03-11 v1.9.0: Support darwin/arm64.
|
||||
//
|
||||
// 2021-03-11 v1.9.0:
|
||||
// - 2021-01-08 v1.8.0: Support darwin/amd64.
|
||||
//
|
||||
// Support darwin/arm64.
|
||||
// - 2020-09-13 v1.7.0: Support linux/arm and linux/arm64.
|
||||
//
|
||||
// 2021-01-08 v1.8.0:
|
||||
// - 2020-09-08 v1.6.0: Support linux/386.
|
||||
//
|
||||
// Support darwin/amd64.
|
||||
// - 2020-09-03 v1.5.0: This project is now completely CGo-free, including
|
||||
// the Tcl tests.
|
||||
//
|
||||
// 2020-09-13 v1.7.0:
|
||||
// - 2020-08-26 v1.4.0: First stable release for linux/amd64. The
|
||||
// database/sql driver and its tests are CGo free. Tests of the translated
|
||||
// sqlite3.c library still require CGo.
|
||||
//
|
||||
// Support linux/arm and linux/arm64.
|
||||
// - 2020-07-26 v1.4.0-beta1: The project has reached beta status while
|
||||
// supporting linux/amd64 only at the moment. The 'extraquick' Tcl testsuite
|
||||
// reports
|
||||
//
|
||||
// 2020-09-08 v1.6.0:
|
||||
// - 2019-12-28 v1.2.0-alpha.3: Third alpha fixes issue #19.
|
||||
//
|
||||
// Support linux/386.
|
||||
// - 2019-12-26 v1.1.0-alpha.2: Second alpha release adds support for
|
||||
// accessing a database concurrently by multiple goroutines and/or processes.
|
||||
// v1.1.0 is now considered feature-complete. Next planed release should be a
|
||||
// beta with a proper test suite.
|
||||
//
|
||||
// 2020-09-03 v1.5.0:
|
||||
// - 2019-12-18 v1.1.0-alpha.1: First alpha release using the new cc/v3,
|
||||
// gocc, qbe toolchain. Some primitive tests pass on linux_{amd64,386}. Not
|
||||
// yet safe for concurrent access by multiple goroutines. Next alpha release
|
||||
// is planed to arrive before the end of this year.
|
||||
//
|
||||
// This project is now completely CGo-free, including the Tcl tests.
|
||||
// - 2017-06-10: Windows/Intel no more uses the VM (thanks Steffen Butzer).
|
||||
//
|
||||
// 2020-08-26 v1.4.0:
|
||||
//
|
||||
// First stable release for linux/amd64. The database/sql driver and its tests
|
||||
// are CGo free. Tests of the translated sqlite3.c library still require CGo.
|
||||
//
|
||||
// $ make full
|
||||
//
|
||||
// ...
|
||||
//
|
||||
// SQLite 2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f
|
||||
// 0 errors out of 928271 tests on 3900x Linux 64-bit little-endian
|
||||
// WARNING: Multi-threaded tests skipped: Linked against a non-threadsafe Tcl build
|
||||
// All memory allocations freed - no leaks
|
||||
// Maximum memory usage: 9156360 bytes
|
||||
// Current memory usage: 0 bytes
|
||||
// Number of malloc() : -1 calls
|
||||
// --- PASS: TestTclTest (1785.04s)
|
||||
// PASS
|
||||
// ok modernc.org/sqlite 1785.041s
|
||||
// $
|
||||
//
|
||||
// 2020-07-26 v1.4.0-beta1:
|
||||
//
|
||||
// The project has reached beta status while supporting linux/amd64 only at the
|
||||
// moment. The 'extraquick' Tcl testsuite reports
|
||||
//
|
||||
// 630 errors out of 200177 tests on Linux 64-bit little-endian
|
||||
//
|
||||
// and some memory leaks
|
||||
//
|
||||
// Unfreed memory: 698816 bytes in 322 allocations
|
||||
//
|
||||
// 2019-12-28 v1.2.0-alpha.3: Third alpha fixes issue #19.
|
||||
//
|
||||
// It also bumps the minor version as the repository was wrongly already tagged
|
||||
// with v1.1.0 before. Even though the tag was deleted there are proxies that
|
||||
// cached that tag. Thanks /u/garaktailor for detecting the problem and
|
||||
// suggesting this solution.
|
||||
//
|
||||
// 2019-12-26 v1.1.0-alpha.2: Second alpha release adds support for accessing a
|
||||
// database concurrently by multiple goroutines and/or processes. v1.1.0 is now
|
||||
// considered feature-complete. Next planed release should be a beta with a
|
||||
// proper test suite.
|
||||
//
|
||||
// 2019-12-18 v1.1.0-alpha.1: First alpha release using the new cc/v3, gocc,
|
||||
// qbe toolchain. Some primitive tests pass on linux_{amd64,386}. Not yet safe
|
||||
// for concurrent access by multiple goroutines. Next alpha release is planed
|
||||
// to arrive before the end of this year.
|
||||
//
|
||||
// 2017-06-10 Windows/Intel no more uses the VM (thanks Steffen Butzer).
|
||||
//
|
||||
// 2017-06-05 Linux/Intel no more uses the VM (cznic/virtual).
|
||||
// - 2017-06-05 Linux/Intel no more uses the VM (cznic/virtual).
|
||||
//
|
||||
// # Connecting to a database
|
||||
//
|
||||
|
|
1
vendor/modernc.org/sqlite/lib/sqlite_darwin_amd64.go
generated
vendored
1
vendor/modernc.org/sqlite/lib/sqlite_darwin_amd64.go
generated
vendored
|
@ -230897,4 +230897,3 @@ func __ccgo_fp(f interface{}) uintptr {
|
|||
type Sqlite3_module = sqlite3_module
|
||||
type Sqlite3_vtab = sqlite3_vtab
|
||||
type Sqlite3_vtab_cursor = sqlite3_vtab_cursor
|
||||
|
||||
|
|
1
vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go
generated
vendored
1
vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go
generated
vendored
|
@ -230452,4 +230452,3 @@ func __ccgo_fp(f interface{}) uintptr {
|
|||
type Sqlite3_module = sqlite3_module
|
||||
type Sqlite3_vtab = sqlite3_vtab
|
||||
type Sqlite3_vtab_cursor = sqlite3_vtab_cursor
|
||||
|
||||
|
|
1
vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go
generated
vendored
1
vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go
generated
vendored
|
@ -225512,4 +225512,3 @@ func __ccgo_fp(f interface{}) uintptr {
|
|||
type Sqlite3_module = sqlite3_module
|
||||
type Sqlite3_vtab = sqlite3_vtab
|
||||
type Sqlite3_vtab_cursor = sqlite3_vtab_cursor
|
||||
|
||||
|
|
1
vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm64.go
generated
vendored
1
vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm64.go
generated
vendored
|
@ -225523,4 +225523,3 @@ func __ccgo_fp(f interface{}) uintptr {
|
|||
type Sqlite3_module = sqlite3_module
|
||||
type Sqlite3_vtab = sqlite3_vtab
|
||||
type Sqlite3_vtab_cursor = sqlite3_vtab_cursor
|
||||
|
||||
|
|
1
vendor/modernc.org/sqlite/lib/sqlite_linux_386.go
generated
vendored
1
vendor/modernc.org/sqlite/lib/sqlite_linux_386.go
generated
vendored
|
@ -231929,4 +231929,3 @@ func __ccgo_fp(f interface{}) uintptr {
|
|||
type Sqlite3_module = sqlite3_module
|
||||
type Sqlite3_vtab = sqlite3_vtab
|
||||
type Sqlite3_vtab_cursor = sqlite3_vtab_cursor
|
||||
|
||||
|
|
1
vendor/modernc.org/sqlite/lib/sqlite_linux_amd64.go
generated
vendored
1
vendor/modernc.org/sqlite/lib/sqlite_linux_amd64.go
generated
vendored
|
@ -225728,4 +225728,3 @@ func __ccgo_fp(f interface{}) uintptr {
|
|||
type Sqlite3_module = sqlite3_module
|
||||
type Sqlite3_vtab = sqlite3_vtab
|
||||
type Sqlite3_vtab_cursor = sqlite3_vtab_cursor
|
||||
|
||||
|
|
1
vendor/modernc.org/sqlite/lib/sqlite_linux_arm.go
generated
vendored
1
vendor/modernc.org/sqlite/lib/sqlite_linux_arm.go
generated
vendored
|
@ -232454,4 +232454,3 @@ func __ccgo_fp(f interface{}) uintptr {
|
|||
type Sqlite3_module = sqlite3_module
|
||||
type Sqlite3_vtab = sqlite3_vtab
|
||||
type Sqlite3_vtab_cursor = sqlite3_vtab_cursor
|
||||
|
||||
|
|
1
vendor/modernc.org/sqlite/lib/sqlite_linux_arm64.go
generated
vendored
1
vendor/modernc.org/sqlite/lib/sqlite_linux_arm64.go
generated
vendored
|
@ -231974,4 +231974,3 @@ func __ccgo_fp(f interface{}) uintptr {
|
|||
type Sqlite3_module = sqlite3_module
|
||||
type Sqlite3_vtab = sqlite3_vtab
|
||||
type Sqlite3_vtab_cursor = sqlite3_vtab_cursor
|
||||
|
||||
|
|
1
vendor/modernc.org/sqlite/lib/sqlite_linux_loong64.go
generated
vendored
1
vendor/modernc.org/sqlite/lib/sqlite_linux_loong64.go
generated
vendored
|
@ -225817,4 +225817,3 @@ func __ccgo_fp(f interface{}) uintptr {
|
|||
type Sqlite3_module = sqlite3_module
|
||||
type Sqlite3_vtab = sqlite3_vtab
|
||||
type Sqlite3_vtab_cursor = sqlite3_vtab_cursor
|
||||
|
||||
|
|
1
vendor/modernc.org/sqlite/lib/sqlite_linux_ppc64le.go
generated
vendored
1
vendor/modernc.org/sqlite/lib/sqlite_linux_ppc64le.go
generated
vendored
|
@ -231955,4 +231955,3 @@ func __ccgo_fp(f interface{}) uintptr {
|
|||
type Sqlite3_module = sqlite3_module
|
||||
type Sqlite3_vtab = sqlite3_vtab
|
||||
type Sqlite3_vtab_cursor = sqlite3_vtab_cursor
|
||||
|
||||
|
|
1
vendor/modernc.org/sqlite/lib/sqlite_linux_riscv64.go
generated
vendored
1
vendor/modernc.org/sqlite/lib/sqlite_linux_riscv64.go
generated
vendored
|
@ -231918,4 +231918,3 @@ func __ccgo_fp(f interface{}) uintptr {
|
|||
type Sqlite3_module = sqlite3_module
|
||||
type Sqlite3_vtab = sqlite3_vtab
|
||||
type Sqlite3_vtab_cursor = sqlite3_vtab_cursor
|
||||
|
||||
|
|
1
vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go
generated
vendored
1
vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go
generated
vendored
|
@ -231852,4 +231852,3 @@ func __ccgo_fp(f interface{}) uintptr {
|
|||
type Sqlite3_module = sqlite3_module
|
||||
type Sqlite3_vtab = sqlite3_vtab
|
||||
type Sqlite3_vtab_cursor = sqlite3_vtab_cursor
|
||||
|
||||
|
|
1
vendor/modernc.org/sqlite/lib/sqlite_windows.go
generated
vendored
1
vendor/modernc.org/sqlite/lib/sqlite_windows.go
generated
vendored
|
@ -300917,4 +300917,3 @@ func __ccgo_fp(f interface{}) uintptr {
|
|||
type Sqlite3_module = sqlite3_module
|
||||
type Sqlite3_vtab = sqlite3_vtab
|
||||
type Sqlite3_vtab_cursor = sqlite3_vtab_cursor
|
||||
|
||||
|
|
1
vendor/modernc.org/sqlite/lib/sqlite_windows_386.go
generated
vendored
1
vendor/modernc.org/sqlite/lib/sqlite_windows_386.go
generated
vendored
|
@ -301017,4 +301017,3 @@ func __ccgo_fp(f interface{}) uintptr {
|
|||
type Sqlite3_module = sqlite3_module
|
||||
type Sqlite3_vtab = sqlite3_vtab
|
||||
type Sqlite3_vtab_cursor = sqlite3_vtab_cursor
|
||||
|
||||
|
|
BIN
vendor/modernc.org/sqlite/logo.png
generated
vendored
Normal file
BIN
vendor/modernc.org/sqlite/logo.png
generated
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
40
vendor/modernc.org/sqlite/sqlite.go
generated
vendored
40
vendor/modernc.org/sqlite/sqlite.go
generated
vendored
|
@ -18,6 +18,7 @@
|
|||
"net/url"
|
||||
"reflect"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
|
@ -819,7 +820,25 @@ func applyQueryParams(c *conn, query string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
var a []string
|
||||
for _, v := range q["_pragma"] {
|
||||
a = append(a, v)
|
||||
}
|
||||
// Push 'busy_timeout' first, the rest in lexicographic order, case insenstive.
|
||||
// See https://gitlab.com/cznic/sqlite/-/issues/198#note_2233423463 for
|
||||
// discussion.
|
||||
sort.Slice(a, func(i, j int) bool {
|
||||
x, y := strings.TrimSpace(strings.ToLower(a[i])), strings.TrimSpace(strings.ToLower(a[j]))
|
||||
if strings.HasPrefix(x, "busy_timeout") {
|
||||
return true
|
||||
}
|
||||
if strings.HasPrefix(y, "busy_timeout") {
|
||||
return false
|
||||
}
|
||||
|
||||
return x < y
|
||||
})
|
||||
for _, v := range a {
|
||||
cmd := "pragma " + v
|
||||
_, err := c.exec(context.Background(), cmd, nil)
|
||||
if err != nil {
|
||||
|
@ -1390,6 +1409,27 @@ func (c *conn) closeV2(db uintptr) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// ResetSession is called prior to executing a query on the connection if the
|
||||
// connection has been used before. If the driver returns ErrBadConn the
|
||||
// connection is discarded.
|
||||
func (c *conn) ResetSession(ctx context.Context) error {
|
||||
if !c.usable() {
|
||||
return driver.ErrBadConn
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// IsValid is called prior to placing the connection into the connection pool.
|
||||
// The connection will be discarded if false is returned.
|
||||
func (c *conn) IsValid() bool {
|
||||
return c.usable()
|
||||
}
|
||||
|
||||
func (c *conn) usable() bool {
|
||||
return c.db != 0 && sqlite3.Xsqlite3_is_interrupted(c.tls, c.db) == 0
|
||||
}
|
||||
|
||||
// FunctionImpl describes an [application-defined SQL function]. If Scalar is
|
||||
// set, it is treated as a scalar function; otherwise, it is treated as an
|
||||
// aggregate function using MakeAggregate.
|
||||
|
|
6
vendor/modules.txt
vendored
6
vendor/modules.txt
vendored
|
@ -1341,8 +1341,8 @@ modernc.org/mathutil
|
|||
# modernc.org/memory v1.8.0
|
||||
## explicit; go 1.18
|
||||
modernc.org/memory
|
||||
# modernc.org/sqlite v0.0.0-00010101000000-000000000000 => gitlab.com/NyaaaWhatsUpDoc/sqlite v1.33.1-concurrency-workaround
|
||||
## explicit; go 1.20
|
||||
# modernc.org/sqlite v0.0.0-00010101000000-000000000000 => gitlab.com/NyaaaWhatsUpDoc/sqlite v1.34.2-concurrency-workaround
|
||||
## explicit; go 1.21
|
||||
modernc.org/sqlite
|
||||
modernc.org/sqlite/lib
|
||||
# modernc.org/strutil v1.2.0
|
||||
|
@ -1355,7 +1355,7 @@ modernc.org/token
|
|||
## explicit; go 1.19
|
||||
mvdan.cc/xurls/v2
|
||||
# github.com/go-swagger/go-swagger => github.com/superseriousbusiness/go-swagger v0.31.0-gts-go1.23-fix
|
||||
# modernc.org/sqlite => gitlab.com/NyaaaWhatsUpDoc/sqlite v1.33.1-concurrency-workaround
|
||||
# modernc.org/sqlite => gitlab.com/NyaaaWhatsUpDoc/sqlite v1.34.2-concurrency-workaround
|
||||
# go.opentelemetry.io/otel => go.opentelemetry.io/otel v1.29.0
|
||||
# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc => go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.29.0
|
||||
# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp => go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0
|
||||
|
|
Loading…
Reference in a new issue