diff --git a/generator.go b/generator.go index edcc83b..5434397 100644 --- a/generator.go +++ b/generator.go @@ -141,6 +141,10 @@ import ( // -lz // -lpthread +const ( + volatiles = "-volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count" +) + var ( config = []string{ "-DHAVE_USLEEP", @@ -548,6 +552,7 @@ func makeTestfixture(goos, goarch string, more []string) { "-export-defines", "", "-export-fields", "F", "-trace-translation-units", + volatiles, "-lmodernc.org/tcl/lib,modernc.org/sqlite/internal/libc2,modernc.org/sqlite/lib", "-o", filepath.Join(dir, fmt.Sprintf("testfixture_%s_%s.go", goos, goarch)), fmt.Sprintf("-I%s", filepath.Join(sqliteSrcDir, filepath.FromSlash("ext/async"))), @@ -576,6 +581,7 @@ func makeSpeedTest(goos, goarch string, more []string) { []string{ "-o", filepath.FromSlash(fmt.Sprintf("speedtest1/main_%s_%s.go", goos, goarch)), "-trace-translation-units", + volatiles, filepath.Join(sqliteSrcDir, "test", "speedtest1.c"), fmt.Sprintf("-I%s", sqliteDir), "-l", "modernc.org/sqlite/lib", @@ -595,6 +601,7 @@ func makeMpTest(goos, goarch string, more []string) { []string{ "-o", filepath.FromSlash(fmt.Sprintf("internal/mptest/main_%s_%s.go", goos, goarch)), "-trace-translation-units", + volatiles, filepath.Join(sqliteSrcDir, "mptest", "mptest.c"), fmt.Sprintf("-I%s", sqliteDir), "-l", "modernc.org/sqlite/lib", @@ -621,7 +628,7 @@ func makeSqlite(goos, goarch string, more []string) { "-pkgname", "sqlite3", "-o", filepath.FromSlash(fmt.Sprintf("lib/sqlite_%s_%s.go", goos, goarch)), "-trace-translation-units", - //TODO "-volatile", "sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_search_count,sqlite3_sort_count", + volatiles, filepath.Join(sqliteDir, "sqlite3.c"), }, more, diff --git a/go.mod b/go.mod index cdd85cb..192fa75 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.15 require ( github.com/mattn/go-sqlite3 v1.14.6 - modernc.org/libc v0.0.0-20210125204052-5ca6da112a41 + modernc.org/libc v0.0.0-20210126194511-2b2d365b45c2 modernc.org/mathutil v1.2.2 - modernc.org/tcl v0.0.0-20210125204718-fed1e65b7397 + modernc.org/tcl v0.0.0-20210126195340-ef4fe8b071b1 ) diff --git a/go.sum b/go.sum index f6e6be6..8ed9ecc 100644 --- a/go.sum +++ b/go.sum @@ -9,13 +9,13 @@ golang.org/x/sys v0.0.0-20201126233918-771906719818 h1:f1CIuDlJhwANEC2MM87MBEVMr golang.org/x/sys v0.0.0-20201126233918-771906719818/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= modernc.org/httpfs v1.0.2 h1:4aw8F68gTwx7FWL/vEMjm/XaPwPL16MItkF/P9ziEPY= modernc.org/httpfs v1.0.2/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= -modernc.org/libc v0.0.0-20210125204052-5ca6da112a41 h1:r9+mcx7HnH6ux6UjweNo1wDqZo/0e/BDg3UlYVHFPA4= -modernc.org/libc v0.0.0-20210125204052-5ca6da112a41/go.mod h1:U1eq8YWr/Kc1RWCMFUWEdkTg8OTcfLw2kY8EDwl039w= +modernc.org/libc v0.0.0-20210126194511-2b2d365b45c2 h1:tt8AD7ptNzdjMF6llxq3Fr1qmaH5I2pheV/QYtSyhjE= +modernc.org/libc v0.0.0-20210126194511-2b2d365b45c2/go.mod h1:U1eq8YWr/Kc1RWCMFUWEdkTg8OTcfLw2kY8EDwl039w= modernc.org/mathutil v1.1.1 h1:FeylZSVX8S+58VsyJlkEj2bcpdytmp9MmDKZkKx8OIE= modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/mathutil v1.2.2 h1:+yFk8hBprV+4c0U9GjFtL+dV3N8hOJ8JCituQcMShFY= modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/memory v1.0.4 h1:utMBrFcpnQDdNsmM6asmyH/FM9TqLPS7XF7otpJmrwM= modernc.org/memory v1.0.4/go.mod h1:nV2OApxradM3/OVbs2/0OsP6nPfakXpi50C7dcoHXlc= -modernc.org/tcl v0.0.0-20210125204718-fed1e65b7397 h1:JT68GHJ4xgOMwAKVYK5ivP3IG0qLVxwmTuuglGb8/9c= -modernc.org/tcl v0.0.0-20210125204718-fed1e65b7397/go.mod h1:K7YIIQw2BHre02BiNB9RvJ3lUQWJtX4uFV9SeWjnUio= +modernc.org/tcl v0.0.0-20210126195340-ef4fe8b071b1 h1:yrRH+qqPVEG63zwK8OHUn13KmV8JIr0mYH+oJDK/+M4= +modernc.org/tcl v0.0.0-20210126195340-ef4fe8b071b1/go.mod h1:3zmINXxWd0ou2yESOionCdpu77iJutiqQuf3K3EGtA0= diff --git a/internal/mptest/main_darwin_amd64.go b/internal/mptest/main_darwin_amd64.go index f6dc8ea..0c757f3 100644 --- a/internal/mptest/main_darwin_amd64.go +++ b/internal/mptest/main_darwin_amd64.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -o internal/mptest/main_darwin_amd64.go -trace-translation-units testdata/sqlite-src-3330000/mptest/mptest.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1 -DSQLITE_WITHOUT_ZONEMALLOC', DO NOT EDIT. +// Code generated by 'ccgo -o internal/mptest/main_darwin_amd64.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-src-3330000/mptest/mptest.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1 -DSQLITE_WITHOUT_ZONEMALLOC', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -13,6 +14,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -11673,7 +11675,7 @@ func booleanValue(tls *libc.TLS, zArg uintptr) int32 { /* mptest.c:845:12: */ // This routine exists as a convenient place to set a debugger // breakpoint. func test_breakpoint(tls *libc.TLS) { /* mptest.c:864:13: */ - cnt++ + atomic.AddInt32(&cnt, 1) } var cnt int32 = 0 /* mptest.c:864:56 */ diff --git a/internal/mptest/main_linux_386.go b/internal/mptest/main_linux_386.go index 311268f..ca112a1 100644 --- a/internal/mptest/main_linux_386.go +++ b/internal/mptest/main_linux_386.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -o internal/mptest/main_linux_386.go -trace-translation-units testdata/sqlite-src-3330000/mptest/mptest.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -o internal/mptest/main_linux_386.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-src-3330000/mptest/mptest.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -13,6 +14,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -5044,7 +5046,7 @@ func booleanValue(tls *libc.TLS, zArg uintptr) int32 { /* mptest.c:845:12: */ // This routine exists as a convenient place to set a debugger // breakpoint. func test_breakpoint(tls *libc.TLS) { /* mptest.c:864:13: */ - cnt++ + atomic.AddInt32(&cnt, 1) } var cnt int32 = 0 /* mptest.c:864:56 */ diff --git a/internal/mptest/main_linux_amd64.go b/internal/mptest/main_linux_amd64.go index a3fbbf8..f4b4307 100644 --- a/internal/mptest/main_linux_amd64.go +++ b/internal/mptest/main_linux_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -o internal/mptest/main_linux_amd64.go -trace-translation-units testdata/sqlite-src-3330000/mptest/mptest.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -o internal/mptest/main_linux_amd64.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-src-3330000/mptest/mptest.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package main diff --git a/internal/mptest/main_linux_arm.go b/internal/mptest/main_linux_arm.go index 525d32c..cca68f0 100644 --- a/internal/mptest/main_linux_arm.go +++ b/internal/mptest/main_linux_arm.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -o internal/mptest/main_linux_arm.go -trace-translation-units testdata/sqlite-src-3330000/mptest/mptest.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -o internal/mptest/main_linux_arm.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-src-3330000/mptest/mptest.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -13,6 +14,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -5045,7 +5047,7 @@ func booleanValue(tls *libc.TLS, zArg uintptr) int32 { /* mptest.c:845:12: */ // This routine exists as a convenient place to set a debugger // breakpoint. func test_breakpoint(tls *libc.TLS) { /* mptest.c:864:13: */ - cnt++ + atomic.AddInt32(&cnt, 1) } var cnt int32 = 0 /* mptest.c:864:56 */ diff --git a/internal/mptest/main_linux_arm64.go b/internal/mptest/main_linux_arm64.go index 47806b6..f291a5d 100644 --- a/internal/mptest/main_linux_arm64.go +++ b/internal/mptest/main_linux_arm64.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -o internal/mptest/main_linux_arm64.go -trace-translation-units testdata/sqlite-src-3330000/mptest/mptest.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -o internal/mptest/main_linux_arm64.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-src-3330000/mptest/mptest.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -13,6 +14,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -5094,7 +5096,7 @@ func booleanValue(tls *libc.TLS, zArg uintptr) int32 { /* mptest.c:845:12: */ // This routine exists as a convenient place to set a debugger // breakpoint. func test_breakpoint(tls *libc.TLS) { /* mptest.c:864:13: */ - cnt++ + atomic.AddInt32(&cnt, 1) } var cnt int32 = 0 /* mptest.c:864:56 */ diff --git a/internal/mptest/main_windows_386.go b/internal/mptest/main_windows_386.go index 5891bbb..be46df9 100644 --- a/internal/mptest/main_windows_386.go +++ b/internal/mptest/main_windows_386.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -o internal/mptest/main_windows_386.go -trace-translation-units testdata/sqlite-src-3330000/mptest/mptest.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. +// Code generated by 'ccgo -o internal/mptest/main_windows_386.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-src-3330000/mptest/mptest.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -13,6 +14,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -2999,6 +3001,7 @@ type off64_t = int64 /* _mingw_off_t.h:15:39 */ type off_t = off64_t /* _mingw_off_t.h:24:17 */ // A pointer to an array of FILE type fpos_t = int64 /* stdio.h:104:37 */ + func vsnwprintf(tls *libc.TLS, s uintptr, n size_t, format uintptr, arg va_list) int32 { /* stdio.h:1213:15: */ return libc.X_vsnwprintf(tls, s, n, format, arg) @@ -15138,7 +15141,7 @@ func booleanValue(tls *libc.TLS, zArg uintptr) int32 { /* mptest.c:845:12: */ // This routine exists as a convenient place to set a debugger // breakpoint. func test_breakpoint(tls *libc.TLS) { /* mptest.c:864:13: */ - cnt++ + atomic.AddInt32(&cnt, 1) } var cnt int32 = 0 /* mptest.c:864:56 */ diff --git a/internal/mptest/main_windows_amd64.go b/internal/mptest/main_windows_amd64.go index 1a76c5f..3bcfcfd 100644 --- a/internal/mptest/main_windows_amd64.go +++ b/internal/mptest/main_windows_amd64.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -o internal/mptest/main_windows_amd64.go -trace-translation-units testdata/sqlite-src-3330000/mptest/mptest.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. +// Code generated by 'ccgo -o internal/mptest/main_windows_amd64.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-src-3330000/mptest/mptest.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -13,6 +14,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -3295,6 +3297,7 @@ type off64_t = int64 /* _mingw_off_t.h:15:39 */ type off_t = off64_t /* _mingw_off_t.h:24:17 */ type fpos_t = int64 /* stdio.h:104:37 */ + func vsnwprintf(tls *libc.TLS, s uintptr, n size_t, format uintptr, arg va_list) int32 { /* stdio.h:1213:15: */ return libc.X_vsnwprintf(tls, s, n, format, arg) @@ -15799,7 +15802,7 @@ func booleanValue(tls *libc.TLS, zArg uintptr) int32 { /* mptest.c:845:12: */ // This routine exists as a convenient place to set a debugger // breakpoint. func test_breakpoint(tls *libc.TLS) { /* mptest.c:864:13: */ - cnt++ + atomic.AddInt32(&cnt, 1) } var cnt int32 = 0 /* mptest.c:864:56 */ diff --git a/internal/testfixture/testfixture_darwin_amd64.go b/internal/testfixture/testfixture_darwin_amd64.go index 22ff6eb..5d0190e 100644 --- a/internal/testfixture/testfixture_darwin_amd64.go +++ b/internal/testfixture/testfixture_darwin_amd64.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DTCLSH_INIT_PROC=sqlite3TestInit -D_HAVE_SQLITE_CONFIG_H -I/usr/include/tcl8.6 -export-defines "" -export-fields F -trace-translation-units -lmodernc.org/tcl/lib,modernc.org/sqlite/internal/libc2,modernc.org/sqlite/lib -o internal/testfixture/testfixture_darwin_amd64.go -Itestdata/sqlite-src-3330000/ext/async -Itestdata/sqlite-src-3330000/ext/fts3 -Itestdata/sqlite-src-3330000/ext/icu -Itestdata/sqlite-src-3330000/ext/rtree -Itestdata/sqlite-src-3330000/ext/session -Itestdata/sqlite-src-3330000/ext/userauth -Itestdata/sqlite-src-3330000/src -Itestdata/sqlite-amalgamation-3330000 -Itestdata/sqlite-src-3330000 testdata/sqlite-src-3330000/ext/expert/sqlite3expert.c testdata/sqlite-src-3330000/ext/expert/test_expert.c testdata/sqlite-src-3330000/ext/fts3/fts3_term.c testdata/sqlite-src-3330000/ext/fts3/fts3_test.c testdata/sqlite-src-3330000/ext/fts5/fts5_tcl.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_mi.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_tok.c testdata/sqlite-src-3330000/ext/misc/amatch.c testdata/sqlite-src-3330000/ext/misc/carray.c testdata/sqlite-src-3330000/ext/misc/closure.c testdata/sqlite-src-3330000/ext/misc/csv.c testdata/sqlite-src-3330000/ext/misc/decimal.c testdata/sqlite-src-3330000/ext/misc/eval.c testdata/sqlite-src-3330000/ext/misc/explain.c testdata/sqlite-src-3330000/ext/misc/fileio.c testdata/sqlite-src-3330000/ext/misc/fuzzer.c testdata/sqlite-src-3330000/ext/misc/ieee754.c testdata/sqlite-src-3330000/ext/misc/mmapwarm.c testdata/sqlite-src-3330000/ext/misc/nextchar.c testdata/sqlite-src-3330000/ext/misc/normalize.c testdata/sqlite-src-3330000/ext/misc/percentile.c testdata/sqlite-src-3330000/ext/misc/prefixes.c testdata/sqlite-src-3330000/ext/misc/regexp.c testdata/sqlite-src-3330000/ext/misc/remember.c testdata/sqlite-src-3330000/ext/misc/series.c testdata/sqlite-src-3330000/ext/misc/spellfix.c testdata/sqlite-src-3330000/ext/misc/totype.c testdata/sqlite-src-3330000/ext/misc/unionvtab.c testdata/sqlite-src-3330000/ext/misc/wholenumber.c testdata/sqlite-src-3330000/ext/misc/zipfile.c testdata/sqlite-src-3330000/ext/rbu/test_rbu.c testdata/sqlite-src-3330000/ext/userauth/userauth.c testdata/sqlite-src-3330000/src/tclsqlite.c testdata/sqlite-src-3330000/src/test1.c testdata/sqlite-src-3330000/src/test2.c testdata/sqlite-src-3330000/src/test3.c testdata/sqlite-src-3330000/src/test4.c testdata/sqlite-src-3330000/src/test5.c testdata/sqlite-src-3330000/src/test6.c testdata/sqlite-src-3330000/src/test7.c testdata/sqlite-src-3330000/src/test8.c testdata/sqlite-src-3330000/src/test9.c testdata/sqlite-src-3330000/src/test_async.c testdata/sqlite-src-3330000/src/test_autoext.c testdata/sqlite-src-3330000/src/test_backup.c testdata/sqlite-src-3330000/src/test_bestindex.c testdata/sqlite-src-3330000/src/test_blob.c testdata/sqlite-src-3330000/src/test_btree.c testdata/sqlite-src-3330000/src/test_config.c testdata/sqlite-src-3330000/src/test_delete.c testdata/sqlite-src-3330000/src/test_demovfs.c testdata/sqlite-src-3330000/src/test_devsym.c testdata/sqlite-src-3330000/src/test_fs.c testdata/sqlite-src-3330000/src/test_func.c testdata/sqlite-src-3330000/src/test_hexio.c testdata/sqlite-src-3330000/src/test_init.c testdata/sqlite-src-3330000/src/test_intarray.c testdata/sqlite-src-3330000/src/test_journal.c testdata/sqlite-src-3330000/src/test_malloc.c testdata/sqlite-src-3330000/src/test_md5.c testdata/sqlite-src-3330000/src/test_multiplex.c testdata/sqlite-src-3330000/src/test_mutex.c testdata/sqlite-src-3330000/src/test_onefile.c testdata/sqlite-src-3330000/src/test_osinst.c testdata/sqlite-src-3330000/src/test_pcache.c testdata/sqlite-src-3330000/src/test_quota.c testdata/sqlite-src-3330000/src/test_rtree.c testdata/sqlite-src-3330000/src/test_schema.c testdata/sqlite-src-3330000/src/test_server.c testdata/sqlite-src-3330000/src/test_superlock.c testdata/sqlite-src-3330000/src/test_syscall.c testdata/sqlite-src-3330000/src/test_tclsh.c testdata/sqlite-src-3330000/src/test_tclvar.c testdata/sqlite-src-3330000/src/test_thread.c testdata/sqlite-src-3330000/src/test_vdbecov.c testdata/sqlite-src-3330000/src/test_vfs.c testdata/sqlite-src-3330000/src/test_windirent.c testdata/sqlite-src-3330000/src/test_window.c testdata/sqlite-src-3330000/src/test_wsd.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1 -DSQLITE_WITHOUT_ZONEMALLOC', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DTCLSH_INIT_PROC=sqlite3TestInit -D_HAVE_SQLITE_CONFIG_H -I/usr/include/tcl8.6 -export-defines "" -export-fields F -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count -lmodernc.org/tcl/lib,modernc.org/sqlite/internal/libc2,modernc.org/sqlite/lib -o internal/testfixture/testfixture_darwin_amd64.go -Itestdata/sqlite-src-3330000/ext/async -Itestdata/sqlite-src-3330000/ext/fts3 -Itestdata/sqlite-src-3330000/ext/icu -Itestdata/sqlite-src-3330000/ext/rtree -Itestdata/sqlite-src-3330000/ext/session -Itestdata/sqlite-src-3330000/ext/userauth -Itestdata/sqlite-src-3330000/src -Itestdata/sqlite-amalgamation-3330000 -Itestdata/sqlite-src-3330000 testdata/sqlite-src-3330000/ext/expert/sqlite3expert.c testdata/sqlite-src-3330000/ext/expert/test_expert.c testdata/sqlite-src-3330000/ext/fts3/fts3_term.c testdata/sqlite-src-3330000/ext/fts3/fts3_test.c testdata/sqlite-src-3330000/ext/fts5/fts5_tcl.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_mi.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_tok.c testdata/sqlite-src-3330000/ext/misc/amatch.c testdata/sqlite-src-3330000/ext/misc/carray.c testdata/sqlite-src-3330000/ext/misc/closure.c testdata/sqlite-src-3330000/ext/misc/csv.c testdata/sqlite-src-3330000/ext/misc/decimal.c testdata/sqlite-src-3330000/ext/misc/eval.c testdata/sqlite-src-3330000/ext/misc/explain.c testdata/sqlite-src-3330000/ext/misc/fileio.c testdata/sqlite-src-3330000/ext/misc/fuzzer.c testdata/sqlite-src-3330000/ext/misc/ieee754.c testdata/sqlite-src-3330000/ext/misc/mmapwarm.c testdata/sqlite-src-3330000/ext/misc/nextchar.c testdata/sqlite-src-3330000/ext/misc/normalize.c testdata/sqlite-src-3330000/ext/misc/percentile.c testdata/sqlite-src-3330000/ext/misc/prefixes.c testdata/sqlite-src-3330000/ext/misc/regexp.c testdata/sqlite-src-3330000/ext/misc/remember.c testdata/sqlite-src-3330000/ext/misc/series.c testdata/sqlite-src-3330000/ext/misc/spellfix.c testdata/sqlite-src-3330000/ext/misc/totype.c testdata/sqlite-src-3330000/ext/misc/unionvtab.c testdata/sqlite-src-3330000/ext/misc/wholenumber.c testdata/sqlite-src-3330000/ext/misc/zipfile.c testdata/sqlite-src-3330000/ext/rbu/test_rbu.c testdata/sqlite-src-3330000/ext/userauth/userauth.c testdata/sqlite-src-3330000/src/tclsqlite.c testdata/sqlite-src-3330000/src/test1.c testdata/sqlite-src-3330000/src/test2.c testdata/sqlite-src-3330000/src/test3.c testdata/sqlite-src-3330000/src/test4.c testdata/sqlite-src-3330000/src/test5.c testdata/sqlite-src-3330000/src/test6.c testdata/sqlite-src-3330000/src/test7.c testdata/sqlite-src-3330000/src/test8.c testdata/sqlite-src-3330000/src/test9.c testdata/sqlite-src-3330000/src/test_async.c testdata/sqlite-src-3330000/src/test_autoext.c testdata/sqlite-src-3330000/src/test_backup.c testdata/sqlite-src-3330000/src/test_bestindex.c testdata/sqlite-src-3330000/src/test_blob.c testdata/sqlite-src-3330000/src/test_btree.c testdata/sqlite-src-3330000/src/test_config.c testdata/sqlite-src-3330000/src/test_delete.c testdata/sqlite-src-3330000/src/test_demovfs.c testdata/sqlite-src-3330000/src/test_devsym.c testdata/sqlite-src-3330000/src/test_fs.c testdata/sqlite-src-3330000/src/test_func.c testdata/sqlite-src-3330000/src/test_hexio.c testdata/sqlite-src-3330000/src/test_init.c testdata/sqlite-src-3330000/src/test_intarray.c testdata/sqlite-src-3330000/src/test_journal.c testdata/sqlite-src-3330000/src/test_malloc.c testdata/sqlite-src-3330000/src/test_md5.c testdata/sqlite-src-3330000/src/test_multiplex.c testdata/sqlite-src-3330000/src/test_mutex.c testdata/sqlite-src-3330000/src/test_onefile.c testdata/sqlite-src-3330000/src/test_osinst.c testdata/sqlite-src-3330000/src/test_pcache.c testdata/sqlite-src-3330000/src/test_quota.c testdata/sqlite-src-3330000/src/test_rtree.c testdata/sqlite-src-3330000/src/test_schema.c testdata/sqlite-src-3330000/src/test_server.c testdata/sqlite-src-3330000/src/test_superlock.c testdata/sqlite-src-3330000/src/test_syscall.c testdata/sqlite-src-3330000/src/test_tclsh.c testdata/sqlite-src-3330000/src/test_tclvar.c testdata/sqlite-src-3330000/src/test_thread.c testdata/sqlite-src-3330000/src/test_vdbecov.c testdata/sqlite-src-3330000/src/test_vfs.c testdata/sqlite-src-3330000/src/test_windirent.c testdata/sqlite-src-3330000/src/test_window.c testdata/sqlite-src-3330000/src/test_wsd.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1 -DSQLITE_WITHOUT_ZONEMALLOC', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -15,6 +16,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -4371,31 +4373,6 @@ const ( /* qos.h:130:1: */ QOS_CLASS_UNSPECIFIED = 0 ) -// Macros for looping over all elements of a hash table. The idiom is -// like this: -// -// Hash h; -// HashElem *p; -// ... -// for(p=sqliteHashFirst(&h); p; p=sqliteHashNext(p)){ -// SomeStructure *pData = sqliteHashData(p); -// // do something with pData -// } -// #define sqliteHashKey(E) ((E)->pKey) // NOT USED -// #define sqliteHashKeysize(E) ((E)->nKey) // NOT USED - -// Number of entries in a hash table -// #define sqliteHashCount(H) ((H)->count) // NOT USED - -// DO NOT EDIT THIS FILE. -// -// It has been auto-edited by fixincludes from: -// -// "/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h" -// -// This had to be done to correct non-standard usages in the -// original, manufacturer supplied header file. - // Copyright (c) 2000, 2002 - 2008 Apple Inc. All rights reserved. // // @APPLE_LICENSE_HEADER_START@ @@ -9172,6 +9149,7 @@ var expertModule = sqlite3_module{ FxShadowName:// xRollbackTo uintptr(0), // xShadowName } /* sqlite3expert.c:623:25 */ + // // End of virtual table implementation. // @@ -22406,6 +22384,7 @@ func amatchStrcpy(tls *libc.TLS, dest uintptr, src uintptr) { /* amatch.c:1005:1 for (int32(libc.AssignPtrInt8(libc.PostIncUintptr(&dest, 1), *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&src, 1)))))) != 0 { } } + func amatchStrcat(tls *libc.TLS, dest uintptr, src uintptr) { /* amatch.c:1008:13: */ for *(*int8)(unsafe.Pointer(dest)) != 0 { dest++ @@ -26170,6 +26149,7 @@ func decimalAddFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { decimal_free(tls, pA) decimal_free(tls, pB) } + func decimalSubFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:454:13: */ var pA uintptr = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), 0, uintptr(0)) var pB uintptr = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), 0, uintptr(0)) @@ -26214,6 +26194,7 @@ func decimalSumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { decimal_add(tls, p, pArg) decimal_free(tls, pArg) } + func decimalSumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:501:13: */ var p uintptr var pArg uintptr @@ -26232,6 +26213,7 @@ func decimalSumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) decimal_add(tls, p, pArg) decimal_free(tls, pArg) } + func decimalSumValue(tls *libc.TLS, context uintptr) { /* decimal.c:517:13: */ var p uintptr = sqlite3.Xsqlite3_aggregate_context(tls, context, 0) if p == uintptr(0) { @@ -26239,6 +26221,7 @@ func decimalSumValue(tls *libc.TLS, context uintptr) { /* decimal.c:517:13: */ } decimal_result(tls, context, p) } + func decimalSumFinalize(tls *libc.TLS, context uintptr) { /* decimal.c:522:13: */ var p uintptr = sqlite3.Xsqlite3_aggregate_context(tls, context, 0) if p == uintptr(0) { @@ -34742,6 +34725,7 @@ func ieee754func_from_blob(tls *libc.TLS, context uintptr, argc int32, argv uint sqlite3.Xsqlite3_result_double(tls, context, *(*float64)(unsafe.Pointer(bp /* r */))) } } + func ieee754func_to_blob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* ieee754.c:225:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -38339,6 +38323,7 @@ func re_next_char(tls *libc.TLS, p uintptr) uint32 { /* regexp.c:147:17: */ } return c } + func re_next_char_nocase(tls *libc.TLS, p uintptr) uint32 { /* regexp.c:172:17: */ var c uint32 = re_next_char(tls, p) if (c >= uint32('A')) && (c <= uint32('Z')) { @@ -41378,6 +41363,7 @@ func editDist3ConfigClear(tls *libc.TLS, p uintptr) { /* spellfix.c:640:13: */ sqlite3.Xsqlite3_free(tls, (*EditDist3Config)(unsafe.Pointer(p)).Fa) libc.X__builtin___memset_chk(tls, p, 0, uint64(unsafe.Sizeof(EditDist3Config{})), libc.X__builtin_object_size(tls, p, 0)) } + func editDist3ConfigDelete(tls *libc.TLS, pIn uintptr) { /* spellfix.c:655:13: */ var p uintptr = pIn editDist3ConfigClear(tls, p) @@ -44869,9 +44855,11 @@ func spellfix1Uninit(tls *libc.TLS, isDestroy int32, pVTab uintptr) int32 { /* s } return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } + func spellfix1Disconnect(tls *libc.TLS, pVTab uintptr) int32 { /* spellfix.c:1994:12: */ return spellfix1Uninit(tls, 0, pVTab) } + func spellfix1Destroy(tls *libc.TLS, pVTab uintptr) int32 { /* spellfix.c:1997:12: */ return spellfix1Uninit(tls, 1, pVTab) } @@ -44986,6 +44974,7 @@ func spellfix1Init(tls *libc.TLS, isCreate int32, db uintptr, pAux uintptr, argc func spellfix1Connect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* spellfix.c:2133:12: */ return spellfix1Init(tls, 0, db, pAux, argc, argv, ppVTab, pzErr) } + func spellfix1Create(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* spellfix.c:2142:12: */ return spellfix1Init(tls, 1, db, pAux, argc, argv, ppVTab, pzErr) } @@ -50310,6 +50299,7 @@ func zipfileTableErr(tls *libc.TLS, pTab uintptr, zFmt uintptr, va uintptr) { /* (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) _ = ap } + func zipfileCursorErr(tls *libc.TLS, pCsr uintptr, zFmt uintptr, va uintptr) { /* zipfile.c:486:13: */ var ap va_list _ = ap @@ -53169,6 +53159,7 @@ func incrblobSeek(tls *libc.TLS, instanceData ClientData, offset int64, seekMode func incrblobWatch(tls *libc.TLS, instanceData ClientData, mode int32) { /* tclsqlite.c:355:27: */ // NO-OP } + func incrblobHandle(tls *libc.TLS, instanceData ClientData, dir int32, hPtr uintptr) int32 { /* tclsqlite.c:361:26: */ return 1 } @@ -58100,12 +58091,15 @@ func Sqlite3_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3877:12: } return rc } + func Tclsqlite3_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3891:12: */ return Sqlite3_Init(tls, interp) } + func Sqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3892:12: */ return 0 } + func Tclsqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3893:12: */ return 0 } @@ -58116,6 +58110,7 @@ func Tclsqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tc func Sqlite3_SafeInit(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3899:12: */ return 1 } + func Sqlite3_SafeUnload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3900:12: */ return 1 } @@ -58123,12 +58118,15 @@ func Sqlite3_SafeUnload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* t func Sqlite_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3905:5: */ return Sqlite3_Init(tls, interp) } + func Tclsqlite_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3906:5: */ return Sqlite3_Init(tls, interp) } + func Sqlite_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3907:5: */ return 0 } + func Tclsqlite_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3908:5: */ return 0 } @@ -60491,6 +60489,7 @@ func testHexToInt(tls *libc.TLS, h int32) int32 { /* test1.c:44:12: */ } return int32(0) } + func sqlite3TestTextToPtr(tls *libc.TLS, z uintptr) uintptr { /* test1.c:54:6: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -60811,6 +60810,7 @@ func db_enter(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv u sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* db */)))).Fmutex) return 0 } + func db_leave(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:396:26: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -61168,6 +61168,7 @@ func hex8Func(tls *libc.TLS, p uintptr, argc int32, argv uintptr) { /* test1.c:7 *(*int8)(unsafe.Pointer(bp + 8 /* &zBuf[0] */ + uintptr((i * 2)))) = int8(0) sqlite3.Xsqlite3_result_text(tls, p, bp+8 /* zBuf */, -1, libc.UintptrFromInt32(-1)) } + func hex16Func(tls *libc.TLS, p uintptr, argc int32, argv uintptr) { /* test1.c:760:13: */ bp := tls.Alloc(408) defer tls.Free(408) @@ -61534,6 +61535,7 @@ type t1CountCtx1 = struct{ Fn int32 } /* test1.c:1123:9 */ // is reported on the step function. If the total count is 42, then // a UTF-8 error is reported on the finalize function. type t1CountCtx = t1CountCtx1 /* test1.c:1123:27 */ + func t1CountStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test1.c:1127:13: */ bp := tls.Alloc(9) defer tls.Free(9) @@ -61553,6 +61555,7 @@ func t1CountStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* } } } + func t1CountFinalize(tls *libc.TLS, context uintptr) { /* test1.c:1149:13: */ var p uintptr p = sqlite3.Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(t1CountCtx{}))) @@ -62131,6 +62134,7 @@ type TestCollationX1 = struct { } /* test1.c:1715:1 */ type TestCollationX = TestCollationX1 /* test1.c:1720:31 */ + func testCreateCollationDel(tls *libc.TLS, pCtx uintptr) { /* test1.c:1721:13: */ var p uintptr = pCtx @@ -62151,6 +62155,7 @@ func testCreateCollationDel(tls *libc.TLS, pCtx uintptr) { /* test1.c:1721:13: * } sqlite3.Xsqlite3_free(tls, p) } + func testCreateCollationCmp(tls *libc.TLS, pCtx uintptr, nLeft int32, zLeft uintptr, nRight int32, zRight uintptr) int32 { /* test1.c:1733:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -62175,6 +62180,7 @@ func testCreateCollationCmp(tls *libc.TLS, pCtx uintptr, nLeft int32, zLeft uint return *(*int32)(unsafe.Pointer(bp /* iRes */)) } + func test_create_collation_v2(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1757:26: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -62240,12 +62246,16 @@ type CreateFunctionV21 = struct { // -final SCRIPT // -destroy SCRIPT type CreateFunctionV2 = CreateFunctionV21 /* test1.c:1804:33 */ + func cf2Func(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* test1.c:1812:13: */ } + func cf2Step(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* test1.c:1814:13: */ } + func cf2Final(tls *libc.TLS, ctx uintptr) { /* test1.c:1816:13: */ } + func cf2Destroy(tls *libc.TLS, pUser uintptr) { /* test1.c:1818:13: */ var p uintptr = pUser @@ -62286,6 +62296,7 @@ func cf2Destroy(tls *libc.TLS, pUser uintptr) { /* test1.c:1818:13: */ } sqlite3.Xsqlite3_free(tls, p) } + func test_create_function_v2(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1832:26: */ bp := tls.Alloc(180) defer tls.Free(180) @@ -63012,7 +63023,9 @@ func test_snapshot_cmp_blob(tls *libc.TLS, clientData uintptr, interp uintptr, o res = sqlite3.Xsqlite3_snapshot_cmp(tls, p1, p2) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, res)) return 0 -} // in test_delete.c +} + +// in test_delete.c func test_delete_database(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2581:26: */ var rc int32 var zFile uintptr @@ -63391,6 +63404,7 @@ func test_bind(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv // interp pointer to use when evaluating the TCL script is stored in // pTestCollateInterp. var pTestCollateInterp uintptr /* test1.c:2975:18: */ + func test_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintptr, nB int32, zB uintptr) int32 { /* test1.c:2976:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -63444,6 +63458,7 @@ func test_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintptr, nB int tcl.XTcl_GetIntFromObj(tls, i, tcl.XTcl_GetObjResult(tls, i), bp /* &res */) return *(*int32)(unsafe.Pointer(bp /* res */)) } + func test_collate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3026:26: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -63575,6 +63590,7 @@ func test_utf16bin_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintpt } return res } + func test_utf16bin_collate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3100:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -63691,6 +63707,7 @@ bad_args: // Both collating functions increment the unaligned utf16 counter // whenever they see a string that begins on an odd byte boundary. var unaligned_string_counter int32 = 0 /* test1.c:3192:12 */ + func alignmentCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* test1.c:3193:12: */ var rc int32 var n int32 @@ -63711,6 +63728,7 @@ func alignmentCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintpt } return rc } + func add_alignment_test_collations(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3208:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -63780,6 +63798,7 @@ func test_function_utf8(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function_utf16le(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3276:13: */ var interp uintptr var pX uintptr @@ -63802,6 +63821,7 @@ func test_function_utf16le(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr sqlite3.Xsqlite3_result_text(tls, pCtx, sqlite3.Xsqlite3_value_text(tls, pVal), -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function_utf16be(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3298:13: */ var interp uintptr var pX uintptr @@ -63829,6 +63849,7 @@ func test_function_utf16be(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3326:26: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -64102,6 +64123,7 @@ func test_intarray_addr(tls *libc.TLS, clientData uintptr, interp uintptr, objc } var p uintptr = uintptr(0) /* test1.c:3540:14 */ + // Usage: intarray_addr INT ... // // Return the address of a C-language array of 32-bit integers. @@ -64138,6 +64160,7 @@ func test_int64array_addr(tls *libc.TLS, clientData uintptr, interp uintptr, obj } var p1 uintptr = uintptr(0) /* test1.c:3574:24 */ + // Usage: doublearray_addr INT ... // // Return the address of a C-language array of doubles. @@ -64168,6 +64191,7 @@ func test_doublearray_addr(tls *libc.TLS, clientData uintptr, interp uintptr, ob } var p2 uintptr = uintptr(0) /* test1.c:3610:17 */ + // Usage: textarray_addr TEXT ... // // Return the address of a C-language array of strings. @@ -65485,6 +65509,7 @@ func test_sql(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, obj tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_sql(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))), uintptr(1)) return 0 } + func test_ex_sql(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4784:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -67192,6 +67217,7 @@ type LogCallback = struct { // tclcmd: test_sqlite3_log ?SCRIPT? var logcallback = LogCallback{} /* test1.c:6707:3 */ + func xLogcallback(tls *libc.TLS, unused uintptr, err int32, zMsg uintptr) { /* test1.c:6708:13: */ var pNew uintptr = tcl.XTcl_DuplicateObj(tls, logcallback.FpObj) (*Tcl_Obj)(unsafe.Pointer(pNew)).FrefCount++ @@ -67205,6 +67231,7 @@ func xLogcallback(tls *libc.TLS, unused uintptr, err int32, zMsg uintptr) { /* t } } } + func test_sqlite3_log(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6718:26: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -69642,6 +69669,7 @@ func testPendingByte(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, var faultSimInterp uintptr = uintptr(0) /* test2.c:580:19 */ var faultSimScriptSize int32 = 0 /* test2.c:581:12 */ var faultSimScript uintptr /* test2.c:582:13: */ + func faultSimCallback(tls *libc.TLS, x int32) int32 { /* test2.c:583:12: */ bp := tls.Alloc(38) defer tls.Free(38) @@ -72691,6 +72719,7 @@ func test_translate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int3 return 0 } + func test_translate_selftest(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test5.c:189:26: */ sqlite3.Xsqlite3UtfSelfTest(tls) return 0 @@ -72793,9 +72822,11 @@ var sqlite3CrashTestEnable int32 = 0 /* test6.c:161:12 */ func crash_malloc(tls *libc.TLS, nByte int32) uintptr { /* test6.c:163:13: */ return tcl.XTcl_AttemptAlloc(tls, uint32(size_t(nByte))) } + func crash_free(tls *libc.TLS, p uintptr) { /* test6.c:166:13: */ tcl.XTcl_Free(tls, p) } + func crash_realloc(tls *libc.TLS, p uintptr, n int32) uintptr { /* test6.c:169:13: */ return tcl.XTcl_AttemptRealloc(tls, p, uint32(size_t(n))) } @@ -73100,12 +73131,15 @@ func cfFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* test6.c: func cfLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test6.c:514:12: */ return sqlite3.Xsqlite3OsLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, eLock) } + func cfUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test6.c:517:12: */ return sqlite3.Xsqlite3OsUnlock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, eLock) } + func cfCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* test6.c:520:12: */ return sqlite3.Xsqlite3OsCheckReservedLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, pResOut) } + func cfFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* test6.c:523:12: */ if op == 5 { var pCrash uintptr = pFile @@ -73126,6 +73160,7 @@ func cfFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { func cfSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:542:12: */ return g.FiSectorSize } + func cfDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:545:12: */ return g.FiDeviceCharacteristics } @@ -73134,14 +73169,17 @@ func cfDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:54 func cfShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* test6.c:552:12: */ return sqlite3.Xsqlite3OsShmLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, ofst, n, flags) } + func cfShmBarrier(tls *libc.TLS, pFile uintptr) { /* test6.c:555:13: */ sqlite3.Xsqlite3OsShmBarrier(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile) } + func cfShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* test6.c:558:12: */ return sqlite3.Xsqlite3OsShmUnmap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, delFlag) } + func cfShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, sz int32, w int32, pp uintptr) int32 { /* test6.c:561:12: */ - return sqlite3.Xsqlite3OsShmMap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, iRegion, sz, w, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, iRegion, sz, w, libc.AtomicLoadUintptr(&pp)) } var CrashFileVtab = sqlite3_io_methods{ @@ -73247,42 +73285,52 @@ func cfDelete(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, dirSync int32) int32 var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pVfs + 48 /* &.xDelete */))))(tls, pVfs, zPath, dirSync) } + func cfAccess(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* test6.c:665:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 56 /* &.xAccess */))))(tls, pVfs, zPath, flags, pResOut) } + func cfFullPathname(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* test6.c:674:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 64 /* &.xFullPathname */))))(tls, pVfs, zPath, nPathOut, zPathOut) } + func cfDlOpen(tls *libc.TLS, pCfVfs uintptr, zPath uintptr) uintptr { /* test6.c:683:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 72 /* &.xDlOpen */))))(tls, pVfs, zPath) } + func cfDlError(tls *libc.TLS, pCfVfs uintptr, nByte int32, zErrMsg uintptr) { /* test6.c:687:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pVfs + 80 /* &.xDlError */))))(tls, pVfs, nByte, zErrMsg) } + func cfDlSym(tls *libc.TLS, pCfVfs uintptr, pH uintptr, zSym uintptr) uintptr { /* test6.c:691:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 88 /* &.xDlSym */))))(tls, pVfs, pH, zSym) } + func cfDlClose(tls *libc.TLS, pCfVfs uintptr, pHandle uintptr) { /* test6.c:695:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pVfs + 96 /* &.xDlClose */))))(tls, pVfs, pHandle) } + func cfRandomness(tls *libc.TLS, pCfVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* test6.c:699:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 104 /* &.xRandomness */))))(tls, pVfs, nByte, zBufOut) } + func cfSleep(tls *libc.TLS, pCfVfs uintptr, nMicro int32) int32 { /* test6.c:703:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pVfs + 112 /* &.xSleep */))))(tls, pVfs, nMicro) } + func cfCurrentTime(tls *libc.TLS, pCfVfs uintptr, pTimeOut uintptr) int32 { /* test6.c:707:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pVfs + 120 /* &.xCurrentTime */))))(tls, pVfs, pTimeOut) } + func cfGetLastError(tls *libc.TLS, pCfVfs uintptr, n int32, z uintptr) int32 { /* test6.c:711:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 128 /* &.xGetLastError */))))(tls, pVfs, n, z) @@ -75726,6 +75774,7 @@ func echoTransactionCall(tls *libc.TLS, tab uintptr, zCall uintptr) int32 { /* t sqlite3.Xsqlite3_free(tls, z) return 0 } + func echoBegin(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1111:12: */ var rc int32 var pVtab uintptr = tab @@ -75755,6 +75804,7 @@ func echoBegin(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1111:12: */ } return rc } + func echoSync(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1142:12: */ var rc int32 var pVtab uintptr = tab @@ -75781,6 +75831,7 @@ func echoSync(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1142:12: */ } return rc } + func echoCommit(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1170:12: */ var pVtab uintptr = tab var rc int32 @@ -75798,6 +75849,7 @@ func echoCommit(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1170:12: */ (*echo_vtab)(unsafe.Pointer(pVtab)).FinTransaction = 0 return rc } + func echoRollback(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1188:12: */ var rc int32 var pVtab uintptr = tab @@ -78598,9 +78650,11 @@ func demoFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* test_d func demoLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_demovfs.c:360:12: */ return 0 } + func demoUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_demovfs.c:363:12: */ return 0 } + func demoCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* test_demovfs.c:366:12: */ *(*int32)(unsafe.Pointer(pResOut)) = 0 return 0 @@ -78617,6 +78671,7 @@ func demoFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 func demoSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test_demovfs.c:383:12: */ return 0 } + func demoDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test_demovfs.c:386:12: */ return 0 } @@ -78802,13 +78857,16 @@ func demoFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32 func demoDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* test_demovfs.c:564:13: */ return uintptr(0) } + func demoDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* test_demovfs.c:567:13: */ sqlite3.Xsqlite3_snprintf(tls, nByte, zErrMsg, ts+29607 /* "Loadable extensi..." */, 0) *(*int8)(unsafe.Pointer(zErrMsg + uintptr((nByte - 1)))) = int8(0) } + func demoDlSym(tls *libc.TLS, pVfs uintptr, pH uintptr, z uintptr) uintptr { /* test_demovfs.c:571:13: */ return uintptr(0) } + func demoDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* test_demovfs.c:574:13: */ return } @@ -78900,6 +78958,7 @@ func register_demovfs(tls *libc.TLS, clientData ClientData, interp uintptr, objc sqlite3.Xsqlite3_vfs_register(tls, sqlite3_demovfs(tls), 1) return 0 } + func unregister_demovfs(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_demovfs.c:666:26: */ sqlite3.Xsqlite3_vfs_unregister(tls, sqlite3_demovfs(tls)) return 0 @@ -79021,14 +79080,17 @@ func devsymShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 var p uintptr = pFile return sqlite3.Xsqlite3OsShmLock(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, ofst, n, flags) } + func devsymShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* test_devsym.c:196:12: */ var p uintptr = pFile - return sqlite3.Xsqlite3OsShmMap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) } + func devsymShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_devsym.c:206:13: */ var p uintptr = pFile sqlite3.Xsqlite3OsShmBarrier(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal) } + func devsymShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* test_devsym.c:210:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsShmUnmap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, delFlag) @@ -80203,6 +80265,7 @@ var zSrc = *(*[79]uint8)(unsafe.Pointer(ts + 30103 /* "abcdefghijklmnop..." */)) // // WARNING: Not threadsafe. var test_destructor_count_var int32 = 0 /* test_func.c:91:12 */ + func destructor(tls *libc.TLS, p uintptr) { /* test_func.c:92:13: */ var zVal uintptr = p @@ -80210,6 +80273,7 @@ func destructor(tls *libc.TLS, p uintptr) { /* test_func.c:92:13: */ sqlite3.Xsqlite3_free(tls, zVal) test_destructor_count_var-- } + func test_destructor(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:99:13: */ var zVal uintptr var len int32 @@ -80230,6 +80294,7 @@ func test_destructor(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* libc.X__builtin___memcpy_chk(tls, zVal, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))), uint64(len), libc.X__builtin_object_size(tls, zVal, 0)) sqlite3.Xsqlite3_result_text(tls, pCtx, zVal, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{destructor}))) } + func test_destructor16(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:122:13: */ var zVal uintptr var len int32 @@ -80250,11 +80315,14 @@ func test_destructor16(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { libc.X__builtin___memcpy_chk(tls, zVal, sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))), uint64(len), libc.X__builtin_object_size(tls, zVal, 0)) sqlite3.Xsqlite3_result_text16(tls, pCtx, zVal, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{destructor}))) } + func test_destructor_count(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:145:13: */ sqlite3.Xsqlite3_result_int(tls, pCtx, test_destructor_count_var) } + func test_agg_errmsg16_step(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_func.c:165:13: */ } + func test_agg_errmsg16_final(tls *libc.TLS, ctx uintptr) { /* test_func.c:167:13: */ var z uintptr var db uintptr = sqlite3.Xsqlite3_context_db_handle(tls, ctx) @@ -80275,6 +80343,7 @@ func test_agg_errmsg16_final(tls *libc.TLS, ctx uintptr) { /* test_func.c:167:13 func free_test_auxdata(tls *libc.TLS, p uintptr) { /* test_func.c:188:13: */ sqlite3.Xsqlite3_free(tls, p) } + func test_auxdata(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:189:13: */ var i int32 var zRet uintptr = testContextMalloc(tls, pCtx, (nArg * 2)) @@ -80831,6 +80900,7 @@ func autoinstall_test_funcs(tls *libc.TLS, clientData uintptr, interp uintptr, o // A bogus step function and finalizer function. func tStep(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_func.c:736:13: */ } + func tFinal(tls *libc.TLS, a uintptr) { /* test_func.c:737:13: */ } @@ -81865,22 +81935,28 @@ func wrMemInit(tls *libc.TLS, pAppData uintptr) int32 { /* test_init.c:49:12: */ } return rc } + func wrMemShutdown(tls *libc.TLS, pAppData uintptr) { /* test_init.c:61:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 48 /* &.xShutdown */))))(tls, wrapped.Fmem.FpAppData) wrapped.Fmem_init = 0 } + func wrMemMalloc(tls *libc.TLS, n int32) uintptr { /* test_init.c:65:13: */ return (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ /* &.xMalloc */))))(tls, n) } + func wrMemFree(tls *libc.TLS, p uintptr) { /* test_init.c:66:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 8 /* &.xFree */))))(tls, p) } + func wrMemRealloc(tls *libc.TLS, p uintptr, n int32) uintptr { /* test_init.c:67:13: */ return (*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 16 /* &.xRealloc */))))(tls, p, n) } + func wrMemSize(tls *libc.TLS, p uintptr) int32 { /* test_init.c:68:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 24 /* &.xSize */))))(tls, p) } + func wrMemRoundup(tls *libc.TLS, n int32) int32 { /* test_init.c:69:12: */ return (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 32 /* &.xRoundup */))))(tls, n) } @@ -81897,29 +81973,37 @@ func wrMutexInit(tls *libc.TLS) int32 { /* test_init.c:72:12: */ } return rc } + func wrMutexEnd(tls *libc.TLS) int32 { /* test_init.c:84:12: */ (*(*func(*libc.TLS) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 8 /* &.xMutexEnd */))))(tls) wrapped.Fmutex_init = 0 return 0 } + func wrMutexAlloc(tls *libc.TLS, e int32) uintptr { /* test_init.c:89:22: */ return (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 16 /* &.xMutexAlloc */))))(tls, e) } + func wrMutexFree(tls *libc.TLS, p uintptr) { /* test_init.c:92:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 24 /* &.xMutexFree */))))(tls, p) } + func wrMutexEnter(tls *libc.TLS, p uintptr) { /* test_init.c:95:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 32 /* &.xMutexEnter */))))(tls, p) } + func wrMutexTry(tls *libc.TLS, p uintptr) int32 { /* test_init.c:98:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 40 /* &.xMutexTry */))))(tls, p) } + func wrMutexLeave(tls *libc.TLS, p uintptr) { /* test_init.c:101:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 48 /* &.xMutexLeave */))))(tls, p) } + func wrMutexHeld(tls *libc.TLS, p uintptr) int32 { /* test_init.c:104:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 56 /* &.xMutexHeld */))))(tls, p) } + func wrMutexNotheld(tls *libc.TLS, p uintptr) int32 { /* test_init.c:107:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 64 /* &.xMutexNotheld */))))(tls, p) } @@ -81936,6 +82020,7 @@ func wrPCacheInit(tls *libc.TLS, pArg uintptr) int32 { /* test_init.c:113:12: */ } return rc } + func wrPCacheShutdown(tls *libc.TLS, pArg uintptr) { /* test_init.c:125:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 24 /* &.xShutdown */))))(tls, wrapped.Fpcache.FpArg) wrapped.Fpcache_init = 0 @@ -81944,24 +82029,31 @@ func wrPCacheShutdown(tls *libc.TLS, pArg uintptr) { /* test_init.c:125:13: */ func wrPCacheCreate(tls *libc.TLS, a int32, b int32, c int32) uintptr { /* test_init.c:130:23: */ return (*(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 32 /* &.xCreate */))))(tls, a, b, c) } + func wrPCacheCachesize(tls *libc.TLS, p uintptr, n int32) { /* test_init.c:133:13: */ (*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 40 /* &.xCachesize */))))(tls, p, n) } + func wrPCachePagecount(tls *libc.TLS, p uintptr) int32 { /* test_init.c:136:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 48 /* &.xPagecount */))))(tls, p) } + func wrPCacheFetch(tls *libc.TLS, p uintptr, a uint32, b int32) uintptr { /* test_init.c:139:28: */ return (*(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 56 /* &.xFetch */))))(tls, p, a, b) } + func wrPCacheUnpin(tls *libc.TLS, p uintptr, a uintptr, b int32) { /* test_init.c:142:13: */ (*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 64 /* &.xUnpin */))))(tls, p, a, b) } + func wrPCacheRekey(tls *libc.TLS, p uintptr, a uintptr, b uint32, c uint32) { /* test_init.c:145:13: */ (*(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 72 /* &.xRekey */))))(tls, p, a, b, c) } + func wrPCacheTruncate(tls *libc.TLS, p uintptr, a uint32) { /* test_init.c:153:13: */ (*(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 80 /* &.xTruncate */))))(tls, p, a) } + func wrPCacheDestroy(tls *libc.TLS, p uintptr) { /* test_init.c:156:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 88 /* &.xDestroy */))))(tls, p) } @@ -82589,17 +82681,20 @@ var g2 = JtGlobal{} /* test_journal.c:207:24 */ func enterJtMutex(tls *libc.TLS) { /* test_journal.c:213:13: */ sqlite3.Xsqlite3_mutex_enter(tls, sqlite3.Xsqlite3_mutex_alloc(tls, 5)) } + func leaveJtMutex(tls *libc.TLS) { /* test_journal.c:216:13: */ sqlite3.Xsqlite3_mutex_leave(tls, sqlite3.Xsqlite3_mutex_alloc(tls, 5)) } + func stop_ioerr_simulation(tls *libc.TLS, piSave uintptr, piSave2 uintptr) { /* test_journal.c:222:13: */ - *(*int32)(unsafe.Pointer(piSave)) = sqlite3.Xsqlite3_io_error_pending + *(*int32)(unsafe.Pointer(piSave)) = libc.AtomicLoadInt32(&sqlite3.Xsqlite3_io_error_pending) *(*int32)(unsafe.Pointer(piSave2)) = sqlite3.Xsqlite3_io_error_hit - sqlite3.Xsqlite3_io_error_pending = -1 + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(-1)) sqlite3.Xsqlite3_io_error_hit = 0 } + func start_ioerr_simulation(tls *libc.TLS, iSave int32, iSave2 int32) { /* test_journal.c:228:13: */ - sqlite3.Xsqlite3_io_error_pending = iSave + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(iSave)) sqlite3.Xsqlite3_io_error_hit = iSave2 } @@ -83796,6 +83891,7 @@ func faultsimPending(tls *libc.TLS) int32 { /* test_malloc.c:160:12: */ func faultsimBeginBenign(tls *libc.TLS) { /* test_malloc.c:169:13: */ memfault.FisBenignMode++ } + func faultsimEndBenign(tls *libc.TLS) { /* test_malloc.c:172:13: */ memfault.FisBenignMode-- } @@ -83906,6 +84002,7 @@ __3: } var zHex = *(*[17]int8)(unsafe.Pointer(ts + 30213 /* "0123456789abcdef" */)) /* test_malloc.c:240:21 */ + func hexToInt(tls *libc.TLS, h int32) int32 { /* test_malloc.c:262:12: */ if (h >= '0') && (h <= '9') { return (h - '0') @@ -83916,6 +84013,7 @@ func hexToInt(tls *libc.TLS, h int32) int32 { /* test_malloc.c:262:12: */ } return int32(0) } + func textToPointer(tls *libc.TLS, z uintptr, pp uintptr) int32 { /* test_malloc.c:271:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -85761,6 +85859,7 @@ func md5step(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test } } } + func md5finalize(tls *libc.TLS, context uintptr) { /* test_md5.c:432:13: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -85775,6 +85874,7 @@ func md5finalize(tls *libc.TLS, context uintptr) { /* test_md5.c:432:13: */ MD5DigestToBase16(tls, bp /* &digest[0] */, bp+16 /* &zBuf[0] */) sqlite3.Xsqlite3_result_text(tls, context, bp+16 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) } + func Md5_Register(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pThunk uintptr) int32 { /* test_md5.c:441:5: */ var rc int32 = sqlite3.Xsqlite3_create_function(tls, db, ts+33622 /* "md5sum" */, -1, 1, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { @@ -86329,30 +86429,39 @@ func multiplexDelete(tls *libc.TLS, pVfs uintptr, zName uintptr, syncDir int32) func multiplexAccess(tls *libc.TLS, a uintptr, b uintptr, c int32, d uintptr) int32 { /* test_multiplex.c:656:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 56 /* &.xAccess */))))(tls, gMultiplex.FpOrigVfs, b, c, d) } + func multiplexFullPathname(tls *libc.TLS, a uintptr, b uintptr, c int32, d uintptr) int32 { /* test_multiplex.c:659:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 64 /* &.xFullPathname */))))(tls, gMultiplex.FpOrigVfs, b, c, d) } + func multiplexDlOpen(tls *libc.TLS, a uintptr, b uintptr) uintptr { /* test_multiplex.c:662:13: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((gMultiplex.FpOrigVfs + 72 /* &.xDlOpen */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexDlError(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_multiplex.c:665:13: */ (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((gMultiplex.FpOrigVfs + 80 /* &.xDlError */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexDlSym(tls *libc.TLS, a uintptr, b uintptr, c uintptr) uintptr { /* test_multiplex.c:668:13: */ return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((gMultiplex.FpOrigVfs + 88 /* &.xDlSym */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexDlClose(tls *libc.TLS, a uintptr, b uintptr) { /* test_multiplex.c:671:13: */ (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((gMultiplex.FpOrigVfs + 96 /* &.xDlClose */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexRandomness(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { /* test_multiplex.c:674:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 104 /* &.xRandomness */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexSleep(tls *libc.TLS, a uintptr, b int32) int32 { /* test_multiplex.c:677:12: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 112 /* &.xSleep */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexCurrentTime(tls *libc.TLS, a uintptr, b uintptr) int32 { /* test_multiplex.c:680:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 120 /* &.xCurrentTime */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexGetLastError(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { /* test_multiplex.c:683:12: */ if (*sqlite3_vfs)(unsafe.Pointer(gMultiplex.FpOrigVfs)).FxGetLastError != 0 { return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 128 /* &.xGetLastError */))))(tls, gMultiplex.FpOrigVfs, b, c) @@ -86361,6 +86470,7 @@ func multiplexGetLastError(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { } return int32(0) } + func multiplexCurrentTimeInt64(tls *libc.TLS, a uintptr, b uintptr) int32 { /* test_multiplex.c:690:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 136 /* &.xCurrentTimeInt64 */))))(tls, gMultiplex.FpOrigVfs, b) } @@ -86738,7 +86848,7 @@ func multiplexShmMap(tls *libc.TLS, pConn uintptr, iRegion int32, szRegion int32 var pSubOpen uintptr = multiplexSubOpen(tls, (*multiplexConn)(unsafe.Pointer(p)).FpGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen != 0 { - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 104 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 104 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, libc.AtomicLoadUintptr(&pp)) } return 10 } @@ -90476,16 +90586,18 @@ func vfslogShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 25, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } + func vfslogShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* test_osinst.c:442:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) - rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 104 /* &.xShmMap */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 104 /* &.xShmMap */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 23, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } + func vfslogShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_osinst.c:458:13: */ var t sqlite3_uint64 var p uintptr = pFile @@ -90494,6 +90606,7 @@ func vfslogShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_osinst.c:458:13: * t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 26, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), 0, 0, 0) } + func vfslogShmUnmap(tls *libc.TLS, pFile uintptr, deleteFlag int32) int32 { /* test_osinst.c:466:12: */ var rc int32 var t sqlite3_uint64 @@ -90602,17 +90715,18 @@ func vfslogCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* func vfslogGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* test_osinst.c:610:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 128 /* &.xGetLastError */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, a, b) } + func vfslogCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* test_osinst.c:613:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 136 /* &.xCurrentTimeInt64 */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, p) } func vfslog_flush(tls *libc.TLS, p uintptr) { /* test_osinst.c:617:13: */ - var pending int32 = sqlite3.Xsqlite3_io_error_pending + var pending int32 = libc.AtomicLoadInt32(&sqlite3.Xsqlite3_io_error_pending) var persist int32 = sqlite3.Xsqlite3_io_error_persist var diskfull int32 = sqlite3.Xsqlite3_diskfull_pending - sqlite3.Xsqlite3_io_error_pending = 0 + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(0)) sqlite3.Xsqlite3_io_error_persist = 0 sqlite3.Xsqlite3_diskfull_pending = 0 @@ -90622,7 +90736,7 @@ func vfslog_flush(tls *libc.TLS, p uintptr) { /* test_osinst.c:617:13: */ (*VfslogVfs)(unsafe.Pointer(p)).FnBuf = 0 } - sqlite3.Xsqlite3_io_error_pending = pending + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(pending)) sqlite3.Xsqlite3_io_error_persist = persist sqlite3.Xsqlite3_diskfull_pending = diskfull } @@ -92629,6 +92743,7 @@ var gQuota struct { func quotaEnter(tls *libc.TLS) { /* test_quota.c:190:13: */ sqlite3.Xsqlite3_mutex_enter(tls, gQuota.FpMutex) } + func quotaLeave(tls *libc.TLS) { /* test_quota.c:191:13: */ sqlite3.Xsqlite3_mutex_leave(tls, gQuota.FpMutex) } @@ -93095,7 +93210,7 @@ func quotaDeviceCharacteristics(tls *libc.TLS, pConn uintptr) int32 { /* test_qu // Pass xShmMap requests through to the original VFS unchanged. func quotaShmMap(tls *libc.TLS, pConn uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* test_quota.c:700:12: */ var pSubOpen uintptr = quotaSubOpen(tls, pConn) - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 104 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 104 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, libc.AtomicLoadUintptr(&pp)) } // Pass xShmLock requests through to the original VFS unchanged. @@ -96143,6 +96258,7 @@ func sqlite3_client_open(tls *libc.TLS, zDatabaseName uintptr, ppDb uintptr) int *(*uintptr)(unsafe.Pointer(ppDb)) = (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FpDb return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_prepare(tls *libc.TLS, pDb uintptr, zSql uintptr, nByte int32, ppStmt uintptr, pzTail uintptr) int32 { /* test_server.c:340:5: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -96160,6 +96276,7 @@ func sqlite3_client_prepare(tls *libc.TLS, pDb uintptr, zSql uintptr, nByte int3 } return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_step(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c:357:5: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -96171,6 +96288,7 @@ func sqlite3_client_step(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c: sendToServer(tls, bp /* &msg */) return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_reset(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c:364:5: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -96182,6 +96300,7 @@ func sqlite3_client_reset(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c sendToServer(tls, bp /* &msg */) return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c:371:5: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -96193,6 +96312,7 @@ func sqlite3_client_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* test_serve sendToServer(tls, bp /* &msg */) return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_close(tls *libc.TLS, pDb uintptr) int32 { /* test_server.c:378:5: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -96899,7 +97019,7 @@ func superlockWalLock(tls *libc.TLS, db uintptr, pBusy uintptr) int32 { /* test_ if rc != 0 { return rc } - libc.X__builtin___memset_chk(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* p */)), 0, uint64(32), libc.X__builtin_object_size(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* p */)), 0)) + libc.X__builtin___memset_chk(tls, libc.AtomicLoadPUintptr(bp+8 /* p */), 0, uint64(32), libc.X__builtin_object_size(tls, libc.AtomicLoadPUintptr(bp+8 /* p */), 0)) // Obtain exclusive locks on all the "read-lock" slots. Once these locks // are held, it is guaranteed that there are no active reader, writer or @@ -98255,6 +98375,7 @@ func tclvarConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uin } var zSchema = *(*[100]int8)(unsafe.Pointer(ts + 36399 /* "CREATE TABLE x( ..." */)) /* test_tclvar.c:88:21 */ + // Note that for this virtual table, the xCreate and xConnect // methods are identical. @@ -99552,6 +99673,7 @@ func tvfsInjectIoerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:269:12: */ func tvfsInjectFullerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:273:12: */ return tvfsInjectFault(tls, (p + 72 /* &.full_err */)) } + func tvfsInjectCantopenerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:276:12: */ return tvfsInjectFault(tls, (p + 84 /* &.cantopen_err */)) } @@ -100158,7 +100280,7 @@ func tvfsShmMap(tls *libc.TLS, pFile uintptr, iPage int32, pgsz int32, isWrite i var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if (*Testvfs)(unsafe.Pointer(p)).FisFullshm != 0 { - return sqlite3.Xsqlite3OsShmMap(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, iPage, pgsz, isWrite, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, iPage, pgsz, isWrite, libc.AtomicLoadUintptr(&pp)) } if uintptr(0) == (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm { @@ -100191,7 +100313,7 @@ func tvfsShmMap(tls *libc.TLS, pFile uintptr, iPage int32, pgsz int32, isWrite i tvfsAllocPage(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm, iPage, pgsz) } if (*(*int32)(unsafe.Pointer(bp /* rc */)) == 0) || (*(*int32)(unsafe.Pointer(bp /* rc */)) == 8) { - *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer(((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm + 16 /* &.aPage */) + uintptr(iPage)*8)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer(((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm + 16 /* &.aPage */) + uintptr(iPage)*8)) } return *(*int32)(unsafe.Pointer(bp /* rc */)) @@ -101177,11 +101299,11 @@ func test_vfs_set_readmark(tls *libc.TLS, clientData uintptr, interp uintptr, ob tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return 1 } - if *(*uintptr)(unsafe.Pointer(bp + 40 /* pShm */)) == uintptr(0) { + if libc.AtomicLoadPUintptr(bp+40 /* pShm */) == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+38220 /* "*-shm is not yet..." */, 0)) return 1 } - aShm = *(*uintptr)(unsafe.Pointer(bp + 40 /* pShm */)) + aShm = libc.AtomicLoadPUintptr(bp + 40 /* pShm */) iOff = (((12 * 2) + 1) + *(*int32)(unsafe.Pointer(bp + 24 /* iSlot */))) if objc == 5 { @@ -101329,6 +101451,7 @@ func doTestWindowFinalize(tls *libc.TLS, bValue int32, ctx uintptr) { /* test_wi func testWindowStep(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* test_window.c:107:13: */ doTestWindowStep(tls, 0, ctx, nArg, apArg) } + func testWindowInverse(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* test_window.c:114:13: */ doTestWindowStep(tls, 1, ctx, nArg, apArg) } @@ -101336,6 +101459,7 @@ func testWindowInverse(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { func testWindowFinal(tls *libc.TLS, ctx uintptr) { /* test_window.c:122:13: */ doTestWindowFinalize(tls, 0, ctx) } + func testWindowValue(tls *libc.TLS, ctx uintptr) { /* test_window.c:125:13: */ doTestWindowFinalize(tls, 1, ctx) } diff --git a/internal/testfixture/testfixture_linux_386.go b/internal/testfixture/testfixture_linux_386.go index 7507b9b..b62815d 100644 --- a/internal/testfixture/testfixture_linux_386.go +++ b/internal/testfixture/testfixture_linux_386.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DTCLSH_INIT_PROC=sqlite3TestInit -D_HAVE_SQLITE_CONFIG_H -I/usr/include/tcl8.6 -export-defines "" -export-fields F -trace-translation-units -lmodernc.org/tcl/lib,modernc.org/sqlite/internal/libc2,modernc.org/sqlite/lib -o internal/testfixture/testfixture_linux_386.go -Itestdata/sqlite-src-3330000/ext/async -Itestdata/sqlite-src-3330000/ext/fts3 -Itestdata/sqlite-src-3330000/ext/icu -Itestdata/sqlite-src-3330000/ext/rtree -Itestdata/sqlite-src-3330000/ext/session -Itestdata/sqlite-src-3330000/ext/userauth -Itestdata/sqlite-src-3330000/src -Itestdata/sqlite-amalgamation-3330000 -Itestdata/sqlite-src-3330000 testdata/sqlite-src-3330000/ext/expert/sqlite3expert.c testdata/sqlite-src-3330000/ext/expert/test_expert.c testdata/sqlite-src-3330000/ext/fts3/fts3_term.c testdata/sqlite-src-3330000/ext/fts3/fts3_test.c testdata/sqlite-src-3330000/ext/fts5/fts5_tcl.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_mi.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_tok.c testdata/sqlite-src-3330000/ext/misc/amatch.c testdata/sqlite-src-3330000/ext/misc/carray.c testdata/sqlite-src-3330000/ext/misc/closure.c testdata/sqlite-src-3330000/ext/misc/csv.c testdata/sqlite-src-3330000/ext/misc/decimal.c testdata/sqlite-src-3330000/ext/misc/eval.c testdata/sqlite-src-3330000/ext/misc/explain.c testdata/sqlite-src-3330000/ext/misc/fileio.c testdata/sqlite-src-3330000/ext/misc/fuzzer.c testdata/sqlite-src-3330000/ext/misc/ieee754.c testdata/sqlite-src-3330000/ext/misc/mmapwarm.c testdata/sqlite-src-3330000/ext/misc/nextchar.c testdata/sqlite-src-3330000/ext/misc/normalize.c testdata/sqlite-src-3330000/ext/misc/percentile.c testdata/sqlite-src-3330000/ext/misc/prefixes.c testdata/sqlite-src-3330000/ext/misc/regexp.c testdata/sqlite-src-3330000/ext/misc/remember.c testdata/sqlite-src-3330000/ext/misc/series.c testdata/sqlite-src-3330000/ext/misc/spellfix.c testdata/sqlite-src-3330000/ext/misc/totype.c testdata/sqlite-src-3330000/ext/misc/unionvtab.c testdata/sqlite-src-3330000/ext/misc/wholenumber.c testdata/sqlite-src-3330000/ext/misc/zipfile.c testdata/sqlite-src-3330000/ext/rbu/test_rbu.c testdata/sqlite-src-3330000/ext/userauth/userauth.c testdata/sqlite-src-3330000/src/tclsqlite.c testdata/sqlite-src-3330000/src/test1.c testdata/sqlite-src-3330000/src/test2.c testdata/sqlite-src-3330000/src/test3.c testdata/sqlite-src-3330000/src/test4.c testdata/sqlite-src-3330000/src/test5.c testdata/sqlite-src-3330000/src/test6.c testdata/sqlite-src-3330000/src/test7.c testdata/sqlite-src-3330000/src/test8.c testdata/sqlite-src-3330000/src/test9.c testdata/sqlite-src-3330000/src/test_async.c testdata/sqlite-src-3330000/src/test_autoext.c testdata/sqlite-src-3330000/src/test_backup.c testdata/sqlite-src-3330000/src/test_bestindex.c testdata/sqlite-src-3330000/src/test_blob.c testdata/sqlite-src-3330000/src/test_btree.c testdata/sqlite-src-3330000/src/test_config.c testdata/sqlite-src-3330000/src/test_delete.c testdata/sqlite-src-3330000/src/test_demovfs.c testdata/sqlite-src-3330000/src/test_devsym.c testdata/sqlite-src-3330000/src/test_fs.c testdata/sqlite-src-3330000/src/test_func.c testdata/sqlite-src-3330000/src/test_hexio.c testdata/sqlite-src-3330000/src/test_init.c testdata/sqlite-src-3330000/src/test_intarray.c testdata/sqlite-src-3330000/src/test_journal.c testdata/sqlite-src-3330000/src/test_malloc.c testdata/sqlite-src-3330000/src/test_md5.c testdata/sqlite-src-3330000/src/test_multiplex.c testdata/sqlite-src-3330000/src/test_mutex.c testdata/sqlite-src-3330000/src/test_onefile.c testdata/sqlite-src-3330000/src/test_osinst.c testdata/sqlite-src-3330000/src/test_pcache.c testdata/sqlite-src-3330000/src/test_quota.c testdata/sqlite-src-3330000/src/test_rtree.c testdata/sqlite-src-3330000/src/test_schema.c testdata/sqlite-src-3330000/src/test_server.c testdata/sqlite-src-3330000/src/test_superlock.c testdata/sqlite-src-3330000/src/test_syscall.c testdata/sqlite-src-3330000/src/test_tclsh.c testdata/sqlite-src-3330000/src/test_tclvar.c testdata/sqlite-src-3330000/src/test_thread.c testdata/sqlite-src-3330000/src/test_vdbecov.c testdata/sqlite-src-3330000/src/test_vfs.c testdata/sqlite-src-3330000/src/test_windirent.c testdata/sqlite-src-3330000/src/test_window.c testdata/sqlite-src-3330000/src/test_wsd.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DTCLSH_INIT_PROC=sqlite3TestInit -D_HAVE_SQLITE_CONFIG_H -I/usr/include/tcl8.6 -export-defines "" -export-fields F -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count -lmodernc.org/tcl/lib,modernc.org/sqlite/internal/libc2,modernc.org/sqlite/lib -o internal/testfixture/testfixture_linux_386.go -Itestdata/sqlite-src-3330000/ext/async -Itestdata/sqlite-src-3330000/ext/fts3 -Itestdata/sqlite-src-3330000/ext/icu -Itestdata/sqlite-src-3330000/ext/rtree -Itestdata/sqlite-src-3330000/ext/session -Itestdata/sqlite-src-3330000/ext/userauth -Itestdata/sqlite-src-3330000/src -Itestdata/sqlite-amalgamation-3330000 -Itestdata/sqlite-src-3330000 testdata/sqlite-src-3330000/ext/expert/sqlite3expert.c testdata/sqlite-src-3330000/ext/expert/test_expert.c testdata/sqlite-src-3330000/ext/fts3/fts3_term.c testdata/sqlite-src-3330000/ext/fts3/fts3_test.c testdata/sqlite-src-3330000/ext/fts5/fts5_tcl.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_mi.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_tok.c testdata/sqlite-src-3330000/ext/misc/amatch.c testdata/sqlite-src-3330000/ext/misc/carray.c testdata/sqlite-src-3330000/ext/misc/closure.c testdata/sqlite-src-3330000/ext/misc/csv.c testdata/sqlite-src-3330000/ext/misc/decimal.c testdata/sqlite-src-3330000/ext/misc/eval.c testdata/sqlite-src-3330000/ext/misc/explain.c testdata/sqlite-src-3330000/ext/misc/fileio.c testdata/sqlite-src-3330000/ext/misc/fuzzer.c testdata/sqlite-src-3330000/ext/misc/ieee754.c testdata/sqlite-src-3330000/ext/misc/mmapwarm.c testdata/sqlite-src-3330000/ext/misc/nextchar.c testdata/sqlite-src-3330000/ext/misc/normalize.c testdata/sqlite-src-3330000/ext/misc/percentile.c testdata/sqlite-src-3330000/ext/misc/prefixes.c testdata/sqlite-src-3330000/ext/misc/regexp.c testdata/sqlite-src-3330000/ext/misc/remember.c testdata/sqlite-src-3330000/ext/misc/series.c testdata/sqlite-src-3330000/ext/misc/spellfix.c testdata/sqlite-src-3330000/ext/misc/totype.c testdata/sqlite-src-3330000/ext/misc/unionvtab.c testdata/sqlite-src-3330000/ext/misc/wholenumber.c testdata/sqlite-src-3330000/ext/misc/zipfile.c testdata/sqlite-src-3330000/ext/rbu/test_rbu.c testdata/sqlite-src-3330000/ext/userauth/userauth.c testdata/sqlite-src-3330000/src/tclsqlite.c testdata/sqlite-src-3330000/src/test1.c testdata/sqlite-src-3330000/src/test2.c testdata/sqlite-src-3330000/src/test3.c testdata/sqlite-src-3330000/src/test4.c testdata/sqlite-src-3330000/src/test5.c testdata/sqlite-src-3330000/src/test6.c testdata/sqlite-src-3330000/src/test7.c testdata/sqlite-src-3330000/src/test8.c testdata/sqlite-src-3330000/src/test9.c testdata/sqlite-src-3330000/src/test_async.c testdata/sqlite-src-3330000/src/test_autoext.c testdata/sqlite-src-3330000/src/test_backup.c testdata/sqlite-src-3330000/src/test_bestindex.c testdata/sqlite-src-3330000/src/test_blob.c testdata/sqlite-src-3330000/src/test_btree.c testdata/sqlite-src-3330000/src/test_config.c testdata/sqlite-src-3330000/src/test_delete.c testdata/sqlite-src-3330000/src/test_demovfs.c testdata/sqlite-src-3330000/src/test_devsym.c testdata/sqlite-src-3330000/src/test_fs.c testdata/sqlite-src-3330000/src/test_func.c testdata/sqlite-src-3330000/src/test_hexio.c testdata/sqlite-src-3330000/src/test_init.c testdata/sqlite-src-3330000/src/test_intarray.c testdata/sqlite-src-3330000/src/test_journal.c testdata/sqlite-src-3330000/src/test_malloc.c testdata/sqlite-src-3330000/src/test_md5.c testdata/sqlite-src-3330000/src/test_multiplex.c testdata/sqlite-src-3330000/src/test_mutex.c testdata/sqlite-src-3330000/src/test_onefile.c testdata/sqlite-src-3330000/src/test_osinst.c testdata/sqlite-src-3330000/src/test_pcache.c testdata/sqlite-src-3330000/src/test_quota.c testdata/sqlite-src-3330000/src/test_rtree.c testdata/sqlite-src-3330000/src/test_schema.c testdata/sqlite-src-3330000/src/test_server.c testdata/sqlite-src-3330000/src/test_superlock.c testdata/sqlite-src-3330000/src/test_syscall.c testdata/sqlite-src-3330000/src/test_tclsh.c testdata/sqlite-src-3330000/src/test_tclvar.c testdata/sqlite-src-3330000/src/test_thread.c testdata/sqlite-src-3330000/src/test_vdbecov.c testdata/sqlite-src-3330000/src/test_vfs.c testdata/sqlite-src-3330000/src/test_windirent.c testdata/sqlite-src-3330000/src/test_window.c testdata/sqlite-src-3330000/src/test_wsd.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -15,6 +16,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -3532,9 +3534,15 @@ const ( /* resource.h:187:1: */ PRIO_USER = 2 ) -// Convenience macros for operations on timevals. -// NOTE: `timercmp' does not work for >= or <=. +// end block for C++ +// Local Variables: +// mode: c +// c-basic-offset: 4 +// fill-column: 78 +// End: + +// Needed for the setrlimit() system call on unix // Copyright (C) 1992-2018 Free Software Foundation, Inc. // This file is part of the GNU C Library. // @@ -3891,6 +3899,9 @@ const ( /* waitflags.h:52:1: */ P_PGID = 2 ) +// If we are compiling with optimizing read this file. It contains +// several optimizing inline functions and macros. + // Copyright (C) 1991-2018 Free Software Foundation, Inc. // This file is part of the GNU C Library. // @@ -7788,6 +7799,7 @@ var expertModule = sqlite3_module{ FxShadowName:// xRollbackTo uintptr(0), // xShadowName } /* sqlite3expert.c:623:25 */ + // // End of virtual table implementation. // @@ -15451,6 +15463,7 @@ func amatchStrcpy(tls *libc.TLS, dest uintptr, src uintptr) { /* amatch.c:1005:1 for (int32(libc.AssignPtrInt8(libc.PostIncUintptr(&dest, 1), *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&src, 1)))))) != 0 { } } + func amatchStrcat(tls *libc.TLS, dest uintptr, src uintptr) { /* amatch.c:1008:13: */ for *(*int8)(unsafe.Pointer(dest)) != 0 { dest++ @@ -18909,6 +18922,7 @@ func decimalAddFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { decimal_free(tls, pA) decimal_free(tls, pB) } + func decimalSubFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:454:13: */ var pA uintptr = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*4)), 0, uintptr(0)) var pB uintptr = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*4)), 0, uintptr(0)) @@ -18953,6 +18967,7 @@ func decimalSumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { decimal_add(tls, p, pArg) decimal_free(tls, pArg) } + func decimalSumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:501:13: */ var p uintptr var pArg uintptr @@ -18971,6 +18986,7 @@ func decimalSumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) decimal_add(tls, p, pArg) decimal_free(tls, pArg) } + func decimalSumValue(tls *libc.TLS, context uintptr) { /* decimal.c:517:13: */ var p uintptr = sqlite3.Xsqlite3_aggregate_context(tls, context, 0) if p == uintptr(0) { @@ -18978,6 +18994,7 @@ func decimalSumValue(tls *libc.TLS, context uintptr) { /* decimal.c:517:13: */ } decimal_result(tls, context, p) } + func decimalSumFinalize(tls *libc.TLS, context uintptr) { /* decimal.c:522:13: */ var p uintptr = sqlite3.Xsqlite3_aggregate_context(tls, context, 0) if p == uintptr(0) { @@ -22453,6 +22470,7 @@ func ieee754func_from_blob(tls *libc.TLS, context uintptr, argc int32, argv uint sqlite3.Xsqlite3_result_double(tls, context, *(*float64)(unsafe.Pointer(bp /* r */))) } } + func ieee754func_to_blob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* ieee754.c:225:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -24277,6 +24295,7 @@ func re_next_char(tls *libc.TLS, p uintptr) uint32 { /* regexp.c:147:17: */ } return c } + func re_next_char_nocase(tls *libc.TLS, p uintptr) uint32 { /* regexp.c:172:17: */ var c uint32 = re_next_char(tls, p) if (c >= uint32('A')) && (c <= uint32('Z')) { @@ -26630,6 +26649,7 @@ func editDist3ConfigClear(tls *libc.TLS, p uintptr) { /* spellfix.c:640:13: */ sqlite3.Xsqlite3_free(tls, (*EditDist3Config)(unsafe.Pointer(p)).Fa) libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(EditDist3Config{}))) } + func editDist3ConfigDelete(tls *libc.TLS, pIn uintptr) { /* spellfix.c:655:13: */ var p uintptr = pIn editDist3ConfigClear(tls, p) @@ -30121,9 +30141,11 @@ func spellfix1Uninit(tls *libc.TLS, isDestroy int32, pVTab uintptr) int32 { /* s } return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } + func spellfix1Disconnect(tls *libc.TLS, pVTab uintptr) int32 { /* spellfix.c:1994:12: */ return spellfix1Uninit(tls, 0, pVTab) } + func spellfix1Destroy(tls *libc.TLS, pVTab uintptr) int32 { /* spellfix.c:1997:12: */ return spellfix1Uninit(tls, 1, pVTab) } @@ -30238,6 +30260,7 @@ func spellfix1Init(tls *libc.TLS, isCreate int32, db uintptr, pAux uintptr, argc func spellfix1Connect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* spellfix.c:2133:12: */ return spellfix1Init(tls, 0, db, pAux, argc, argv, ppVTab, pzErr) } + func spellfix1Create(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* spellfix.c:2142:12: */ return spellfix1Init(tls, 1, db, pAux, argc, argv, ppVTab, pzErr) } @@ -34487,6 +34510,7 @@ func zipfileTableErr(tls *libc.TLS, pTab uintptr, zFmt uintptr, va uintptr) { /* (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) _ = ap } + func zipfileCursorErr(tls *libc.TLS, pCsr uintptr, zFmt uintptr, va uintptr) { /* zipfile.c:486:13: */ var ap va_list _ = ap @@ -38172,6 +38196,7 @@ func incrblobSeek(tls *libc.TLS, instanceData ClientData, offset int32, seekMode func incrblobWatch(tls *libc.TLS, instanceData ClientData, mode int32) { /* tclsqlite.c:355:27: */ // NO-OP } + func incrblobHandle(tls *libc.TLS, instanceData ClientData, dir int32, hPtr uintptr) int32 { /* tclsqlite.c:361:26: */ return 1 } @@ -43161,12 +43186,15 @@ func Sqlite3_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3877:12: } return rc } + func Tclsqlite3_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3891:12: */ return Sqlite3_Init(tls, interp) } + func Sqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3892:12: */ return 0 } + func Tclsqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3893:12: */ return 0 } @@ -43177,6 +43205,7 @@ func Tclsqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tc func Sqlite3_SafeInit(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3899:12: */ return 1 } + func Sqlite3_SafeUnload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3900:12: */ return 1 } @@ -43184,12 +43213,15 @@ func Sqlite3_SafeUnload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* t func Sqlite_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3905:5: */ return Sqlite3_Init(tls, interp) } + func Tclsqlite_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3906:5: */ return Sqlite3_Init(tls, interp) } + func Sqlite_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3907:5: */ return 0 } + func Tclsqlite_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3908:5: */ return 0 } @@ -45425,6 +45457,7 @@ func testHexToInt(tls *libc.TLS, h int32) int32 { /* test1.c:44:12: */ } return int32(0) } + func sqlite3TestTextToPtr(tls *libc.TLS, z uintptr) uintptr { /* test1.c:54:6: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -45745,6 +45778,7 @@ func db_enter(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv u sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* db */)))).Fmutex) return 0 } + func db_leave(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:396:26: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -46102,6 +46136,7 @@ func hex8Func(tls *libc.TLS, p uintptr, argc int32, argv uintptr) { /* test1.c:7 *(*int8)(unsafe.Pointer(bp + 8 /* &zBuf[0] */ + uintptr((i * 2)))) = int8(0) sqlite3.Xsqlite3_result_text(tls, p, bp+8 /* zBuf */, -1, libc.UintptrFromInt32(-1)) } + func hex16Func(tls *libc.TLS, p uintptr, argc int32, argv uintptr) { /* test1.c:760:13: */ bp := tls.Alloc(408) defer tls.Free(408) @@ -46468,6 +46503,7 @@ type t1CountCtx1 = struct{ Fn int32 } /* test1.c:1123:9 */ // is reported on the step function. If the total count is 42, then // a UTF-8 error is reported on the finalize function. type t1CountCtx = t1CountCtx1 /* test1.c:1123:27 */ + func t1CountStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test1.c:1127:13: */ bp := tls.Alloc(9) defer tls.Free(9) @@ -46487,6 +46523,7 @@ func t1CountStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* } } } + func t1CountFinalize(tls *libc.TLS, context uintptr) { /* test1.c:1149:13: */ var p uintptr p = sqlite3.Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(t1CountCtx{}))) @@ -47065,6 +47102,7 @@ type TestCollationX1 = struct { } /* test1.c:1715:1 */ type TestCollationX = TestCollationX1 /* test1.c:1720:31 */ + func testCreateCollationDel(tls *libc.TLS, pCtx uintptr) { /* test1.c:1721:13: */ var p uintptr = pCtx @@ -47087,6 +47125,7 @@ func testCreateCollationDel(tls *libc.TLS, pCtx uintptr) { /* test1.c:1721:13: * } sqlite3.Xsqlite3_free(tls, p) } + func testCreateCollationCmp(tls *libc.TLS, pCtx uintptr, nLeft int32, zLeft uintptr, nRight int32, zRight uintptr) int32 { /* test1.c:1733:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -47112,6 +47151,7 @@ func testCreateCollationCmp(tls *libc.TLS, pCtx uintptr, nLeft int32, zLeft uint return *(*int32)(unsafe.Pointer(bp /* iRes */)) } + func test_create_collation_v2(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1757:26: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -47177,12 +47217,16 @@ type CreateFunctionV21 = struct { // -final SCRIPT // -destroy SCRIPT type CreateFunctionV2 = CreateFunctionV21 /* test1.c:1804:33 */ + func cf2Func(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* test1.c:1812:13: */ } + func cf2Step(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* test1.c:1814:13: */ } + func cf2Final(tls *libc.TLS, ctx uintptr) { /* test1.c:1816:13: */ } + func cf2Destroy(tls *libc.TLS, pUser uintptr) { /* test1.c:1818:13: */ var p uintptr = pUser @@ -47227,6 +47271,7 @@ func cf2Destroy(tls *libc.TLS, pUser uintptr) { /* test1.c:1818:13: */ } sqlite3.Xsqlite3_free(tls, p) } + func test_create_function_v2(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1832:26: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -47949,7 +47994,9 @@ func test_snapshot_cmp_blob(tls *libc.TLS, clientData uintptr, interp uintptr, o res = sqlite3.Xsqlite3_snapshot_cmp(tls, p1, p2) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, res)) return 0 -} // in test_delete.c +} + +// in test_delete.c func test_delete_database(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2581:26: */ var rc int32 var zFile uintptr @@ -48328,6 +48375,7 @@ func test_bind(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv // interp pointer to use when evaluating the TCL script is stored in // pTestCollateInterp. var pTestCollateInterp uintptr /* test1.c:2975:18: */ + func test_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintptr, nB int32, zB uintptr) int32 { /* test1.c:2976:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -48382,6 +48430,7 @@ func test_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintptr, nB int tcl.XTcl_GetIntFromObj(tls, i, tcl.XTcl_GetObjResult(tls, i), bp /* &res */) return *(*int32)(unsafe.Pointer(bp /* res */)) } + func test_collate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3026:26: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -48513,6 +48562,7 @@ func test_utf16bin_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintpt } return res } + func test_utf16bin_collate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3100:26: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -48629,6 +48679,7 @@ bad_args: // Both collating functions increment the unaligned utf16 counter // whenever they see a string that begins on an odd byte boundary. var unaligned_string_counter int32 = 0 /* test1.c:3192:12 */ + func alignmentCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* test1.c:3193:12: */ var rc int32 var n int32 @@ -48649,6 +48700,7 @@ func alignmentCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintpt } return rc } + func add_alignment_test_collations(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3208:26: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -48719,6 +48771,7 @@ func test_function_utf8(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function_utf16le(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3276:13: */ var interp uintptr var pX uintptr @@ -48742,6 +48795,7 @@ func test_function_utf16le(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr sqlite3.Xsqlite3_result_text(tls, pCtx, sqlite3.Xsqlite3_value_text(tls, pVal), -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function_utf16be(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3298:13: */ var interp uintptr var pX uintptr @@ -48770,6 +48824,7 @@ func test_function_utf16be(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3326:26: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -49043,6 +49098,7 @@ func test_intarray_addr(tls *libc.TLS, clientData uintptr, interp uintptr, objc } var p uintptr = uintptr(0) /* test1.c:3540:14 */ + // Usage: intarray_addr INT ... // // Return the address of a C-language array of 32-bit integers. @@ -49079,6 +49135,7 @@ func test_int64array_addr(tls *libc.TLS, clientData uintptr, interp uintptr, obj } var p1 uintptr = uintptr(0) /* test1.c:3574:24 */ + // Usage: doublearray_addr INT ... // // Return the address of a C-language array of doubles. @@ -49109,6 +49166,7 @@ func test_doublearray_addr(tls *libc.TLS, clientData uintptr, interp uintptr, ob } var p2 uintptr = uintptr(0) /* test1.c:3610:17 */ + // Usage: textarray_addr TEXT ... // // Return the address of a C-language array of strings. @@ -50427,6 +50485,7 @@ func test_sql(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, obj tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_sql(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))), uintptr(1)) return 0 } + func test_ex_sql(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4784:26: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -52095,6 +52154,7 @@ type LogCallback = struct { // tclcmd: test_sqlite3_log ?SCRIPT? var logcallback = LogCallback{} /* test1.c:6707:3 */ + func xLogcallback(tls *libc.TLS, unused uintptr, err int32, zMsg uintptr) { /* test1.c:6708:13: */ var pNew uintptr = tcl.XTcl_DuplicateObj(tls, logcallback.FpObj) (*Tcl_Obj)(unsafe.Pointer(pNew)).FrefCount++ @@ -52109,6 +52169,7 @@ func xLogcallback(tls *libc.TLS, unused uintptr, err int32, zMsg uintptr) { /* t } } } + func test_sqlite3_log(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6718:26: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -54560,6 +54621,7 @@ func testPendingByte(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, var faultSimInterp uintptr = uintptr(0) /* test2.c:580:19 */ var faultSimScriptSize int32 = 0 /* test2.c:581:12 */ var faultSimScript uintptr /* test2.c:582:13: */ + func faultSimCallback(tls *libc.TLS, x int32) int32 { /* test2.c:583:12: */ bp := tls.Alloc(38) defer tls.Free(38) @@ -57696,6 +57758,7 @@ func test_translate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int3 return 0 } + func test_translate_selftest(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test5.c:189:26: */ sqlite3.Xsqlite3UtfSelfTest(tls) return 0 @@ -57795,9 +57858,11 @@ var sqlite3CrashTestEnable int32 = 0 /* test6.c:161:12 */ func crash_malloc(tls *libc.TLS, nByte int32) uintptr { /* test6.c:163:13: */ return tcl.XTcl_AttemptAlloc(tls, size_t(nByte)) } + func crash_free(tls *libc.TLS, p uintptr) { /* test6.c:166:13: */ tcl.XTcl_Free(tls, p) } + func crash_realloc(tls *libc.TLS, p uintptr, n int32) uintptr { /* test6.c:169:13: */ return tcl.XTcl_AttemptRealloc(tls, p, size_t(n)) } @@ -58102,12 +58167,15 @@ func cfFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* test6.c: func cfLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test6.c:514:12: */ return sqlite3.Xsqlite3OsLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, eLock) } + func cfUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test6.c:517:12: */ return sqlite3.Xsqlite3OsUnlock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, eLock) } + func cfCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* test6.c:520:12: */ return sqlite3.Xsqlite3OsCheckReservedLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, pResOut) } + func cfFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* test6.c:523:12: */ if op == 5 { var pCrash uintptr = pFile @@ -58128,6 +58196,7 @@ func cfFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { func cfSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:542:12: */ return g.FiSectorSize } + func cfDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:545:12: */ return g.FiDeviceCharacteristics } @@ -58136,14 +58205,17 @@ func cfDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:54 func cfShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* test6.c:552:12: */ return sqlite3.Xsqlite3OsShmLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, ofst, n, flags) } + func cfShmBarrier(tls *libc.TLS, pFile uintptr) { /* test6.c:555:13: */ sqlite3.Xsqlite3OsShmBarrier(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile) } + func cfShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* test6.c:558:12: */ return sqlite3.Xsqlite3OsShmUnmap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, delFlag) } + func cfShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, sz int32, w int32, pp uintptr) int32 { /* test6.c:561:12: */ - return sqlite3.Xsqlite3OsShmMap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, iRegion, sz, w, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, iRegion, sz, w, libc.AtomicLoadUintptr(&pp)) } var CrashFileVtab = sqlite3_io_methods{ @@ -58249,42 +58321,52 @@ func cfDelete(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, dirSync int32) int32 var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pVfs + 28 /* &.xDelete */))))(tls, pVfs, zPath, dirSync) } + func cfAccess(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* test6.c:665:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 32 /* &.xAccess */))))(tls, pVfs, zPath, flags, pResOut) } + func cfFullPathname(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* test6.c:674:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 36 /* &.xFullPathname */))))(tls, pVfs, zPath, nPathOut, zPathOut) } + func cfDlOpen(tls *libc.TLS, pCfVfs uintptr, zPath uintptr) uintptr { /* test6.c:683:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 40 /* &.xDlOpen */))))(tls, pVfs, zPath) } + func cfDlError(tls *libc.TLS, pCfVfs uintptr, nByte int32, zErrMsg uintptr) { /* test6.c:687:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pVfs + 44 /* &.xDlError */))))(tls, pVfs, nByte, zErrMsg) } + func cfDlSym(tls *libc.TLS, pCfVfs uintptr, pH uintptr, zSym uintptr) uintptr { /* test6.c:691:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 48 /* &.xDlSym */))))(tls, pVfs, pH, zSym) } + func cfDlClose(tls *libc.TLS, pCfVfs uintptr, pHandle uintptr) { /* test6.c:695:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pVfs + 52 /* &.xDlClose */))))(tls, pVfs, pHandle) } + func cfRandomness(tls *libc.TLS, pCfVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* test6.c:699:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 56 /* &.xRandomness */))))(tls, pVfs, nByte, zBufOut) } + func cfSleep(tls *libc.TLS, pCfVfs uintptr, nMicro int32) int32 { /* test6.c:703:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pVfs + 60 /* &.xSleep */))))(tls, pVfs, nMicro) } + func cfCurrentTime(tls *libc.TLS, pCfVfs uintptr, pTimeOut uintptr) int32 { /* test6.c:707:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pVfs + 64 /* &.xCurrentTime */))))(tls, pVfs, pTimeOut) } + func cfGetLastError(tls *libc.TLS, pCfVfs uintptr, n int32, z uintptr) int32 { /* test6.c:711:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 68 /* &.xGetLastError */))))(tls, pVfs, n, z) @@ -60585,6 +60667,7 @@ func echoTransactionCall(tls *libc.TLS, tab uintptr, zCall uintptr) int32 { /* t sqlite3.Xsqlite3_free(tls, z) return 0 } + func echoBegin(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1111:12: */ var rc int32 var pVtab uintptr = tab @@ -60614,6 +60697,7 @@ func echoBegin(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1111:12: */ } return rc } + func echoSync(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1142:12: */ var rc int32 var pVtab uintptr = tab @@ -60640,6 +60724,7 @@ func echoSync(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1142:12: */ } return rc } + func echoCommit(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1170:12: */ var pVtab uintptr = tab var rc int32 @@ -60657,6 +60742,7 @@ func echoCommit(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1170:12: */ (*echo_vtab)(unsafe.Pointer(pVtab)).FinTransaction = 0 return rc } + func echoRollback(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1188:12: */ var rc int32 var pVtab uintptr = tab @@ -63145,9 +63231,11 @@ func demoFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* test_d func demoLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_demovfs.c:360:12: */ return 0 } + func demoUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_demovfs.c:363:12: */ return 0 } + func demoCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* test_demovfs.c:366:12: */ *(*int32)(unsafe.Pointer(pResOut)) = 0 return 0 @@ -63164,6 +63252,7 @@ func demoFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 func demoSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test_demovfs.c:383:12: */ return 0 } + func demoDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test_demovfs.c:386:12: */ return 0 } @@ -63349,13 +63438,16 @@ func demoFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32 func demoDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* test_demovfs.c:564:13: */ return uintptr(0) } + func demoDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* test_demovfs.c:567:13: */ sqlite3.Xsqlite3_snprintf(tls, nByte, zErrMsg, ts+29503 /* "Loadable extensi..." */, 0) *(*int8)(unsafe.Pointer(zErrMsg + uintptr((nByte - 1)))) = int8(0) } + func demoDlSym(tls *libc.TLS, pVfs uintptr, pH uintptr, z uintptr) uintptr { /* test_demovfs.c:571:13: */ return uintptr(0) } + func demoDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* test_demovfs.c:574:13: */ return } @@ -63450,6 +63542,7 @@ func register_demovfs(tls *libc.TLS, clientData ClientData, interp uintptr, objc sqlite3.Xsqlite3_vfs_register(tls, sqlite3_demovfs(tls), 1) return 0 } + func unregister_demovfs(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_demovfs.c:666:26: */ sqlite3.Xsqlite3_vfs_unregister(tls, sqlite3_demovfs(tls)) return 0 @@ -63576,14 +63669,17 @@ func devsymShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 var p uintptr = pFile return sqlite3.Xsqlite3OsShmLock(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, ofst, n, flags) } + func devsymShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* test_devsym.c:196:12: */ var p uintptr = pFile - return sqlite3.Xsqlite3OsShmMap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) } + func devsymShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_devsym.c:206:13: */ var p uintptr = pFile sqlite3.Xsqlite3OsShmBarrier(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal) } + func devsymShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* test_devsym.c:210:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsShmUnmap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, delFlag) @@ -65109,6 +65205,7 @@ var zSrc = *(*[79]uint8)(unsafe.Pointer(ts + 29999 /* "abcdefghijklmnop..." */)) // // WARNING: Not threadsafe. var test_destructor_count_var int32 = 0 /* test_func.c:91:12 */ + func destructor(tls *libc.TLS, p uintptr) { /* test_func.c:92:13: */ var zVal uintptr = p @@ -65116,6 +65213,7 @@ func destructor(tls *libc.TLS, p uintptr) { /* test_func.c:92:13: */ sqlite3.Xsqlite3_free(tls, zVal) test_destructor_count_var-- } + func test_destructor(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:99:13: */ var zVal uintptr var len int32 @@ -65136,6 +65234,7 @@ func test_destructor(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* libc.Xmemcpy(tls, zVal, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*4))), uint32(len)) sqlite3.Xsqlite3_result_text(tls, pCtx, zVal, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{destructor}))) } + func test_destructor16(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:122:13: */ var zVal uintptr var len int32 @@ -65156,11 +65255,14 @@ func test_destructor16(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { libc.Xmemcpy(tls, zVal, sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*4))), uint32(len)) sqlite3.Xsqlite3_result_text16(tls, pCtx, zVal, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{destructor}))) } + func test_destructor_count(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:145:13: */ sqlite3.Xsqlite3_result_int(tls, pCtx, test_destructor_count_var) } + func test_agg_errmsg16_step(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_func.c:165:13: */ } + func test_agg_errmsg16_final(tls *libc.TLS, ctx uintptr) { /* test_func.c:167:13: */ var z uintptr var db uintptr = sqlite3.Xsqlite3_context_db_handle(tls, ctx) @@ -65181,6 +65283,7 @@ func test_agg_errmsg16_final(tls *libc.TLS, ctx uintptr) { /* test_func.c:167:13 func free_test_auxdata(tls *libc.TLS, p uintptr) { /* test_func.c:188:13: */ sqlite3.Xsqlite3_free(tls, p) } + func test_auxdata(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:189:13: */ var i int32 var zRet uintptr = testContextMalloc(tls, pCtx, (nArg * 2)) @@ -65738,6 +65841,7 @@ func autoinstall_test_funcs(tls *libc.TLS, clientData uintptr, interp uintptr, o // A bogus step function and finalizer function. func tStep(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_func.c:736:13: */ } + func tFinal(tls *libc.TLS, a uintptr) { /* test_func.c:737:13: */ } @@ -66650,22 +66754,28 @@ func wrMemInit(tls *libc.TLS, pAppData uintptr) int32 { /* test_init.c:49:12: */ } return rc } + func wrMemShutdown(tls *libc.TLS, pAppData uintptr) { /* test_init.c:61:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ + 24 /* &.xShutdown */))))(tls, wrapped.Fmem.FpAppData) wrapped.Fmem_init = 0 } + func wrMemMalloc(tls *libc.TLS, n int32) uintptr { /* test_init.c:65:13: */ return (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ /* &.xMalloc */))))(tls, n) } + func wrMemFree(tls *libc.TLS, p uintptr) { /* test_init.c:66:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ + 4 /* &.xFree */))))(tls, p) } + func wrMemRealloc(tls *libc.TLS, p uintptr, n int32) uintptr { /* test_init.c:67:13: */ return (*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ + 8 /* &.xRealloc */))))(tls, p, n) } + func wrMemSize(tls *libc.TLS, p uintptr) int32 { /* test_init.c:68:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ + 12 /* &.xSize */))))(tls, p) } + func wrMemRoundup(tls *libc.TLS, n int32) int32 { /* test_init.c:69:12: */ return (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ + 16 /* &.xRoundup */))))(tls, n) } @@ -66682,29 +66792,37 @@ func wrMutexInit(tls *libc.TLS) int32 { /* test_init.c:72:12: */ } return rc } + func wrMutexEnd(tls *libc.TLS) int32 { /* test_init.c:84:12: */ (*(*func(*libc.TLS) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 4 /* &.xMutexEnd */))))(tls) wrapped.Fmutex_init = 0 return 0 } + func wrMutexAlloc(tls *libc.TLS, e int32) uintptr { /* test_init.c:89:22: */ return (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 8 /* &.xMutexAlloc */))))(tls, e) } + func wrMutexFree(tls *libc.TLS, p uintptr) { /* test_init.c:92:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 12 /* &.xMutexFree */))))(tls, p) } + func wrMutexEnter(tls *libc.TLS, p uintptr) { /* test_init.c:95:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 16 /* &.xMutexEnter */))))(tls, p) } + func wrMutexTry(tls *libc.TLS, p uintptr) int32 { /* test_init.c:98:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 20 /* &.xMutexTry */))))(tls, p) } + func wrMutexLeave(tls *libc.TLS, p uintptr) { /* test_init.c:101:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 24 /* &.xMutexLeave */))))(tls, p) } + func wrMutexHeld(tls *libc.TLS, p uintptr) int32 { /* test_init.c:104:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 28 /* &.xMutexHeld */))))(tls, p) } + func wrMutexNotheld(tls *libc.TLS, p uintptr) int32 { /* test_init.c:107:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 32 /* &.xMutexNotheld */))))(tls, p) } @@ -66721,6 +66839,7 @@ func wrPCacheInit(tls *libc.TLS, pArg uintptr) int32 { /* test_init.c:113:12: */ } return rc } + func wrPCacheShutdown(tls *libc.TLS, pArg uintptr) { /* test_init.c:125:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 12 /* &.xShutdown */))))(tls, wrapped.Fpcache.FpArg) wrapped.Fpcache_init = 0 @@ -66729,24 +66848,31 @@ func wrPCacheShutdown(tls *libc.TLS, pArg uintptr) { /* test_init.c:125:13: */ func wrPCacheCreate(tls *libc.TLS, a int32, b int32, c int32) uintptr { /* test_init.c:130:23: */ return (*(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 16 /* &.xCreate */))))(tls, a, b, c) } + func wrPCacheCachesize(tls *libc.TLS, p uintptr, n int32) { /* test_init.c:133:13: */ (*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 20 /* &.xCachesize */))))(tls, p, n) } + func wrPCachePagecount(tls *libc.TLS, p uintptr) int32 { /* test_init.c:136:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 24 /* &.xPagecount */))))(tls, p) } + func wrPCacheFetch(tls *libc.TLS, p uintptr, a uint32, b int32) uintptr { /* test_init.c:139:28: */ return (*(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 28 /* &.xFetch */))))(tls, p, a, b) } + func wrPCacheUnpin(tls *libc.TLS, p uintptr, a uintptr, b int32) { /* test_init.c:142:13: */ (*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 32 /* &.xUnpin */))))(tls, p, a, b) } + func wrPCacheRekey(tls *libc.TLS, p uintptr, a uintptr, b uint32, c uint32) { /* test_init.c:145:13: */ (*(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 36 /* &.xRekey */))))(tls, p, a, b, c) } + func wrPCacheTruncate(tls *libc.TLS, p uintptr, a uint32) { /* test_init.c:153:13: */ (*(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 40 /* &.xTruncate */))))(tls, p, a) } + func wrPCacheDestroy(tls *libc.TLS, p uintptr) { /* test_init.c:156:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 44 /* &.xDestroy */))))(tls, p) } @@ -67371,17 +67497,20 @@ var g2 = JtGlobal{} /* test_journal.c:207:24 */ func enterJtMutex(tls *libc.TLS) { /* test_journal.c:213:13: */ sqlite3.Xsqlite3_mutex_enter(tls, sqlite3.Xsqlite3_mutex_alloc(tls, 5)) } + func leaveJtMutex(tls *libc.TLS) { /* test_journal.c:216:13: */ sqlite3.Xsqlite3_mutex_leave(tls, sqlite3.Xsqlite3_mutex_alloc(tls, 5)) } + func stop_ioerr_simulation(tls *libc.TLS, piSave uintptr, piSave2 uintptr) { /* test_journal.c:222:13: */ - *(*int32)(unsafe.Pointer(piSave)) = sqlite3.Xsqlite3_io_error_pending + *(*int32)(unsafe.Pointer(piSave)) = libc.AtomicLoadInt32(&sqlite3.Xsqlite3_io_error_pending) *(*int32)(unsafe.Pointer(piSave2)) = sqlite3.Xsqlite3_io_error_hit - sqlite3.Xsqlite3_io_error_pending = -1 + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(-1)) sqlite3.Xsqlite3_io_error_hit = 0 } + func start_ioerr_simulation(tls *libc.TLS, iSave int32, iSave2 int32) { /* test_journal.c:228:13: */ - sqlite3.Xsqlite3_io_error_pending = iSave + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(iSave)) sqlite3.Xsqlite3_io_error_hit = iSave2 } @@ -68321,6 +68450,7 @@ func faultsimPending(tls *libc.TLS) int32 { /* test_malloc.c:160:12: */ func faultsimBeginBenign(tls *libc.TLS) { /* test_malloc.c:169:13: */ memfault.FisBenignMode++ } + func faultsimEndBenign(tls *libc.TLS) { /* test_malloc.c:172:13: */ memfault.FisBenignMode-- } @@ -68426,6 +68556,7 @@ __3: } var zHex = *(*[17]int8)(unsafe.Pointer(ts + 30109 /* "0123456789abcdef" */)) /* test_malloc.c:240:21 */ + func hexToInt(tls *libc.TLS, h int32) int32 { /* test_malloc.c:262:12: */ if (h >= '0') && (h <= '9') { return (h - '0') @@ -68436,6 +68567,7 @@ func hexToInt(tls *libc.TLS, h int32) int32 { /* test_malloc.c:262:12: */ } return int32(0) } + func textToPointer(tls *libc.TLS, z uintptr, pp uintptr) int32 { /* test_malloc.c:271:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -70279,6 +70411,7 @@ func md5step(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test } } } + func md5finalize(tls *libc.TLS, context uintptr) { /* test_md5.c:432:13: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -70293,6 +70426,7 @@ func md5finalize(tls *libc.TLS, context uintptr) { /* test_md5.c:432:13: */ MD5DigestToBase16(tls, bp /* &digest[0] */, bp+16 /* &zBuf[0] */) sqlite3.Xsqlite3_result_text(tls, context, bp+16 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) } + func Md5_Register(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pThunk uintptr) int32 { /* test_md5.c:441:5: */ var rc int32 = sqlite3.Xsqlite3_create_function(tls, db, ts+33518 /* "md5sum" */, -1, 1, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { @@ -70845,30 +70979,39 @@ func multiplexDelete(tls *libc.TLS, pVfs uintptr, zName uintptr, syncDir int32) func multiplexAccess(tls *libc.TLS, a uintptr, b uintptr, c int32, d uintptr) int32 { /* test_multiplex.c:656:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 32 /* &.xAccess */))))(tls, gMultiplex.FpOrigVfs, b, c, d) } + func multiplexFullPathname(tls *libc.TLS, a uintptr, b uintptr, c int32, d uintptr) int32 { /* test_multiplex.c:659:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 36 /* &.xFullPathname */))))(tls, gMultiplex.FpOrigVfs, b, c, d) } + func multiplexDlOpen(tls *libc.TLS, a uintptr, b uintptr) uintptr { /* test_multiplex.c:662:13: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((gMultiplex.FpOrigVfs + 40 /* &.xDlOpen */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexDlError(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_multiplex.c:665:13: */ (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((gMultiplex.FpOrigVfs + 44 /* &.xDlError */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexDlSym(tls *libc.TLS, a uintptr, b uintptr, c uintptr) uintptr { /* test_multiplex.c:668:13: */ return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((gMultiplex.FpOrigVfs + 48 /* &.xDlSym */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexDlClose(tls *libc.TLS, a uintptr, b uintptr) { /* test_multiplex.c:671:13: */ (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((gMultiplex.FpOrigVfs + 52 /* &.xDlClose */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexRandomness(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { /* test_multiplex.c:674:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 56 /* &.xRandomness */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexSleep(tls *libc.TLS, a uintptr, b int32) int32 { /* test_multiplex.c:677:12: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 60 /* &.xSleep */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexCurrentTime(tls *libc.TLS, a uintptr, b uintptr) int32 { /* test_multiplex.c:680:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 64 /* &.xCurrentTime */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexGetLastError(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { /* test_multiplex.c:683:12: */ if (*sqlite3_vfs)(unsafe.Pointer(gMultiplex.FpOrigVfs)).FxGetLastError != 0 { return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 68 /* &.xGetLastError */))))(tls, gMultiplex.FpOrigVfs, b, c) @@ -70877,6 +71020,7 @@ func multiplexGetLastError(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { } return int32(0) } + func multiplexCurrentTimeInt64(tls *libc.TLS, a uintptr, b uintptr) int32 { /* test_multiplex.c:690:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 72 /* &.xCurrentTimeInt64 */))))(tls, gMultiplex.FpOrigVfs, b) } @@ -71254,7 +71398,7 @@ func multiplexShmMap(tls *libc.TLS, pConn uintptr, iRegion int32, szRegion int32 var pSubOpen uintptr = multiplexSubOpen(tls, (*multiplexConn)(unsafe.Pointer(p)).FpGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen != 0 { - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 52 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 52 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, libc.AtomicLoadUintptr(&pp)) } return 10 } @@ -73527,16 +73671,18 @@ func vfslogShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 25, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } + func vfslogShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* test_osinst.c:442:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) - rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 52 /* &.xShmMap */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 52 /* &.xShmMap */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 23, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } + func vfslogShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_osinst.c:458:13: */ var t sqlite3_uint64 var p uintptr = pFile @@ -73545,6 +73691,7 @@ func vfslogShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_osinst.c:458:13: * t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 26, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), 0, 0, 0) } + func vfslogShmUnmap(tls *libc.TLS, pFile uintptr, deleteFlag int32) int32 { /* test_osinst.c:466:12: */ var rc int32 var t sqlite3_uint64 @@ -73653,17 +73800,18 @@ func vfslogCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* func vfslogGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* test_osinst.c:610:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 68 /* &.xGetLastError */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, a, b) } + func vfslogCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* test_osinst.c:613:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 72 /* &.xCurrentTimeInt64 */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, p) } func vfslog_flush(tls *libc.TLS, p uintptr) { /* test_osinst.c:617:13: */ - var pending int32 = sqlite3.Xsqlite3_io_error_pending + var pending int32 = libc.AtomicLoadInt32(&sqlite3.Xsqlite3_io_error_pending) var persist int32 = sqlite3.Xsqlite3_io_error_persist var diskfull int32 = sqlite3.Xsqlite3_diskfull_pending - sqlite3.Xsqlite3_io_error_pending = 0 + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(0)) sqlite3.Xsqlite3_io_error_persist = 0 sqlite3.Xsqlite3_diskfull_pending = 0 @@ -73673,7 +73821,7 @@ func vfslog_flush(tls *libc.TLS, p uintptr) { /* test_osinst.c:617:13: */ (*VfslogVfs)(unsafe.Pointer(p)).FnBuf = 0 } - sqlite3.Xsqlite3_io_error_pending = pending + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(pending)) sqlite3.Xsqlite3_io_error_persist = persist sqlite3.Xsqlite3_diskfull_pending = diskfull } @@ -74891,6 +75039,7 @@ var gQuota struct { func quotaEnter(tls *libc.TLS) { /* test_quota.c:190:13: */ sqlite3.Xsqlite3_mutex_enter(tls, gQuota.FpMutex) } + func quotaLeave(tls *libc.TLS) { /* test_quota.c:191:13: */ sqlite3.Xsqlite3_mutex_leave(tls, gQuota.FpMutex) } @@ -75357,7 +75506,7 @@ func quotaDeviceCharacteristics(tls *libc.TLS, pConn uintptr) int32 { /* test_qu // Pass xShmMap requests through to the original VFS unchanged. func quotaShmMap(tls *libc.TLS, pConn uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* test_quota.c:700:12: */ var pSubOpen uintptr = quotaSubOpen(tls, pConn) - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 52 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 52 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, libc.AtomicLoadUintptr(&pp)) } // Pass xShmLock requests through to the original VFS unchanged. @@ -78025,6 +78174,7 @@ func sqlite3_client_open(tls *libc.TLS, zDatabaseName uintptr, ppDb uintptr) int *(*uintptr)(unsafe.Pointer(ppDb)) = (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FpDb return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_prepare(tls *libc.TLS, pDb uintptr, zSql uintptr, nByte int32, ppStmt uintptr, pzTail uintptr) int32 { /* test_server.c:340:5: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -78042,6 +78192,7 @@ func sqlite3_client_prepare(tls *libc.TLS, pDb uintptr, zSql uintptr, nByte int3 } return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_step(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c:357:5: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -78053,6 +78204,7 @@ func sqlite3_client_step(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c: sendToServer(tls, bp /* &msg */) return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_reset(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c:364:5: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -78064,6 +78216,7 @@ func sqlite3_client_reset(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c sendToServer(tls, bp /* &msg */) return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c:371:5: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -78075,6 +78228,7 @@ func sqlite3_client_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* test_serve sendToServer(tls, bp /* &msg */) return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_close(tls *libc.TLS, pDb uintptr) int32 { /* test_server.c:378:5: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -78384,7 +78538,7 @@ func superlockWalLock(tls *libc.TLS, db uintptr, pBusy uintptr) int32 { /* test_ if rc != 0 { return rc } - libc.Xmemset(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* p */)), 0, uint32(32)) + libc.Xmemset(tls, libc.AtomicLoadPUintptr(bp+4 /* p */), 0, uint32(32)) // Obtain exclusive locks on all the "read-lock" slots. Once these locks // are held, it is guaranteed that there are no active reader, writer or @@ -79581,6 +79735,7 @@ func tclvarConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uin } var zSchema = *(*[100]int8)(unsafe.Pointer(ts + 36295 /* "CREATE TABLE x( ..." */)) /* test_tclvar.c:88:21 */ + // Note that for this virtual table, the xCreate and xConnect // methods are identical. @@ -80884,6 +81039,7 @@ func tvfsInjectIoerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:269:12: */ func tvfsInjectFullerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:273:12: */ return tvfsInjectFault(tls, (p + 48 /* &.full_err */)) } + func tvfsInjectCantopenerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:276:12: */ return tvfsInjectFault(tls, (p + 60 /* &.cantopen_err */)) } @@ -81491,7 +81647,7 @@ func tvfsShmMap(tls *libc.TLS, pFile uintptr, iPage int32, pgsz int32, isWrite i var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if (*Testvfs)(unsafe.Pointer(p)).FisFullshm != 0 { - return sqlite3.Xsqlite3OsShmMap(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, iPage, pgsz, isWrite, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, iPage, pgsz, isWrite, libc.AtomicLoadUintptr(&pp)) } if uintptr(0) == (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm { @@ -81525,7 +81681,7 @@ func tvfsShmMap(tls *libc.TLS, pFile uintptr, iPage int32, pgsz int32, isWrite i tvfsAllocPage(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm, iPage, pgsz) } if (*(*int32)(unsafe.Pointer(bp /* rc */)) == 0) || (*(*int32)(unsafe.Pointer(bp /* rc */)) == 8) { - *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer(((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm + 8 /* &.aPage */) + uintptr(iPage)*4)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer(((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm + 8 /* &.aPage */) + uintptr(iPage)*4)) } return *(*int32)(unsafe.Pointer(bp /* rc */)) @@ -82491,11 +82647,11 @@ func test_vfs_set_readmark(tls *libc.TLS, clientData uintptr, interp uintptr, ob tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return 1 } - if *(*uintptr)(unsafe.Pointer(bp + 32 /* pShm */)) == uintptr(0) { + if libc.AtomicLoadPUintptr(bp+32 /* pShm */) == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+38116 /* "*-shm is not yet..." */, 0)) return 1 } - aShm = *(*uintptr)(unsafe.Pointer(bp + 32 /* pShm */)) + aShm = libc.AtomicLoadPUintptr(bp + 32 /* pShm */) iOff = (((12 * 2) + 1) + *(*int32)(unsafe.Pointer(bp + 20 /* iSlot */))) if objc == 5 { @@ -82647,6 +82803,7 @@ func doTestWindowFinalize(tls *libc.TLS, bValue int32, ctx uintptr) { /* test_wi func testWindowStep(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* test_window.c:107:13: */ doTestWindowStep(tls, 0, ctx, nArg, apArg) } + func testWindowInverse(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* test_window.c:114:13: */ doTestWindowStep(tls, 1, ctx, nArg, apArg) } @@ -82654,6 +82811,7 @@ func testWindowInverse(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { func testWindowFinal(tls *libc.TLS, ctx uintptr) { /* test_window.c:122:13: */ doTestWindowFinalize(tls, 0, ctx) } + func testWindowValue(tls *libc.TLS, ctx uintptr) { /* test_window.c:125:13: */ doTestWindowFinalize(tls, 1, ctx) } diff --git a/internal/testfixture/testfixture_linux_amd64.go b/internal/testfixture/testfixture_linux_amd64.go index 78da992..97bd635 100644 --- a/internal/testfixture/testfixture_linux_amd64.go +++ b/internal/testfixture/testfixture_linux_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DTCLSH_INIT_PROC=sqlite3TestInit -D_HAVE_SQLITE_CONFIG_H -I/usr/include/tcl8.6 -export-defines "" -export-fields F -trace-translation-units -lmodernc.org/tcl/lib,modernc.org/sqlite/internal/libc2,modernc.org/sqlite/lib -o internal/testfixture/testfixture_linux_amd64.go -Itestdata/sqlite-src-3330000/ext/async -Itestdata/sqlite-src-3330000/ext/fts3 -Itestdata/sqlite-src-3330000/ext/icu -Itestdata/sqlite-src-3330000/ext/rtree -Itestdata/sqlite-src-3330000/ext/session -Itestdata/sqlite-src-3330000/ext/userauth -Itestdata/sqlite-src-3330000/src -Itestdata/sqlite-amalgamation-3330000 -Itestdata/sqlite-src-3330000 testdata/sqlite-src-3330000/ext/expert/sqlite3expert.c testdata/sqlite-src-3330000/ext/expert/test_expert.c testdata/sqlite-src-3330000/ext/fts3/fts3_term.c testdata/sqlite-src-3330000/ext/fts3/fts3_test.c testdata/sqlite-src-3330000/ext/fts5/fts5_tcl.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_mi.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_tok.c testdata/sqlite-src-3330000/ext/misc/amatch.c testdata/sqlite-src-3330000/ext/misc/carray.c testdata/sqlite-src-3330000/ext/misc/closure.c testdata/sqlite-src-3330000/ext/misc/csv.c testdata/sqlite-src-3330000/ext/misc/decimal.c testdata/sqlite-src-3330000/ext/misc/eval.c testdata/sqlite-src-3330000/ext/misc/explain.c testdata/sqlite-src-3330000/ext/misc/fileio.c testdata/sqlite-src-3330000/ext/misc/fuzzer.c testdata/sqlite-src-3330000/ext/misc/ieee754.c testdata/sqlite-src-3330000/ext/misc/mmapwarm.c testdata/sqlite-src-3330000/ext/misc/nextchar.c testdata/sqlite-src-3330000/ext/misc/normalize.c testdata/sqlite-src-3330000/ext/misc/percentile.c testdata/sqlite-src-3330000/ext/misc/prefixes.c testdata/sqlite-src-3330000/ext/misc/regexp.c testdata/sqlite-src-3330000/ext/misc/remember.c testdata/sqlite-src-3330000/ext/misc/series.c testdata/sqlite-src-3330000/ext/misc/spellfix.c testdata/sqlite-src-3330000/ext/misc/totype.c testdata/sqlite-src-3330000/ext/misc/unionvtab.c testdata/sqlite-src-3330000/ext/misc/wholenumber.c testdata/sqlite-src-3330000/ext/misc/zipfile.c testdata/sqlite-src-3330000/ext/rbu/test_rbu.c testdata/sqlite-src-3330000/ext/userauth/userauth.c testdata/sqlite-src-3330000/src/tclsqlite.c testdata/sqlite-src-3330000/src/test1.c testdata/sqlite-src-3330000/src/test2.c testdata/sqlite-src-3330000/src/test3.c testdata/sqlite-src-3330000/src/test4.c testdata/sqlite-src-3330000/src/test5.c testdata/sqlite-src-3330000/src/test6.c testdata/sqlite-src-3330000/src/test7.c testdata/sqlite-src-3330000/src/test8.c testdata/sqlite-src-3330000/src/test9.c testdata/sqlite-src-3330000/src/test_async.c testdata/sqlite-src-3330000/src/test_autoext.c testdata/sqlite-src-3330000/src/test_backup.c testdata/sqlite-src-3330000/src/test_bestindex.c testdata/sqlite-src-3330000/src/test_blob.c testdata/sqlite-src-3330000/src/test_btree.c testdata/sqlite-src-3330000/src/test_config.c testdata/sqlite-src-3330000/src/test_delete.c testdata/sqlite-src-3330000/src/test_demovfs.c testdata/sqlite-src-3330000/src/test_devsym.c testdata/sqlite-src-3330000/src/test_fs.c testdata/sqlite-src-3330000/src/test_func.c testdata/sqlite-src-3330000/src/test_hexio.c testdata/sqlite-src-3330000/src/test_init.c testdata/sqlite-src-3330000/src/test_intarray.c testdata/sqlite-src-3330000/src/test_journal.c testdata/sqlite-src-3330000/src/test_malloc.c testdata/sqlite-src-3330000/src/test_md5.c testdata/sqlite-src-3330000/src/test_multiplex.c testdata/sqlite-src-3330000/src/test_mutex.c testdata/sqlite-src-3330000/src/test_onefile.c testdata/sqlite-src-3330000/src/test_osinst.c testdata/sqlite-src-3330000/src/test_pcache.c testdata/sqlite-src-3330000/src/test_quota.c testdata/sqlite-src-3330000/src/test_rtree.c testdata/sqlite-src-3330000/src/test_schema.c testdata/sqlite-src-3330000/src/test_server.c testdata/sqlite-src-3330000/src/test_superlock.c testdata/sqlite-src-3330000/src/test_syscall.c testdata/sqlite-src-3330000/src/test_tclsh.c testdata/sqlite-src-3330000/src/test_tclvar.c testdata/sqlite-src-3330000/src/test_thread.c testdata/sqlite-src-3330000/src/test_vdbecov.c testdata/sqlite-src-3330000/src/test_vfs.c testdata/sqlite-src-3330000/src/test_windirent.c testdata/sqlite-src-3330000/src/test_window.c testdata/sqlite-src-3330000/src/test_wsd.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DTCLSH_INIT_PROC=sqlite3TestInit -D_HAVE_SQLITE_CONFIG_H -I/usr/include/tcl8.6 -export-defines "" -export-fields F -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count -lmodernc.org/tcl/lib,modernc.org/sqlite/internal/libc2,modernc.org/sqlite/lib -o internal/testfixture/testfixture_linux_amd64.go -Itestdata/sqlite-src-3330000/ext/async -Itestdata/sqlite-src-3330000/ext/fts3 -Itestdata/sqlite-src-3330000/ext/icu -Itestdata/sqlite-src-3330000/ext/rtree -Itestdata/sqlite-src-3330000/ext/session -Itestdata/sqlite-src-3330000/ext/userauth -Itestdata/sqlite-src-3330000/src -Itestdata/sqlite-amalgamation-3330000 -Itestdata/sqlite-src-3330000 testdata/sqlite-src-3330000/ext/expert/sqlite3expert.c testdata/sqlite-src-3330000/ext/expert/test_expert.c testdata/sqlite-src-3330000/ext/fts3/fts3_term.c testdata/sqlite-src-3330000/ext/fts3/fts3_test.c testdata/sqlite-src-3330000/ext/fts5/fts5_tcl.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_mi.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_tok.c testdata/sqlite-src-3330000/ext/misc/amatch.c testdata/sqlite-src-3330000/ext/misc/carray.c testdata/sqlite-src-3330000/ext/misc/closure.c testdata/sqlite-src-3330000/ext/misc/csv.c testdata/sqlite-src-3330000/ext/misc/decimal.c testdata/sqlite-src-3330000/ext/misc/eval.c testdata/sqlite-src-3330000/ext/misc/explain.c testdata/sqlite-src-3330000/ext/misc/fileio.c testdata/sqlite-src-3330000/ext/misc/fuzzer.c testdata/sqlite-src-3330000/ext/misc/ieee754.c testdata/sqlite-src-3330000/ext/misc/mmapwarm.c testdata/sqlite-src-3330000/ext/misc/nextchar.c testdata/sqlite-src-3330000/ext/misc/normalize.c testdata/sqlite-src-3330000/ext/misc/percentile.c testdata/sqlite-src-3330000/ext/misc/prefixes.c testdata/sqlite-src-3330000/ext/misc/regexp.c testdata/sqlite-src-3330000/ext/misc/remember.c testdata/sqlite-src-3330000/ext/misc/series.c testdata/sqlite-src-3330000/ext/misc/spellfix.c testdata/sqlite-src-3330000/ext/misc/totype.c testdata/sqlite-src-3330000/ext/misc/unionvtab.c testdata/sqlite-src-3330000/ext/misc/wholenumber.c testdata/sqlite-src-3330000/ext/misc/zipfile.c testdata/sqlite-src-3330000/ext/rbu/test_rbu.c testdata/sqlite-src-3330000/ext/userauth/userauth.c testdata/sqlite-src-3330000/src/tclsqlite.c testdata/sqlite-src-3330000/src/test1.c testdata/sqlite-src-3330000/src/test2.c testdata/sqlite-src-3330000/src/test3.c testdata/sqlite-src-3330000/src/test4.c testdata/sqlite-src-3330000/src/test5.c testdata/sqlite-src-3330000/src/test6.c testdata/sqlite-src-3330000/src/test7.c testdata/sqlite-src-3330000/src/test8.c testdata/sqlite-src-3330000/src/test9.c testdata/sqlite-src-3330000/src/test_async.c testdata/sqlite-src-3330000/src/test_autoext.c testdata/sqlite-src-3330000/src/test_backup.c testdata/sqlite-src-3330000/src/test_bestindex.c testdata/sqlite-src-3330000/src/test_blob.c testdata/sqlite-src-3330000/src/test_btree.c testdata/sqlite-src-3330000/src/test_config.c testdata/sqlite-src-3330000/src/test_delete.c testdata/sqlite-src-3330000/src/test_demovfs.c testdata/sqlite-src-3330000/src/test_devsym.c testdata/sqlite-src-3330000/src/test_fs.c testdata/sqlite-src-3330000/src/test_func.c testdata/sqlite-src-3330000/src/test_hexio.c testdata/sqlite-src-3330000/src/test_init.c testdata/sqlite-src-3330000/src/test_intarray.c testdata/sqlite-src-3330000/src/test_journal.c testdata/sqlite-src-3330000/src/test_malloc.c testdata/sqlite-src-3330000/src/test_md5.c testdata/sqlite-src-3330000/src/test_multiplex.c testdata/sqlite-src-3330000/src/test_mutex.c testdata/sqlite-src-3330000/src/test_onefile.c testdata/sqlite-src-3330000/src/test_osinst.c testdata/sqlite-src-3330000/src/test_pcache.c testdata/sqlite-src-3330000/src/test_quota.c testdata/sqlite-src-3330000/src/test_rtree.c testdata/sqlite-src-3330000/src/test_schema.c testdata/sqlite-src-3330000/src/test_server.c testdata/sqlite-src-3330000/src/test_superlock.c testdata/sqlite-src-3330000/src/test_syscall.c testdata/sqlite-src-3330000/src/test_tclsh.c testdata/sqlite-src-3330000/src/test_tclvar.c testdata/sqlite-src-3330000/src/test_thread.c testdata/sqlite-src-3330000/src/test_vdbecov.c testdata/sqlite-src-3330000/src/test_vfs.c testdata/sqlite-src-3330000/src/test_windirent.c testdata/sqlite-src-3330000/src/test_window.c testdata/sqlite-src-3330000/src/test_wsd.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package main @@ -3101,6 +3101,24 @@ const ( TESTVFS_WRITE_MASK = 0x00001000 ) +// Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface. +// Copyright (C) 1996-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// . + // Copyright (C) 1991-2018 Free Software Foundation, Inc. // This file is part of the GNU C Library. // @@ -3792,15 +3810,9 @@ const ( /* resource.h:187:1: */ PRIO_USER = 2 ) -// end block for C++ +// Convenience macros for operations on timevals. +// NOTE: `timercmp' does not work for >= or <=. -// Local Variables: -// mode: c -// c-basic-offset: 4 -// fill-column: 78 -// End: - -// Needed for the setrlimit() system call on unix // Copyright (C) 1992-2018 Free Software Foundation, Inc. // This file is part of the GNU C Library. // @@ -67706,14 +67718,14 @@ func leaveJtMutex(tls *libc.TLS) { /* test_journal.c:216:13: */ } func stop_ioerr_simulation(tls *libc.TLS, piSave uintptr, piSave2 uintptr) { /* test_journal.c:222:13: */ - *(*int32)(unsafe.Pointer(piSave)) = sqlite3.Xsqlite3_io_error_pending + *(*int32)(unsafe.Pointer(piSave)) = libc.AtomicLoadInt32(&sqlite3.Xsqlite3_io_error_pending) *(*int32)(unsafe.Pointer(piSave2)) = sqlite3.Xsqlite3_io_error_hit - sqlite3.Xsqlite3_io_error_pending = -1 + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(-1)) sqlite3.Xsqlite3_io_error_hit = 0 } func start_ioerr_simulation(tls *libc.TLS, iSave int32, iSave2 int32) { /* test_journal.c:228:13: */ - sqlite3.Xsqlite3_io_error_pending = iSave + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(iSave)) sqlite3.Xsqlite3_io_error_hit = iSave2 } @@ -74026,11 +74038,11 @@ func vfslogCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* t func vfslog_flush(tls *libc.TLS, p uintptr) { /* test_osinst.c:617:13: */ - var pending int32 = sqlite3.Xsqlite3_io_error_pending + var pending int32 = libc.AtomicLoadInt32(&sqlite3.Xsqlite3_io_error_pending) var persist int32 = sqlite3.Xsqlite3_io_error_persist var diskfull int32 = sqlite3.Xsqlite3_diskfull_pending - sqlite3.Xsqlite3_io_error_pending = 0 + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(0)) sqlite3.Xsqlite3_io_error_persist = 0 sqlite3.Xsqlite3_diskfull_pending = 0 @@ -74040,7 +74052,7 @@ func vfslog_flush(tls *libc.TLS, p uintptr) { /* test_osinst.c:617:13: */ (*VfslogVfs)(unsafe.Pointer(p)).FnBuf = 0 } - sqlite3.Xsqlite3_io_error_pending = pending + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(pending)) sqlite3.Xsqlite3_io_error_persist = persist sqlite3.Xsqlite3_diskfull_pending = diskfull } diff --git a/internal/testfixture/testfixture_linux_arm.go b/internal/testfixture/testfixture_linux_arm.go index 8a4aa1f..c0baaac 100644 --- a/internal/testfixture/testfixture_linux_arm.go +++ b/internal/testfixture/testfixture_linux_arm.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DTCLSH_INIT_PROC=sqlite3TestInit -D_HAVE_SQLITE_CONFIG_H -I/usr/include/tcl8.6 -export-defines "" -export-fields F -trace-translation-units -lmodernc.org/tcl/lib,modernc.org/sqlite/internal/libc2,modernc.org/sqlite/lib -o internal/testfixture/testfixture_linux_arm.go -Itestdata/sqlite-src-3330000/ext/async -Itestdata/sqlite-src-3330000/ext/fts3 -Itestdata/sqlite-src-3330000/ext/icu -Itestdata/sqlite-src-3330000/ext/rtree -Itestdata/sqlite-src-3330000/ext/session -Itestdata/sqlite-src-3330000/ext/userauth -Itestdata/sqlite-src-3330000/src -Itestdata/sqlite-amalgamation-3330000 -Itestdata/sqlite-src-3330000 testdata/sqlite-src-3330000/ext/expert/sqlite3expert.c testdata/sqlite-src-3330000/ext/expert/test_expert.c testdata/sqlite-src-3330000/ext/fts3/fts3_term.c testdata/sqlite-src-3330000/ext/fts3/fts3_test.c testdata/sqlite-src-3330000/ext/fts5/fts5_tcl.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_mi.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_tok.c testdata/sqlite-src-3330000/ext/misc/amatch.c testdata/sqlite-src-3330000/ext/misc/carray.c testdata/sqlite-src-3330000/ext/misc/closure.c testdata/sqlite-src-3330000/ext/misc/csv.c testdata/sqlite-src-3330000/ext/misc/decimal.c testdata/sqlite-src-3330000/ext/misc/eval.c testdata/sqlite-src-3330000/ext/misc/explain.c testdata/sqlite-src-3330000/ext/misc/fileio.c testdata/sqlite-src-3330000/ext/misc/fuzzer.c testdata/sqlite-src-3330000/ext/misc/ieee754.c testdata/sqlite-src-3330000/ext/misc/mmapwarm.c testdata/sqlite-src-3330000/ext/misc/nextchar.c testdata/sqlite-src-3330000/ext/misc/normalize.c testdata/sqlite-src-3330000/ext/misc/percentile.c testdata/sqlite-src-3330000/ext/misc/prefixes.c testdata/sqlite-src-3330000/ext/misc/regexp.c testdata/sqlite-src-3330000/ext/misc/remember.c testdata/sqlite-src-3330000/ext/misc/series.c testdata/sqlite-src-3330000/ext/misc/spellfix.c testdata/sqlite-src-3330000/ext/misc/totype.c testdata/sqlite-src-3330000/ext/misc/unionvtab.c testdata/sqlite-src-3330000/ext/misc/wholenumber.c testdata/sqlite-src-3330000/ext/misc/zipfile.c testdata/sqlite-src-3330000/ext/rbu/test_rbu.c testdata/sqlite-src-3330000/ext/userauth/userauth.c testdata/sqlite-src-3330000/src/tclsqlite.c testdata/sqlite-src-3330000/src/test1.c testdata/sqlite-src-3330000/src/test2.c testdata/sqlite-src-3330000/src/test3.c testdata/sqlite-src-3330000/src/test4.c testdata/sqlite-src-3330000/src/test5.c testdata/sqlite-src-3330000/src/test6.c testdata/sqlite-src-3330000/src/test7.c testdata/sqlite-src-3330000/src/test8.c testdata/sqlite-src-3330000/src/test9.c testdata/sqlite-src-3330000/src/test_async.c testdata/sqlite-src-3330000/src/test_autoext.c testdata/sqlite-src-3330000/src/test_backup.c testdata/sqlite-src-3330000/src/test_bestindex.c testdata/sqlite-src-3330000/src/test_blob.c testdata/sqlite-src-3330000/src/test_btree.c testdata/sqlite-src-3330000/src/test_config.c testdata/sqlite-src-3330000/src/test_delete.c testdata/sqlite-src-3330000/src/test_demovfs.c testdata/sqlite-src-3330000/src/test_devsym.c testdata/sqlite-src-3330000/src/test_fs.c testdata/sqlite-src-3330000/src/test_func.c testdata/sqlite-src-3330000/src/test_hexio.c testdata/sqlite-src-3330000/src/test_init.c testdata/sqlite-src-3330000/src/test_intarray.c testdata/sqlite-src-3330000/src/test_journal.c testdata/sqlite-src-3330000/src/test_malloc.c testdata/sqlite-src-3330000/src/test_md5.c testdata/sqlite-src-3330000/src/test_multiplex.c testdata/sqlite-src-3330000/src/test_mutex.c testdata/sqlite-src-3330000/src/test_onefile.c testdata/sqlite-src-3330000/src/test_osinst.c testdata/sqlite-src-3330000/src/test_pcache.c testdata/sqlite-src-3330000/src/test_quota.c testdata/sqlite-src-3330000/src/test_rtree.c testdata/sqlite-src-3330000/src/test_schema.c testdata/sqlite-src-3330000/src/test_server.c testdata/sqlite-src-3330000/src/test_superlock.c testdata/sqlite-src-3330000/src/test_syscall.c testdata/sqlite-src-3330000/src/test_tclsh.c testdata/sqlite-src-3330000/src/test_tclvar.c testdata/sqlite-src-3330000/src/test_thread.c testdata/sqlite-src-3330000/src/test_vdbecov.c testdata/sqlite-src-3330000/src/test_vfs.c testdata/sqlite-src-3330000/src/test_windirent.c testdata/sqlite-src-3330000/src/test_window.c testdata/sqlite-src-3330000/src/test_wsd.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DTCLSH_INIT_PROC=sqlite3TestInit -D_HAVE_SQLITE_CONFIG_H -I/usr/include/tcl8.6 -export-defines "" -export-fields F -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count -lmodernc.org/tcl/lib,modernc.org/sqlite/internal/libc2,modernc.org/sqlite/lib -o internal/testfixture/testfixture_linux_arm.go -Itestdata/sqlite-src-3330000/ext/async -Itestdata/sqlite-src-3330000/ext/fts3 -Itestdata/sqlite-src-3330000/ext/icu -Itestdata/sqlite-src-3330000/ext/rtree -Itestdata/sqlite-src-3330000/ext/session -Itestdata/sqlite-src-3330000/ext/userauth -Itestdata/sqlite-src-3330000/src -Itestdata/sqlite-amalgamation-3330000 -Itestdata/sqlite-src-3330000 testdata/sqlite-src-3330000/ext/expert/sqlite3expert.c testdata/sqlite-src-3330000/ext/expert/test_expert.c testdata/sqlite-src-3330000/ext/fts3/fts3_term.c testdata/sqlite-src-3330000/ext/fts3/fts3_test.c testdata/sqlite-src-3330000/ext/fts5/fts5_tcl.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_mi.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_tok.c testdata/sqlite-src-3330000/ext/misc/amatch.c testdata/sqlite-src-3330000/ext/misc/carray.c testdata/sqlite-src-3330000/ext/misc/closure.c testdata/sqlite-src-3330000/ext/misc/csv.c testdata/sqlite-src-3330000/ext/misc/decimal.c testdata/sqlite-src-3330000/ext/misc/eval.c testdata/sqlite-src-3330000/ext/misc/explain.c testdata/sqlite-src-3330000/ext/misc/fileio.c testdata/sqlite-src-3330000/ext/misc/fuzzer.c testdata/sqlite-src-3330000/ext/misc/ieee754.c testdata/sqlite-src-3330000/ext/misc/mmapwarm.c testdata/sqlite-src-3330000/ext/misc/nextchar.c testdata/sqlite-src-3330000/ext/misc/normalize.c testdata/sqlite-src-3330000/ext/misc/percentile.c testdata/sqlite-src-3330000/ext/misc/prefixes.c testdata/sqlite-src-3330000/ext/misc/regexp.c testdata/sqlite-src-3330000/ext/misc/remember.c testdata/sqlite-src-3330000/ext/misc/series.c testdata/sqlite-src-3330000/ext/misc/spellfix.c testdata/sqlite-src-3330000/ext/misc/totype.c testdata/sqlite-src-3330000/ext/misc/unionvtab.c testdata/sqlite-src-3330000/ext/misc/wholenumber.c testdata/sqlite-src-3330000/ext/misc/zipfile.c testdata/sqlite-src-3330000/ext/rbu/test_rbu.c testdata/sqlite-src-3330000/ext/userauth/userauth.c testdata/sqlite-src-3330000/src/tclsqlite.c testdata/sqlite-src-3330000/src/test1.c testdata/sqlite-src-3330000/src/test2.c testdata/sqlite-src-3330000/src/test3.c testdata/sqlite-src-3330000/src/test4.c testdata/sqlite-src-3330000/src/test5.c testdata/sqlite-src-3330000/src/test6.c testdata/sqlite-src-3330000/src/test7.c testdata/sqlite-src-3330000/src/test8.c testdata/sqlite-src-3330000/src/test9.c testdata/sqlite-src-3330000/src/test_async.c testdata/sqlite-src-3330000/src/test_autoext.c testdata/sqlite-src-3330000/src/test_backup.c testdata/sqlite-src-3330000/src/test_bestindex.c testdata/sqlite-src-3330000/src/test_blob.c testdata/sqlite-src-3330000/src/test_btree.c testdata/sqlite-src-3330000/src/test_config.c testdata/sqlite-src-3330000/src/test_delete.c testdata/sqlite-src-3330000/src/test_demovfs.c testdata/sqlite-src-3330000/src/test_devsym.c testdata/sqlite-src-3330000/src/test_fs.c testdata/sqlite-src-3330000/src/test_func.c testdata/sqlite-src-3330000/src/test_hexio.c testdata/sqlite-src-3330000/src/test_init.c testdata/sqlite-src-3330000/src/test_intarray.c testdata/sqlite-src-3330000/src/test_journal.c testdata/sqlite-src-3330000/src/test_malloc.c testdata/sqlite-src-3330000/src/test_md5.c testdata/sqlite-src-3330000/src/test_multiplex.c testdata/sqlite-src-3330000/src/test_mutex.c testdata/sqlite-src-3330000/src/test_onefile.c testdata/sqlite-src-3330000/src/test_osinst.c testdata/sqlite-src-3330000/src/test_pcache.c testdata/sqlite-src-3330000/src/test_quota.c testdata/sqlite-src-3330000/src/test_rtree.c testdata/sqlite-src-3330000/src/test_schema.c testdata/sqlite-src-3330000/src/test_server.c testdata/sqlite-src-3330000/src/test_superlock.c testdata/sqlite-src-3330000/src/test_syscall.c testdata/sqlite-src-3330000/src/test_tclsh.c testdata/sqlite-src-3330000/src/test_tclvar.c testdata/sqlite-src-3330000/src/test_thread.c testdata/sqlite-src-3330000/src/test_vdbecov.c testdata/sqlite-src-3330000/src/test_vfs.c testdata/sqlite-src-3330000/src/test_windirent.c testdata/sqlite-src-3330000/src/test_window.c testdata/sqlite-src-3330000/src/test_wsd.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -15,6 +16,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -7854,6 +7856,7 @@ var expertModule = sqlite3_module{ FxShadowName:// xRollbackTo uintptr(0), // xShadowName } /* sqlite3expert.c:623:25 */ + // // End of virtual table implementation. // @@ -15516,6 +15519,7 @@ func amatchStrcpy(tls *libc.TLS, dest uintptr, src uintptr) { /* amatch.c:1005:1 for (int32(libc.AssignPtrInt8(libc.PostIncUintptr(&dest, 1), *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&src, 1)))))) != 0 { } } + func amatchStrcat(tls *libc.TLS, dest uintptr, src uintptr) { /* amatch.c:1008:13: */ for *(*int8)(unsafe.Pointer(dest)) != 0 { dest++ @@ -18977,6 +18981,7 @@ func decimalAddFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { decimal_free(tls, pA) decimal_free(tls, pB) } + func decimalSubFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:454:13: */ var pA uintptr = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*4)), 0, uintptr(0)) var pB uintptr = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*4)), 0, uintptr(0)) @@ -19021,6 +19026,7 @@ func decimalSumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { decimal_add(tls, p, pArg) decimal_free(tls, pArg) } + func decimalSumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:501:13: */ var p uintptr var pArg uintptr @@ -19039,6 +19045,7 @@ func decimalSumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) decimal_add(tls, p, pArg) decimal_free(tls, pArg) } + func decimalSumValue(tls *libc.TLS, context uintptr) { /* decimal.c:517:13: */ var p uintptr = sqlite3.Xsqlite3_aggregate_context(tls, context, 0) if p == uintptr(0) { @@ -19046,6 +19053,7 @@ func decimalSumValue(tls *libc.TLS, context uintptr) { /* decimal.c:517:13: */ } decimal_result(tls, context, p) } + func decimalSumFinalize(tls *libc.TLS, context uintptr) { /* decimal.c:522:13: */ var p uintptr = sqlite3.Xsqlite3_aggregate_context(tls, context, 0) if p == uintptr(0) { @@ -22534,6 +22542,7 @@ func ieee754func_from_blob(tls *libc.TLS, context uintptr, argc int32, argv uint sqlite3.Xsqlite3_result_double(tls, context, *(*float64)(unsafe.Pointer(bp /* r */))) } } + func ieee754func_to_blob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* ieee754.c:225:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -24360,6 +24369,7 @@ func re_next_char(tls *libc.TLS, p uintptr) uint32 { /* regexp.c:147:17: */ } return c } + func re_next_char_nocase(tls *libc.TLS, p uintptr) uint32 { /* regexp.c:172:17: */ var c uint32 = re_next_char(tls, p) if (c >= uint32('A')) && (c <= uint32('Z')) { @@ -26744,6 +26754,7 @@ func editDist3ConfigClear(tls *libc.TLS, p uintptr) { /* spellfix.c:640:13: */ sqlite3.Xsqlite3_free(tls, (*EditDist3Config)(unsafe.Pointer(p)).Fa) libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(EditDist3Config{}))) } + func editDist3ConfigDelete(tls *libc.TLS, pIn uintptr) { /* spellfix.c:655:13: */ var p uintptr = pIn editDist3ConfigClear(tls, p) @@ -30236,9 +30247,11 @@ func spellfix1Uninit(tls *libc.TLS, isDestroy int32, pVTab uintptr) int32 { /* s } return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } + func spellfix1Disconnect(tls *libc.TLS, pVTab uintptr) int32 { /* spellfix.c:1994:12: */ return spellfix1Uninit(tls, 0, pVTab) } + func spellfix1Destroy(tls *libc.TLS, pVTab uintptr) int32 { /* spellfix.c:1997:12: */ return spellfix1Uninit(tls, 1, pVTab) } @@ -30353,6 +30366,7 @@ func spellfix1Init(tls *libc.TLS, isCreate int32, db uintptr, pAux uintptr, argc func spellfix1Connect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* spellfix.c:2133:12: */ return spellfix1Init(tls, 0, db, pAux, argc, argv, ppVTab, pzErr) } + func spellfix1Create(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* spellfix.c:2142:12: */ return spellfix1Init(tls, 1, db, pAux, argc, argv, ppVTab, pzErr) } @@ -34624,6 +34638,7 @@ func zipfileTableErr(tls *libc.TLS, pTab uintptr, zFmt uintptr, va uintptr) { /* (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) _ = ap } + func zipfileCursorErr(tls *libc.TLS, pCsr uintptr, zFmt uintptr, va uintptr) { /* zipfile.c:486:13: */ var ap va_list _ = ap @@ -38209,6 +38224,7 @@ func incrblobSeek(tls *libc.TLS, instanceData ClientData, offset int32, seekMode func incrblobWatch(tls *libc.TLS, instanceData ClientData, mode int32) { /* tclsqlite.c:355:27: */ // NO-OP } + func incrblobHandle(tls *libc.TLS, instanceData ClientData, dir int32, hPtr uintptr) int32 { /* tclsqlite.c:361:26: */ return 1 } @@ -43198,12 +43214,15 @@ func Sqlite3_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3877:12: } return rc } + func Tclsqlite3_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3891:12: */ return Sqlite3_Init(tls, interp) } + func Sqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3892:12: */ return 0 } + func Tclsqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3893:12: */ return 0 } @@ -43214,6 +43233,7 @@ func Tclsqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tc func Sqlite3_SafeInit(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3899:12: */ return 1 } + func Sqlite3_SafeUnload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3900:12: */ return 1 } @@ -43221,12 +43241,15 @@ func Sqlite3_SafeUnload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* t func Sqlite_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3905:5: */ return Sqlite3_Init(tls, interp) } + func Tclsqlite_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3906:5: */ return Sqlite3_Init(tls, interp) } + func Sqlite_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3907:5: */ return 0 } + func Tclsqlite_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3908:5: */ return 0 } @@ -45478,6 +45501,7 @@ func testHexToInt(tls *libc.TLS, h int32) int32 { /* test1.c:44:12: */ } return int32(0) } + func sqlite3TestTextToPtr(tls *libc.TLS, z uintptr) uintptr { /* test1.c:54:6: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -45798,6 +45822,7 @@ func db_enter(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv u sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* db */)))).Fmutex) return 0 } + func db_leave(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:396:26: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -46155,6 +46180,7 @@ func hex8Func(tls *libc.TLS, p uintptr, argc int32, argv uintptr) { /* test1.c:7 *(*int8)(unsafe.Pointer(bp + 8 /* &zBuf[0] */ + uintptr((i * 2)))) = int8(0) sqlite3.Xsqlite3_result_text(tls, p, bp+8 /* zBuf */, -1, libc.UintptrFromInt32(-1)) } + func hex16Func(tls *libc.TLS, p uintptr, argc int32, argv uintptr) { /* test1.c:760:13: */ bp := tls.Alloc(408) defer tls.Free(408) @@ -46521,6 +46547,7 @@ type t1CountCtx1 = struct{ Fn int32 } /* test1.c:1123:9 */ // is reported on the step function. If the total count is 42, then // a UTF-8 error is reported on the finalize function. type t1CountCtx = t1CountCtx1 /* test1.c:1123:27 */ + func t1CountStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test1.c:1127:13: */ bp := tls.Alloc(9) defer tls.Free(9) @@ -46540,6 +46567,7 @@ func t1CountStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* } } } + func t1CountFinalize(tls *libc.TLS, context uintptr) { /* test1.c:1149:13: */ var p uintptr p = sqlite3.Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(t1CountCtx{}))) @@ -47118,6 +47146,7 @@ type TestCollationX1 = struct { } /* test1.c:1715:1 */ type TestCollationX = TestCollationX1 /* test1.c:1720:31 */ + func testCreateCollationDel(tls *libc.TLS, pCtx uintptr) { /* test1.c:1721:13: */ var p uintptr = pCtx @@ -47140,6 +47169,7 @@ func testCreateCollationDel(tls *libc.TLS, pCtx uintptr) { /* test1.c:1721:13: * } sqlite3.Xsqlite3_free(tls, p) } + func testCreateCollationCmp(tls *libc.TLS, pCtx uintptr, nLeft int32, zLeft uintptr, nRight int32, zRight uintptr) int32 { /* test1.c:1733:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -47165,6 +47195,7 @@ func testCreateCollationCmp(tls *libc.TLS, pCtx uintptr, nLeft int32, zLeft uint return *(*int32)(unsafe.Pointer(bp /* iRes */)) } + func test_create_collation_v2(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1757:26: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -47230,12 +47261,16 @@ type CreateFunctionV21 = struct { // -final SCRIPT // -destroy SCRIPT type CreateFunctionV2 = CreateFunctionV21 /* test1.c:1804:33 */ + func cf2Func(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* test1.c:1812:13: */ } + func cf2Step(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* test1.c:1814:13: */ } + func cf2Final(tls *libc.TLS, ctx uintptr) { /* test1.c:1816:13: */ } + func cf2Destroy(tls *libc.TLS, pUser uintptr) { /* test1.c:1818:13: */ var p uintptr = pUser @@ -47280,6 +47315,7 @@ func cf2Destroy(tls *libc.TLS, pUser uintptr) { /* test1.c:1818:13: */ } sqlite3.Xsqlite3_free(tls, p) } + func test_create_function_v2(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1832:26: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -48002,7 +48038,9 @@ func test_snapshot_cmp_blob(tls *libc.TLS, clientData uintptr, interp uintptr, o res = sqlite3.Xsqlite3_snapshot_cmp(tls, p1, p2) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, res)) return 0 -} // in test_delete.c +} + +// in test_delete.c func test_delete_database(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2581:26: */ var rc int32 var zFile uintptr @@ -48381,6 +48419,7 @@ func test_bind(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv // interp pointer to use when evaluating the TCL script is stored in // pTestCollateInterp. var pTestCollateInterp uintptr /* test1.c:2975:18: */ + func test_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintptr, nB int32, zB uintptr) int32 { /* test1.c:2976:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -48435,6 +48474,7 @@ func test_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintptr, nB int tcl.XTcl_GetIntFromObj(tls, i, tcl.XTcl_GetObjResult(tls, i), bp /* &res */) return *(*int32)(unsafe.Pointer(bp /* res */)) } + func test_collate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3026:26: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -48566,6 +48606,7 @@ func test_utf16bin_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintpt } return res } + func test_utf16bin_collate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3100:26: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -48682,6 +48723,7 @@ bad_args: // Both collating functions increment the unaligned utf16 counter // whenever they see a string that begins on an odd byte boundary. var unaligned_string_counter int32 = 0 /* test1.c:3192:12 */ + func alignmentCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* test1.c:3193:12: */ var rc int32 var n int32 @@ -48702,6 +48744,7 @@ func alignmentCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintpt } return rc } + func add_alignment_test_collations(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3208:26: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -48772,6 +48815,7 @@ func test_function_utf8(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function_utf16le(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3276:13: */ var interp uintptr var pX uintptr @@ -48795,6 +48839,7 @@ func test_function_utf16le(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr sqlite3.Xsqlite3_result_text(tls, pCtx, sqlite3.Xsqlite3_value_text(tls, pVal), -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function_utf16be(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3298:13: */ var interp uintptr var pX uintptr @@ -48823,6 +48868,7 @@ func test_function_utf16be(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3326:26: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -49096,6 +49142,7 @@ func test_intarray_addr(tls *libc.TLS, clientData uintptr, interp uintptr, objc } var p uintptr = uintptr(0) /* test1.c:3540:14 */ + // Usage: intarray_addr INT ... // // Return the address of a C-language array of 32-bit integers. @@ -49132,6 +49179,7 @@ func test_int64array_addr(tls *libc.TLS, clientData uintptr, interp uintptr, obj } var p1 uintptr = uintptr(0) /* test1.c:3574:24 */ + // Usage: doublearray_addr INT ... // // Return the address of a C-language array of doubles. @@ -49162,6 +49210,7 @@ func test_doublearray_addr(tls *libc.TLS, clientData uintptr, interp uintptr, ob } var p2 uintptr = uintptr(0) /* test1.c:3610:17 */ + // Usage: textarray_addr TEXT ... // // Return the address of a C-language array of strings. @@ -50480,6 +50529,7 @@ func test_sql(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, obj tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_sql(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))), uintptr(1)) return 0 } + func test_ex_sql(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4784:26: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -52148,6 +52198,7 @@ type LogCallback = struct { // tclcmd: test_sqlite3_log ?SCRIPT? var logcallback = LogCallback{} /* test1.c:6707:3 */ + func xLogcallback(tls *libc.TLS, unused uintptr, err int32, zMsg uintptr) { /* test1.c:6708:13: */ var pNew uintptr = tcl.XTcl_DuplicateObj(tls, logcallback.FpObj) (*Tcl_Obj)(unsafe.Pointer(pNew)).FrefCount++ @@ -52162,6 +52213,7 @@ func xLogcallback(tls *libc.TLS, unused uintptr, err int32, zMsg uintptr) { /* t } } } + func test_sqlite3_log(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6718:26: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -54613,6 +54665,7 @@ func testPendingByte(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, var faultSimInterp uintptr = uintptr(0) /* test2.c:580:19 */ var faultSimScriptSize int32 = 0 /* test2.c:581:12 */ var faultSimScript uintptr /* test2.c:582:13: */ + func faultSimCallback(tls *libc.TLS, x int32) int32 { /* test2.c:583:12: */ bp := tls.Alloc(38) defer tls.Free(38) @@ -57750,6 +57803,7 @@ func test_translate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int3 return 0 } + func test_translate_selftest(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test5.c:189:26: */ sqlite3.Xsqlite3UtfSelfTest(tls) return 0 @@ -57849,9 +57903,11 @@ var sqlite3CrashTestEnable int32 = 0 /* test6.c:161:12 */ func crash_malloc(tls *libc.TLS, nByte int32) uintptr { /* test6.c:163:13: */ return tcl.XTcl_AttemptAlloc(tls, size_t(nByte)) } + func crash_free(tls *libc.TLS, p uintptr) { /* test6.c:166:13: */ tcl.XTcl_Free(tls, p) } + func crash_realloc(tls *libc.TLS, p uintptr, n int32) uintptr { /* test6.c:169:13: */ return tcl.XTcl_AttemptRealloc(tls, p, size_t(n)) } @@ -58156,12 +58212,15 @@ func cfFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* test6.c: func cfLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test6.c:514:12: */ return sqlite3.Xsqlite3OsLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, eLock) } + func cfUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test6.c:517:12: */ return sqlite3.Xsqlite3OsUnlock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, eLock) } + func cfCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* test6.c:520:12: */ return sqlite3.Xsqlite3OsCheckReservedLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, pResOut) } + func cfFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* test6.c:523:12: */ if op == 5 { var pCrash uintptr = pFile @@ -58182,6 +58241,7 @@ func cfFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { func cfSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:542:12: */ return g.FiSectorSize } + func cfDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:545:12: */ return g.FiDeviceCharacteristics } @@ -58190,14 +58250,17 @@ func cfDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:54 func cfShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* test6.c:552:12: */ return sqlite3.Xsqlite3OsShmLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, ofst, n, flags) } + func cfShmBarrier(tls *libc.TLS, pFile uintptr) { /* test6.c:555:13: */ sqlite3.Xsqlite3OsShmBarrier(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile) } + func cfShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* test6.c:558:12: */ return sqlite3.Xsqlite3OsShmUnmap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, delFlag) } + func cfShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, sz int32, w int32, pp uintptr) int32 { /* test6.c:561:12: */ - return sqlite3.Xsqlite3OsShmMap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, iRegion, sz, w, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, iRegion, sz, w, libc.AtomicLoadUintptr(&pp)) } var CrashFileVtab = sqlite3_io_methods{ @@ -58303,42 +58366,52 @@ func cfDelete(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, dirSync int32) int32 var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pVfs + 28 /* &.xDelete */))))(tls, pVfs, zPath, dirSync) } + func cfAccess(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* test6.c:665:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 32 /* &.xAccess */))))(tls, pVfs, zPath, flags, pResOut) } + func cfFullPathname(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* test6.c:674:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 36 /* &.xFullPathname */))))(tls, pVfs, zPath, nPathOut, zPathOut) } + func cfDlOpen(tls *libc.TLS, pCfVfs uintptr, zPath uintptr) uintptr { /* test6.c:683:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 40 /* &.xDlOpen */))))(tls, pVfs, zPath) } + func cfDlError(tls *libc.TLS, pCfVfs uintptr, nByte int32, zErrMsg uintptr) { /* test6.c:687:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pVfs + 44 /* &.xDlError */))))(tls, pVfs, nByte, zErrMsg) } + func cfDlSym(tls *libc.TLS, pCfVfs uintptr, pH uintptr, zSym uintptr) uintptr { /* test6.c:691:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 48 /* &.xDlSym */))))(tls, pVfs, pH, zSym) } + func cfDlClose(tls *libc.TLS, pCfVfs uintptr, pHandle uintptr) { /* test6.c:695:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pVfs + 52 /* &.xDlClose */))))(tls, pVfs, pHandle) } + func cfRandomness(tls *libc.TLS, pCfVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* test6.c:699:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 56 /* &.xRandomness */))))(tls, pVfs, nByte, zBufOut) } + func cfSleep(tls *libc.TLS, pCfVfs uintptr, nMicro int32) int32 { /* test6.c:703:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pVfs + 60 /* &.xSleep */))))(tls, pVfs, nMicro) } + func cfCurrentTime(tls *libc.TLS, pCfVfs uintptr, pTimeOut uintptr) int32 { /* test6.c:707:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pVfs + 64 /* &.xCurrentTime */))))(tls, pVfs, pTimeOut) } + func cfGetLastError(tls *libc.TLS, pCfVfs uintptr, n int32, z uintptr) int32 { /* test6.c:711:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 68 /* &.xGetLastError */))))(tls, pVfs, n, z) @@ -60639,6 +60712,7 @@ func echoTransactionCall(tls *libc.TLS, tab uintptr, zCall uintptr) int32 { /* t sqlite3.Xsqlite3_free(tls, z) return 0 } + func echoBegin(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1111:12: */ var rc int32 var pVtab uintptr = tab @@ -60668,6 +60742,7 @@ func echoBegin(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1111:12: */ } return rc } + func echoSync(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1142:12: */ var rc int32 var pVtab uintptr = tab @@ -60694,6 +60769,7 @@ func echoSync(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1142:12: */ } return rc } + func echoCommit(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1170:12: */ var pVtab uintptr = tab var rc int32 @@ -60711,6 +60787,7 @@ func echoCommit(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1170:12: */ (*echo_vtab)(unsafe.Pointer(pVtab)).FinTransaction = 0 return rc } + func echoRollback(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1188:12: */ var rc int32 var pVtab uintptr = tab @@ -63199,9 +63276,11 @@ func demoFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* test_d func demoLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_demovfs.c:360:12: */ return 0 } + func demoUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_demovfs.c:363:12: */ return 0 } + func demoCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* test_demovfs.c:366:12: */ *(*int32)(unsafe.Pointer(pResOut)) = 0 return 0 @@ -63218,6 +63297,7 @@ func demoFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 func demoSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test_demovfs.c:383:12: */ return 0 } + func demoDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test_demovfs.c:386:12: */ return 0 } @@ -63403,13 +63483,16 @@ func demoFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32 func demoDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* test_demovfs.c:564:13: */ return uintptr(0) } + func demoDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* test_demovfs.c:567:13: */ sqlite3.Xsqlite3_snprintf(tls, nByte, zErrMsg, ts+29503 /* "Loadable extensi..." */, 0) *(*int8)(unsafe.Pointer(zErrMsg + uintptr((nByte - 1)))) = int8(0) } + func demoDlSym(tls *libc.TLS, pVfs uintptr, pH uintptr, z uintptr) uintptr { /* test_demovfs.c:571:13: */ return uintptr(0) } + func demoDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* test_demovfs.c:574:13: */ return } @@ -63504,6 +63587,7 @@ func register_demovfs(tls *libc.TLS, clientData ClientData, interp uintptr, objc sqlite3.Xsqlite3_vfs_register(tls, sqlite3_demovfs(tls), 1) return 0 } + func unregister_demovfs(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_demovfs.c:666:26: */ sqlite3.Xsqlite3_vfs_unregister(tls, sqlite3_demovfs(tls)) return 0 @@ -63630,14 +63714,17 @@ func devsymShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 var p uintptr = pFile return sqlite3.Xsqlite3OsShmLock(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, ofst, n, flags) } + func devsymShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* test_devsym.c:196:12: */ var p uintptr = pFile - return sqlite3.Xsqlite3OsShmMap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) } + func devsymShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_devsym.c:206:13: */ var p uintptr = pFile sqlite3.Xsqlite3OsShmBarrier(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal) } + func devsymShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* test_devsym.c:210:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsShmUnmap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, delFlag) @@ -65168,6 +65255,7 @@ var zSrc = *(*[79]uint8)(unsafe.Pointer(ts + 29999 /* "abcdefghijklmnop..." */)) // // WARNING: Not threadsafe. var test_destructor_count_var int32 = 0 /* test_func.c:91:12 */ + func destructor(tls *libc.TLS, p uintptr) { /* test_func.c:92:13: */ var zVal uintptr = p @@ -65175,6 +65263,7 @@ func destructor(tls *libc.TLS, p uintptr) { /* test_func.c:92:13: */ sqlite3.Xsqlite3_free(tls, zVal) test_destructor_count_var-- } + func test_destructor(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:99:13: */ var zVal uintptr var len int32 @@ -65195,6 +65284,7 @@ func test_destructor(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* libc.Xmemcpy(tls, zVal, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*4))), uint32(len)) sqlite3.Xsqlite3_result_text(tls, pCtx, zVal, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{destructor}))) } + func test_destructor16(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:122:13: */ var zVal uintptr var len int32 @@ -65215,11 +65305,14 @@ func test_destructor16(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { libc.Xmemcpy(tls, zVal, sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*4))), uint32(len)) sqlite3.Xsqlite3_result_text16(tls, pCtx, zVal, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{destructor}))) } + func test_destructor_count(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:145:13: */ sqlite3.Xsqlite3_result_int(tls, pCtx, test_destructor_count_var) } + func test_agg_errmsg16_step(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_func.c:165:13: */ } + func test_agg_errmsg16_final(tls *libc.TLS, ctx uintptr) { /* test_func.c:167:13: */ var z uintptr var db uintptr = sqlite3.Xsqlite3_context_db_handle(tls, ctx) @@ -65240,6 +65333,7 @@ func test_agg_errmsg16_final(tls *libc.TLS, ctx uintptr) { /* test_func.c:167:13 func free_test_auxdata(tls *libc.TLS, p uintptr) { /* test_func.c:188:13: */ sqlite3.Xsqlite3_free(tls, p) } + func test_auxdata(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:189:13: */ var i int32 var zRet uintptr = testContextMalloc(tls, pCtx, (nArg * 2)) @@ -65797,6 +65891,7 @@ func autoinstall_test_funcs(tls *libc.TLS, clientData uintptr, interp uintptr, o // A bogus step function and finalizer function. func tStep(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_func.c:736:13: */ } + func tFinal(tls *libc.TLS, a uintptr) { /* test_func.c:737:13: */ } @@ -66709,22 +66804,28 @@ func wrMemInit(tls *libc.TLS, pAppData uintptr) int32 { /* test_init.c:49:12: */ } return rc } + func wrMemShutdown(tls *libc.TLS, pAppData uintptr) { /* test_init.c:61:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ + 24 /* &.xShutdown */))))(tls, wrapped.Fmem.FpAppData) wrapped.Fmem_init = 0 } + func wrMemMalloc(tls *libc.TLS, n int32) uintptr { /* test_init.c:65:13: */ return (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ /* &.xMalloc */))))(tls, n) } + func wrMemFree(tls *libc.TLS, p uintptr) { /* test_init.c:66:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ + 4 /* &.xFree */))))(tls, p) } + func wrMemRealloc(tls *libc.TLS, p uintptr, n int32) uintptr { /* test_init.c:67:13: */ return (*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ + 8 /* &.xRealloc */))))(tls, p, n) } + func wrMemSize(tls *libc.TLS, p uintptr) int32 { /* test_init.c:68:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ + 12 /* &.xSize */))))(tls, p) } + func wrMemRoundup(tls *libc.TLS, n int32) int32 { /* test_init.c:69:12: */ return (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ + 16 /* &.xRoundup */))))(tls, n) } @@ -66741,29 +66842,37 @@ func wrMutexInit(tls *libc.TLS) int32 { /* test_init.c:72:12: */ } return rc } + func wrMutexEnd(tls *libc.TLS) int32 { /* test_init.c:84:12: */ (*(*func(*libc.TLS) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 4 /* &.xMutexEnd */))))(tls) wrapped.Fmutex_init = 0 return 0 } + func wrMutexAlloc(tls *libc.TLS, e int32) uintptr { /* test_init.c:89:22: */ return (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 8 /* &.xMutexAlloc */))))(tls, e) } + func wrMutexFree(tls *libc.TLS, p uintptr) { /* test_init.c:92:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 12 /* &.xMutexFree */))))(tls, p) } + func wrMutexEnter(tls *libc.TLS, p uintptr) { /* test_init.c:95:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 16 /* &.xMutexEnter */))))(tls, p) } + func wrMutexTry(tls *libc.TLS, p uintptr) int32 { /* test_init.c:98:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 20 /* &.xMutexTry */))))(tls, p) } + func wrMutexLeave(tls *libc.TLS, p uintptr) { /* test_init.c:101:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 24 /* &.xMutexLeave */))))(tls, p) } + func wrMutexHeld(tls *libc.TLS, p uintptr) int32 { /* test_init.c:104:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 28 /* &.xMutexHeld */))))(tls, p) } + func wrMutexNotheld(tls *libc.TLS, p uintptr) int32 { /* test_init.c:107:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 32 /* &.xMutexNotheld */))))(tls, p) } @@ -66780,6 +66889,7 @@ func wrPCacheInit(tls *libc.TLS, pArg uintptr) int32 { /* test_init.c:113:12: */ } return rc } + func wrPCacheShutdown(tls *libc.TLS, pArg uintptr) { /* test_init.c:125:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 12 /* &.xShutdown */))))(tls, wrapped.Fpcache.FpArg) wrapped.Fpcache_init = 0 @@ -66788,24 +66898,31 @@ func wrPCacheShutdown(tls *libc.TLS, pArg uintptr) { /* test_init.c:125:13: */ func wrPCacheCreate(tls *libc.TLS, a int32, b int32, c int32) uintptr { /* test_init.c:130:23: */ return (*(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 16 /* &.xCreate */))))(tls, a, b, c) } + func wrPCacheCachesize(tls *libc.TLS, p uintptr, n int32) { /* test_init.c:133:13: */ (*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 20 /* &.xCachesize */))))(tls, p, n) } + func wrPCachePagecount(tls *libc.TLS, p uintptr) int32 { /* test_init.c:136:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 24 /* &.xPagecount */))))(tls, p) } + func wrPCacheFetch(tls *libc.TLS, p uintptr, a uint32, b int32) uintptr { /* test_init.c:139:28: */ return (*(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 28 /* &.xFetch */))))(tls, p, a, b) } + func wrPCacheUnpin(tls *libc.TLS, p uintptr, a uintptr, b int32) { /* test_init.c:142:13: */ (*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 32 /* &.xUnpin */))))(tls, p, a, b) } + func wrPCacheRekey(tls *libc.TLS, p uintptr, a uintptr, b uint32, c uint32) { /* test_init.c:145:13: */ (*(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 36 /* &.xRekey */))))(tls, p, a, b, c) } + func wrPCacheTruncate(tls *libc.TLS, p uintptr, a uint32) { /* test_init.c:153:13: */ (*(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 40 /* &.xTruncate */))))(tls, p, a) } + func wrPCacheDestroy(tls *libc.TLS, p uintptr) { /* test_init.c:156:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 44 /* &.xDestroy */))))(tls, p) } @@ -67431,17 +67548,20 @@ var g2 = JtGlobal{} /* test_journal.c:207:24 */ func enterJtMutex(tls *libc.TLS) { /* test_journal.c:213:13: */ sqlite3.Xsqlite3_mutex_enter(tls, sqlite3.Xsqlite3_mutex_alloc(tls, 5)) } + func leaveJtMutex(tls *libc.TLS) { /* test_journal.c:216:13: */ sqlite3.Xsqlite3_mutex_leave(tls, sqlite3.Xsqlite3_mutex_alloc(tls, 5)) } + func stop_ioerr_simulation(tls *libc.TLS, piSave uintptr, piSave2 uintptr) { /* test_journal.c:222:13: */ - *(*int32)(unsafe.Pointer(piSave)) = sqlite3.Xsqlite3_io_error_pending + *(*int32)(unsafe.Pointer(piSave)) = libc.AtomicLoadInt32(&sqlite3.Xsqlite3_io_error_pending) *(*int32)(unsafe.Pointer(piSave2)) = sqlite3.Xsqlite3_io_error_hit - sqlite3.Xsqlite3_io_error_pending = -1 + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(-1)) sqlite3.Xsqlite3_io_error_hit = 0 } + func start_ioerr_simulation(tls *libc.TLS, iSave int32, iSave2 int32) { /* test_journal.c:228:13: */ - sqlite3.Xsqlite3_io_error_pending = iSave + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(iSave)) sqlite3.Xsqlite3_io_error_hit = iSave2 } @@ -68381,6 +68501,7 @@ func faultsimPending(tls *libc.TLS) int32 { /* test_malloc.c:160:12: */ func faultsimBeginBenign(tls *libc.TLS) { /* test_malloc.c:169:13: */ memfault.FisBenignMode++ } + func faultsimEndBenign(tls *libc.TLS) { /* test_malloc.c:172:13: */ memfault.FisBenignMode-- } @@ -68486,6 +68607,7 @@ __3: } var zHex = *(*[17]int8)(unsafe.Pointer(ts + 30109 /* "0123456789abcdef" */)) /* test_malloc.c:240:21 */ + func hexToInt(tls *libc.TLS, h int32) int32 { /* test_malloc.c:262:12: */ if (h >= '0') && (h <= '9') { return (h - '0') @@ -68496,6 +68618,7 @@ func hexToInt(tls *libc.TLS, h int32) int32 { /* test_malloc.c:262:12: */ } return int32(0) } + func textToPointer(tls *libc.TLS, z uintptr, pp uintptr) int32 { /* test_malloc.c:271:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -70339,6 +70462,7 @@ func md5step(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test } } } + func md5finalize(tls *libc.TLS, context uintptr) { /* test_md5.c:432:13: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -70353,6 +70477,7 @@ func md5finalize(tls *libc.TLS, context uintptr) { /* test_md5.c:432:13: */ MD5DigestToBase16(tls, bp /* &digest[0] */, bp+16 /* &zBuf[0] */) sqlite3.Xsqlite3_result_text(tls, context, bp+16 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) } + func Md5_Register(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pThunk uintptr) int32 { /* test_md5.c:441:5: */ var rc int32 = sqlite3.Xsqlite3_create_function(tls, db, ts+33518 /* "md5sum" */, -1, 1, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { @@ -70905,30 +71030,39 @@ func multiplexDelete(tls *libc.TLS, pVfs uintptr, zName uintptr, syncDir int32) func multiplexAccess(tls *libc.TLS, a uintptr, b uintptr, c int32, d uintptr) int32 { /* test_multiplex.c:656:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 32 /* &.xAccess */))))(tls, gMultiplex.FpOrigVfs, b, c, d) } + func multiplexFullPathname(tls *libc.TLS, a uintptr, b uintptr, c int32, d uintptr) int32 { /* test_multiplex.c:659:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 36 /* &.xFullPathname */))))(tls, gMultiplex.FpOrigVfs, b, c, d) } + func multiplexDlOpen(tls *libc.TLS, a uintptr, b uintptr) uintptr { /* test_multiplex.c:662:13: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((gMultiplex.FpOrigVfs + 40 /* &.xDlOpen */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexDlError(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_multiplex.c:665:13: */ (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((gMultiplex.FpOrigVfs + 44 /* &.xDlError */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexDlSym(tls *libc.TLS, a uintptr, b uintptr, c uintptr) uintptr { /* test_multiplex.c:668:13: */ return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((gMultiplex.FpOrigVfs + 48 /* &.xDlSym */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexDlClose(tls *libc.TLS, a uintptr, b uintptr) { /* test_multiplex.c:671:13: */ (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((gMultiplex.FpOrigVfs + 52 /* &.xDlClose */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexRandomness(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { /* test_multiplex.c:674:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 56 /* &.xRandomness */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexSleep(tls *libc.TLS, a uintptr, b int32) int32 { /* test_multiplex.c:677:12: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 60 /* &.xSleep */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexCurrentTime(tls *libc.TLS, a uintptr, b uintptr) int32 { /* test_multiplex.c:680:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 64 /* &.xCurrentTime */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexGetLastError(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { /* test_multiplex.c:683:12: */ if (*sqlite3_vfs)(unsafe.Pointer(gMultiplex.FpOrigVfs)).FxGetLastError != 0 { return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 68 /* &.xGetLastError */))))(tls, gMultiplex.FpOrigVfs, b, c) @@ -70937,6 +71071,7 @@ func multiplexGetLastError(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { } return int32(0) } + func multiplexCurrentTimeInt64(tls *libc.TLS, a uintptr, b uintptr) int32 { /* test_multiplex.c:690:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 72 /* &.xCurrentTimeInt64 */))))(tls, gMultiplex.FpOrigVfs, b) } @@ -71314,7 +71449,7 @@ func multiplexShmMap(tls *libc.TLS, pConn uintptr, iRegion int32, szRegion int32 var pSubOpen uintptr = multiplexSubOpen(tls, (*multiplexConn)(unsafe.Pointer(p)).FpGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen != 0 { - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 52 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 52 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, libc.AtomicLoadUintptr(&pp)) } return 10 } @@ -73589,16 +73724,18 @@ func vfslogShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 25, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } + func vfslogShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* test_osinst.c:442:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) - rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 52 /* &.xShmMap */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 52 /* &.xShmMap */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 23, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } + func vfslogShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_osinst.c:458:13: */ var t sqlite3_uint64 var p uintptr = pFile @@ -73607,6 +73744,7 @@ func vfslogShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_osinst.c:458:13: * t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 26, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), 0, 0, 0) } + func vfslogShmUnmap(tls *libc.TLS, pFile uintptr, deleteFlag int32) int32 { /* test_osinst.c:466:12: */ var rc int32 var t sqlite3_uint64 @@ -73715,17 +73853,18 @@ func vfslogCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* func vfslogGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* test_osinst.c:610:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 68 /* &.xGetLastError */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, a, b) } + func vfslogCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* test_osinst.c:613:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 72 /* &.xCurrentTimeInt64 */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, p) } func vfslog_flush(tls *libc.TLS, p uintptr) { /* test_osinst.c:617:13: */ - var pending int32 = sqlite3.Xsqlite3_io_error_pending + var pending int32 = libc.AtomicLoadInt32(&sqlite3.Xsqlite3_io_error_pending) var persist int32 = sqlite3.Xsqlite3_io_error_persist var diskfull int32 = sqlite3.Xsqlite3_diskfull_pending - sqlite3.Xsqlite3_io_error_pending = 0 + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(0)) sqlite3.Xsqlite3_io_error_persist = 0 sqlite3.Xsqlite3_diskfull_pending = 0 @@ -73735,7 +73874,7 @@ func vfslog_flush(tls *libc.TLS, p uintptr) { /* test_osinst.c:617:13: */ (*VfslogVfs)(unsafe.Pointer(p)).FnBuf = 0 } - sqlite3.Xsqlite3_io_error_pending = pending + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(pending)) sqlite3.Xsqlite3_io_error_persist = persist sqlite3.Xsqlite3_diskfull_pending = diskfull } @@ -74959,6 +75098,7 @@ var gQuota struct { func quotaEnter(tls *libc.TLS) { /* test_quota.c:190:13: */ sqlite3.Xsqlite3_mutex_enter(tls, gQuota.FpMutex) } + func quotaLeave(tls *libc.TLS) { /* test_quota.c:191:13: */ sqlite3.Xsqlite3_mutex_leave(tls, gQuota.FpMutex) } @@ -75425,7 +75565,7 @@ func quotaDeviceCharacteristics(tls *libc.TLS, pConn uintptr) int32 { /* test_qu // Pass xShmMap requests through to the original VFS unchanged. func quotaShmMap(tls *libc.TLS, pConn uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* test_quota.c:700:12: */ var pSubOpen uintptr = quotaSubOpen(tls, pConn) - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 52 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 52 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, libc.AtomicLoadUintptr(&pp)) } // Pass xShmLock requests through to the original VFS unchanged. @@ -78096,6 +78236,7 @@ func sqlite3_client_open(tls *libc.TLS, zDatabaseName uintptr, ppDb uintptr) int *(*uintptr)(unsafe.Pointer(ppDb)) = (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FpDb return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_prepare(tls *libc.TLS, pDb uintptr, zSql uintptr, nByte int32, ppStmt uintptr, pzTail uintptr) int32 { /* test_server.c:340:5: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -78113,6 +78254,7 @@ func sqlite3_client_prepare(tls *libc.TLS, pDb uintptr, zSql uintptr, nByte int3 } return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_step(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c:357:5: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -78124,6 +78266,7 @@ func sqlite3_client_step(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c: sendToServer(tls, bp /* &msg */) return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_reset(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c:364:5: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -78135,6 +78278,7 @@ func sqlite3_client_reset(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c sendToServer(tls, bp /* &msg */) return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c:371:5: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -78146,6 +78290,7 @@ func sqlite3_client_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* test_serve sendToServer(tls, bp /* &msg */) return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_close(tls *libc.TLS, pDb uintptr) int32 { /* test_server.c:378:5: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -78455,7 +78600,7 @@ func superlockWalLock(tls *libc.TLS, db uintptr, pBusy uintptr) int32 { /* test_ if rc != 0 { return rc } - libc.Xmemset(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* p */)), 0, uint32(32)) + libc.Xmemset(tls, libc.AtomicLoadPUintptr(bp+4 /* p */), 0, uint32(32)) // Obtain exclusive locks on all the "read-lock" slots. Once these locks // are held, it is guaranteed that there are no active reader, writer or @@ -79652,6 +79797,7 @@ func tclvarConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uin } var zSchema = *(*[100]int8)(unsafe.Pointer(ts + 36295 /* "CREATE TABLE x( ..." */)) /* test_tclvar.c:88:21 */ + // Note that for this virtual table, the xCreate and xConnect // methods are identical. @@ -80956,6 +81102,7 @@ func tvfsInjectIoerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:269:12: */ func tvfsInjectFullerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:273:12: */ return tvfsInjectFault(tls, (p + 48 /* &.full_err */)) } + func tvfsInjectCantopenerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:276:12: */ return tvfsInjectFault(tls, (p + 60 /* &.cantopen_err */)) } @@ -81563,7 +81710,7 @@ func tvfsShmMap(tls *libc.TLS, pFile uintptr, iPage int32, pgsz int32, isWrite i var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if (*Testvfs)(unsafe.Pointer(p)).FisFullshm != 0 { - return sqlite3.Xsqlite3OsShmMap(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, iPage, pgsz, isWrite, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, iPage, pgsz, isWrite, libc.AtomicLoadUintptr(&pp)) } if uintptr(0) == (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm { @@ -81597,7 +81744,7 @@ func tvfsShmMap(tls *libc.TLS, pFile uintptr, iPage int32, pgsz int32, isWrite i tvfsAllocPage(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm, iPage, pgsz) } if (*(*int32)(unsafe.Pointer(bp /* rc */)) == 0) || (*(*int32)(unsafe.Pointer(bp /* rc */)) == 8) { - *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer(((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm + 8 /* &.aPage */) + uintptr(iPage)*4)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer(((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm + 8 /* &.aPage */) + uintptr(iPage)*4)) } return *(*int32)(unsafe.Pointer(bp /* rc */)) @@ -82563,11 +82710,11 @@ func test_vfs_set_readmark(tls *libc.TLS, clientData uintptr, interp uintptr, ob tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return 1 } - if *(*uintptr)(unsafe.Pointer(bp + 32 /* pShm */)) == uintptr(0) { + if libc.AtomicLoadPUintptr(bp+32 /* pShm */) == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+38116 /* "*-shm is not yet..." */, 0)) return 1 } - aShm = *(*uintptr)(unsafe.Pointer(bp + 32 /* pShm */)) + aShm = libc.AtomicLoadPUintptr(bp + 32 /* pShm */) iOff = (((12 * 2) + 1) + *(*int32)(unsafe.Pointer(bp + 20 /* iSlot */))) if objc == 5 { @@ -82719,6 +82866,7 @@ func doTestWindowFinalize(tls *libc.TLS, bValue int32, ctx uintptr) { /* test_wi func testWindowStep(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* test_window.c:107:13: */ doTestWindowStep(tls, 0, ctx, nArg, apArg) } + func testWindowInverse(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* test_window.c:114:13: */ doTestWindowStep(tls, 1, ctx, nArg, apArg) } @@ -82726,6 +82874,7 @@ func testWindowInverse(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { func testWindowFinal(tls *libc.TLS, ctx uintptr) { /* test_window.c:122:13: */ doTestWindowFinalize(tls, 0, ctx) } + func testWindowValue(tls *libc.TLS, ctx uintptr) { /* test_window.c:125:13: */ doTestWindowFinalize(tls, 1, ctx) } diff --git a/internal/testfixture/testfixture_linux_arm64.go b/internal/testfixture/testfixture_linux_arm64.go index da9c2f6..6cb180f 100644 --- a/internal/testfixture/testfixture_linux_arm64.go +++ b/internal/testfixture/testfixture_linux_arm64.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DTCLSH_INIT_PROC=sqlite3TestInit -D_HAVE_SQLITE_CONFIG_H -I/usr/include/tcl8.6 -export-defines "" -export-fields F -trace-translation-units -lmodernc.org/tcl/lib,modernc.org/sqlite/internal/libc2,modernc.org/sqlite/lib -o internal/testfixture/testfixture_linux_arm64.go -Itestdata/sqlite-src-3330000/ext/async -Itestdata/sqlite-src-3330000/ext/fts3 -Itestdata/sqlite-src-3330000/ext/icu -Itestdata/sqlite-src-3330000/ext/rtree -Itestdata/sqlite-src-3330000/ext/session -Itestdata/sqlite-src-3330000/ext/userauth -Itestdata/sqlite-src-3330000/src -Itestdata/sqlite-amalgamation-3330000 -Itestdata/sqlite-src-3330000 testdata/sqlite-src-3330000/ext/expert/sqlite3expert.c testdata/sqlite-src-3330000/ext/expert/test_expert.c testdata/sqlite-src-3330000/ext/fts3/fts3_term.c testdata/sqlite-src-3330000/ext/fts3/fts3_test.c testdata/sqlite-src-3330000/ext/fts5/fts5_tcl.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_mi.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_tok.c testdata/sqlite-src-3330000/ext/misc/amatch.c testdata/sqlite-src-3330000/ext/misc/carray.c testdata/sqlite-src-3330000/ext/misc/closure.c testdata/sqlite-src-3330000/ext/misc/csv.c testdata/sqlite-src-3330000/ext/misc/decimal.c testdata/sqlite-src-3330000/ext/misc/eval.c testdata/sqlite-src-3330000/ext/misc/explain.c testdata/sqlite-src-3330000/ext/misc/fileio.c testdata/sqlite-src-3330000/ext/misc/fuzzer.c testdata/sqlite-src-3330000/ext/misc/ieee754.c testdata/sqlite-src-3330000/ext/misc/mmapwarm.c testdata/sqlite-src-3330000/ext/misc/nextchar.c testdata/sqlite-src-3330000/ext/misc/normalize.c testdata/sqlite-src-3330000/ext/misc/percentile.c testdata/sqlite-src-3330000/ext/misc/prefixes.c testdata/sqlite-src-3330000/ext/misc/regexp.c testdata/sqlite-src-3330000/ext/misc/remember.c testdata/sqlite-src-3330000/ext/misc/series.c testdata/sqlite-src-3330000/ext/misc/spellfix.c testdata/sqlite-src-3330000/ext/misc/totype.c testdata/sqlite-src-3330000/ext/misc/unionvtab.c testdata/sqlite-src-3330000/ext/misc/wholenumber.c testdata/sqlite-src-3330000/ext/misc/zipfile.c testdata/sqlite-src-3330000/ext/rbu/test_rbu.c testdata/sqlite-src-3330000/ext/userauth/userauth.c testdata/sqlite-src-3330000/src/tclsqlite.c testdata/sqlite-src-3330000/src/test1.c testdata/sqlite-src-3330000/src/test2.c testdata/sqlite-src-3330000/src/test3.c testdata/sqlite-src-3330000/src/test4.c testdata/sqlite-src-3330000/src/test5.c testdata/sqlite-src-3330000/src/test6.c testdata/sqlite-src-3330000/src/test7.c testdata/sqlite-src-3330000/src/test8.c testdata/sqlite-src-3330000/src/test9.c testdata/sqlite-src-3330000/src/test_async.c testdata/sqlite-src-3330000/src/test_autoext.c testdata/sqlite-src-3330000/src/test_backup.c testdata/sqlite-src-3330000/src/test_bestindex.c testdata/sqlite-src-3330000/src/test_blob.c testdata/sqlite-src-3330000/src/test_btree.c testdata/sqlite-src-3330000/src/test_config.c testdata/sqlite-src-3330000/src/test_delete.c testdata/sqlite-src-3330000/src/test_demovfs.c testdata/sqlite-src-3330000/src/test_devsym.c testdata/sqlite-src-3330000/src/test_fs.c testdata/sqlite-src-3330000/src/test_func.c testdata/sqlite-src-3330000/src/test_hexio.c testdata/sqlite-src-3330000/src/test_init.c testdata/sqlite-src-3330000/src/test_intarray.c testdata/sqlite-src-3330000/src/test_journal.c testdata/sqlite-src-3330000/src/test_malloc.c testdata/sqlite-src-3330000/src/test_md5.c testdata/sqlite-src-3330000/src/test_multiplex.c testdata/sqlite-src-3330000/src/test_mutex.c testdata/sqlite-src-3330000/src/test_onefile.c testdata/sqlite-src-3330000/src/test_osinst.c testdata/sqlite-src-3330000/src/test_pcache.c testdata/sqlite-src-3330000/src/test_quota.c testdata/sqlite-src-3330000/src/test_rtree.c testdata/sqlite-src-3330000/src/test_schema.c testdata/sqlite-src-3330000/src/test_server.c testdata/sqlite-src-3330000/src/test_superlock.c testdata/sqlite-src-3330000/src/test_syscall.c testdata/sqlite-src-3330000/src/test_tclsh.c testdata/sqlite-src-3330000/src/test_tclvar.c testdata/sqlite-src-3330000/src/test_thread.c testdata/sqlite-src-3330000/src/test_vdbecov.c testdata/sqlite-src-3330000/src/test_vfs.c testdata/sqlite-src-3330000/src/test_windirent.c testdata/sqlite-src-3330000/src/test_window.c testdata/sqlite-src-3330000/src/test_wsd.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DTCLSH_INIT_PROC=sqlite3TestInit -D_HAVE_SQLITE_CONFIG_H -I/usr/include/tcl8.6 -export-defines "" -export-fields F -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count -lmodernc.org/tcl/lib,modernc.org/sqlite/internal/libc2,modernc.org/sqlite/lib -o internal/testfixture/testfixture_linux_arm64.go -Itestdata/sqlite-src-3330000/ext/async -Itestdata/sqlite-src-3330000/ext/fts3 -Itestdata/sqlite-src-3330000/ext/icu -Itestdata/sqlite-src-3330000/ext/rtree -Itestdata/sqlite-src-3330000/ext/session -Itestdata/sqlite-src-3330000/ext/userauth -Itestdata/sqlite-src-3330000/src -Itestdata/sqlite-amalgamation-3330000 -Itestdata/sqlite-src-3330000 testdata/sqlite-src-3330000/ext/expert/sqlite3expert.c testdata/sqlite-src-3330000/ext/expert/test_expert.c testdata/sqlite-src-3330000/ext/fts3/fts3_term.c testdata/sqlite-src-3330000/ext/fts3/fts3_test.c testdata/sqlite-src-3330000/ext/fts5/fts5_tcl.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_mi.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_tok.c testdata/sqlite-src-3330000/ext/misc/amatch.c testdata/sqlite-src-3330000/ext/misc/carray.c testdata/sqlite-src-3330000/ext/misc/closure.c testdata/sqlite-src-3330000/ext/misc/csv.c testdata/sqlite-src-3330000/ext/misc/decimal.c testdata/sqlite-src-3330000/ext/misc/eval.c testdata/sqlite-src-3330000/ext/misc/explain.c testdata/sqlite-src-3330000/ext/misc/fileio.c testdata/sqlite-src-3330000/ext/misc/fuzzer.c testdata/sqlite-src-3330000/ext/misc/ieee754.c testdata/sqlite-src-3330000/ext/misc/mmapwarm.c testdata/sqlite-src-3330000/ext/misc/nextchar.c testdata/sqlite-src-3330000/ext/misc/normalize.c testdata/sqlite-src-3330000/ext/misc/percentile.c testdata/sqlite-src-3330000/ext/misc/prefixes.c testdata/sqlite-src-3330000/ext/misc/regexp.c testdata/sqlite-src-3330000/ext/misc/remember.c testdata/sqlite-src-3330000/ext/misc/series.c testdata/sqlite-src-3330000/ext/misc/spellfix.c testdata/sqlite-src-3330000/ext/misc/totype.c testdata/sqlite-src-3330000/ext/misc/unionvtab.c testdata/sqlite-src-3330000/ext/misc/wholenumber.c testdata/sqlite-src-3330000/ext/misc/zipfile.c testdata/sqlite-src-3330000/ext/rbu/test_rbu.c testdata/sqlite-src-3330000/ext/userauth/userauth.c testdata/sqlite-src-3330000/src/tclsqlite.c testdata/sqlite-src-3330000/src/test1.c testdata/sqlite-src-3330000/src/test2.c testdata/sqlite-src-3330000/src/test3.c testdata/sqlite-src-3330000/src/test4.c testdata/sqlite-src-3330000/src/test5.c testdata/sqlite-src-3330000/src/test6.c testdata/sqlite-src-3330000/src/test7.c testdata/sqlite-src-3330000/src/test8.c testdata/sqlite-src-3330000/src/test9.c testdata/sqlite-src-3330000/src/test_async.c testdata/sqlite-src-3330000/src/test_autoext.c testdata/sqlite-src-3330000/src/test_backup.c testdata/sqlite-src-3330000/src/test_bestindex.c testdata/sqlite-src-3330000/src/test_blob.c testdata/sqlite-src-3330000/src/test_btree.c testdata/sqlite-src-3330000/src/test_config.c testdata/sqlite-src-3330000/src/test_delete.c testdata/sqlite-src-3330000/src/test_demovfs.c testdata/sqlite-src-3330000/src/test_devsym.c testdata/sqlite-src-3330000/src/test_fs.c testdata/sqlite-src-3330000/src/test_func.c testdata/sqlite-src-3330000/src/test_hexio.c testdata/sqlite-src-3330000/src/test_init.c testdata/sqlite-src-3330000/src/test_intarray.c testdata/sqlite-src-3330000/src/test_journal.c testdata/sqlite-src-3330000/src/test_malloc.c testdata/sqlite-src-3330000/src/test_md5.c testdata/sqlite-src-3330000/src/test_multiplex.c testdata/sqlite-src-3330000/src/test_mutex.c testdata/sqlite-src-3330000/src/test_onefile.c testdata/sqlite-src-3330000/src/test_osinst.c testdata/sqlite-src-3330000/src/test_pcache.c testdata/sqlite-src-3330000/src/test_quota.c testdata/sqlite-src-3330000/src/test_rtree.c testdata/sqlite-src-3330000/src/test_schema.c testdata/sqlite-src-3330000/src/test_server.c testdata/sqlite-src-3330000/src/test_superlock.c testdata/sqlite-src-3330000/src/test_syscall.c testdata/sqlite-src-3330000/src/test_tclsh.c testdata/sqlite-src-3330000/src/test_tclvar.c testdata/sqlite-src-3330000/src/test_thread.c testdata/sqlite-src-3330000/src/test_vdbecov.c testdata/sqlite-src-3330000/src/test_vfs.c testdata/sqlite-src-3330000/src/test_windirent.c testdata/sqlite-src-3330000/src/test_window.c testdata/sqlite-src-3330000/src/test_wsd.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -15,6 +16,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -3532,6 +3534,10 @@ const ( /* resource.h:158:1: */ // All of its terminated child processes. RUSAGE_CHILDREN = -1 +) + +// Whose usage statistics do you want? +const ( /* resource.h:158:1: */ // The calling thread. RUSAGE_THREAD = 1 ) @@ -3546,9 +3552,15 @@ const ( /* resource.h:187:1: */ PRIO_USER = 2 ) -// Convenience macros for operations on timevals. -// NOTE: `timercmp' does not work for >= or <=. +// end block for C++ +// Local Variables: +// mode: c +// c-basic-offset: 4 +// fill-column: 78 +// End: + +// Needed for the setrlimit() system call on unix // Copyright (C) 1992-2018 Free Software Foundation, Inc. // This file is part of the GNU C Library. // @@ -7850,6 +7862,7 @@ var expertModule = sqlite3_module{ FxShadowName:// xRollbackTo uintptr(0), // xShadowName } /* sqlite3expert.c:623:25 */ + // // End of virtual table implementation. // @@ -15580,6 +15593,7 @@ func amatchStrcpy(tls *libc.TLS, dest uintptr, src uintptr) { /* amatch.c:1005:1 for (int32(libc.AssignPtrInt8(libc.PostIncUintptr(&dest, 1), *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&src, 1)))))) != 0 { } } + func amatchStrcat(tls *libc.TLS, dest uintptr, src uintptr) { /* amatch.c:1008:13: */ for *(*int8)(unsafe.Pointer(dest)) != 0 { dest++ @@ -19043,6 +19057,7 @@ func decimalAddFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { decimal_free(tls, pA) decimal_free(tls, pB) } + func decimalSubFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:454:13: */ var pA uintptr = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), 0, uintptr(0)) var pB uintptr = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), 0, uintptr(0)) @@ -19087,6 +19102,7 @@ func decimalSumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { decimal_add(tls, p, pArg) decimal_free(tls, pArg) } + func decimalSumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:501:13: */ var p uintptr var pArg uintptr @@ -19105,6 +19121,7 @@ func decimalSumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) decimal_add(tls, p, pArg) decimal_free(tls, pArg) } + func decimalSumValue(tls *libc.TLS, context uintptr) { /* decimal.c:517:13: */ var p uintptr = sqlite3.Xsqlite3_aggregate_context(tls, context, 0) if p == uintptr(0) { @@ -19112,6 +19129,7 @@ func decimalSumValue(tls *libc.TLS, context uintptr) { /* decimal.c:517:13: */ } decimal_result(tls, context, p) } + func decimalSumFinalize(tls *libc.TLS, context uintptr) { /* decimal.c:522:13: */ var p uintptr = sqlite3.Xsqlite3_aggregate_context(tls, context, 0) if p == uintptr(0) { @@ -22610,6 +22628,7 @@ func ieee754func_from_blob(tls *libc.TLS, context uintptr, argc int32, argv uint sqlite3.Xsqlite3_result_double(tls, context, *(*float64)(unsafe.Pointer(bp /* r */))) } } + func ieee754func_to_blob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* ieee754.c:225:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -24437,6 +24456,7 @@ func re_next_char(tls *libc.TLS, p uintptr) uint32 { /* regexp.c:147:17: */ } return c } + func re_next_char_nocase(tls *libc.TLS, p uintptr) uint32 { /* regexp.c:172:17: */ var c uint32 = re_next_char(tls, p) if (c >= uint32('A')) && (c <= uint32('Z')) { @@ -26830,6 +26850,7 @@ func editDist3ConfigClear(tls *libc.TLS, p uintptr) { /* spellfix.c:640:13: */ sqlite3.Xsqlite3_free(tls, (*EditDist3Config)(unsafe.Pointer(p)).Fa) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(EditDist3Config{}))) } + func editDist3ConfigDelete(tls *libc.TLS, pIn uintptr) { /* spellfix.c:655:13: */ var p uintptr = pIn editDist3ConfigClear(tls, p) @@ -30321,9 +30342,11 @@ func spellfix1Uninit(tls *libc.TLS, isDestroy int32, pVTab uintptr) int32 { /* s } return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } + func spellfix1Disconnect(tls *libc.TLS, pVTab uintptr) int32 { /* spellfix.c:1994:12: */ return spellfix1Uninit(tls, 0, pVTab) } + func spellfix1Destroy(tls *libc.TLS, pVTab uintptr) int32 { /* spellfix.c:1997:12: */ return spellfix1Uninit(tls, 1, pVTab) } @@ -30438,6 +30461,7 @@ func spellfix1Init(tls *libc.TLS, isCreate int32, db uintptr, pAux uintptr, argc func spellfix1Connect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* spellfix.c:2133:12: */ return spellfix1Init(tls, 0, db, pAux, argc, argv, ppVTab, pzErr) } + func spellfix1Create(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* spellfix.c:2142:12: */ return spellfix1Init(tls, 1, db, pAux, argc, argv, ppVTab, pzErr) } @@ -34722,6 +34746,7 @@ func zipfileTableErr(tls *libc.TLS, pTab uintptr, zFmt uintptr, va uintptr) { /* (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) _ = ap } + func zipfileCursorErr(tls *libc.TLS, pCsr uintptr, zFmt uintptr, va uintptr) { /* zipfile.c:486:13: */ var ap va_list _ = ap @@ -37743,7 +37768,10 @@ type fpsimd_context = struct { } Ffpsr uint32 Ffpcr uint32 - Fvregs [32][2]uint64 + Fvregs [32]struct { + Flo uint64 + Fhi uint64 + } } /* sigcontext.h:73:1 */ // ESR_EL1 context @@ -38038,9 +38066,12 @@ type user_regs_struct = struct { } /* user.h:22:1 */ type user_fpsimd_struct = struct { - Fvregs [32][2]uint64 - Ffpsr uint32 - Ffpcr uint32 + Fvregs [32]struct { + Flo uint64 + Fhi uint64 + } + Ffpsr uint32 + Ffpcr uint32 } /* user.h:30:1 */ // Type for a general-purpose register. @@ -38445,6 +38476,7 @@ func incrblobSeek(tls *libc.TLS, instanceData ClientData, offset int64, seekMode func incrblobWatch(tls *libc.TLS, instanceData ClientData, mode int32) { /* tclsqlite.c:355:27: */ // NO-OP } + func incrblobHandle(tls *libc.TLS, instanceData ClientData, dir int32, hPtr uintptr) int32 { /* tclsqlite.c:361:26: */ return 1 } @@ -43435,12 +43467,15 @@ func Sqlite3_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3877:12: } return rc } + func Tclsqlite3_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3891:12: */ return Sqlite3_Init(tls, interp) } + func Sqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3892:12: */ return 0 } + func Tclsqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3893:12: */ return 0 } @@ -43451,6 +43486,7 @@ func Tclsqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tc func Sqlite3_SafeInit(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3899:12: */ return 1 } + func Sqlite3_SafeUnload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3900:12: */ return 1 } @@ -43458,12 +43494,15 @@ func Sqlite3_SafeUnload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* t func Sqlite_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3905:5: */ return Sqlite3_Init(tls, interp) } + func Tclsqlite_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3906:5: */ return Sqlite3_Init(tls, interp) } + func Sqlite_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3907:5: */ return 0 } + func Tclsqlite_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3908:5: */ return 0 } @@ -45742,6 +45781,7 @@ func testHexToInt(tls *libc.TLS, h int32) int32 { /* test1.c:44:12: */ } return int32(0) } + func sqlite3TestTextToPtr(tls *libc.TLS, z uintptr) uintptr { /* test1.c:54:6: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -46062,6 +46102,7 @@ func db_enter(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv u sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* db */)))).Fmutex) return 0 } + func db_leave(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:396:26: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -46419,6 +46460,7 @@ func hex8Func(tls *libc.TLS, p uintptr, argc int32, argv uintptr) { /* test1.c:7 *(*int8)(unsafe.Pointer(bp + 8 /* &zBuf[0] */ + uintptr((i * 2)))) = int8(0) sqlite3.Xsqlite3_result_text(tls, p, bp+8 /* zBuf */, -1, libc.UintptrFromInt32(-1)) } + func hex16Func(tls *libc.TLS, p uintptr, argc int32, argv uintptr) { /* test1.c:760:13: */ bp := tls.Alloc(408) defer tls.Free(408) @@ -46785,6 +46827,7 @@ type t1CountCtx1 = struct{ Fn int32 } /* test1.c:1123:9 */ // is reported on the step function. If the total count is 42, then // a UTF-8 error is reported on the finalize function. type t1CountCtx = t1CountCtx1 /* test1.c:1123:27 */ + func t1CountStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test1.c:1127:13: */ bp := tls.Alloc(9) defer tls.Free(9) @@ -46804,6 +46847,7 @@ func t1CountStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* } } } + func t1CountFinalize(tls *libc.TLS, context uintptr) { /* test1.c:1149:13: */ var p uintptr p = sqlite3.Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(t1CountCtx{}))) @@ -47382,6 +47426,7 @@ type TestCollationX1 = struct { } /* test1.c:1715:1 */ type TestCollationX = TestCollationX1 /* test1.c:1720:31 */ + func testCreateCollationDel(tls *libc.TLS, pCtx uintptr) { /* test1.c:1721:13: */ var p uintptr = pCtx @@ -47404,6 +47449,7 @@ func testCreateCollationDel(tls *libc.TLS, pCtx uintptr) { /* test1.c:1721:13: * } sqlite3.Xsqlite3_free(tls, p) } + func testCreateCollationCmp(tls *libc.TLS, pCtx uintptr, nLeft int32, zLeft uintptr, nRight int32, zRight uintptr) int32 { /* test1.c:1733:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -47429,6 +47475,7 @@ func testCreateCollationCmp(tls *libc.TLS, pCtx uintptr, nLeft int32, zLeft uint return *(*int32)(unsafe.Pointer(bp /* iRes */)) } + func test_create_collation_v2(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1757:26: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -47494,12 +47541,16 @@ type CreateFunctionV21 = struct { // -final SCRIPT // -destroy SCRIPT type CreateFunctionV2 = CreateFunctionV21 /* test1.c:1804:33 */ + func cf2Func(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* test1.c:1812:13: */ } + func cf2Step(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* test1.c:1814:13: */ } + func cf2Final(tls *libc.TLS, ctx uintptr) { /* test1.c:1816:13: */ } + func cf2Destroy(tls *libc.TLS, pUser uintptr) { /* test1.c:1818:13: */ var p uintptr = pUser @@ -47544,6 +47595,7 @@ func cf2Destroy(tls *libc.TLS, pUser uintptr) { /* test1.c:1818:13: */ } sqlite3.Xsqlite3_free(tls, p) } + func test_create_function_v2(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1832:26: */ bp := tls.Alloc(180) defer tls.Free(180) @@ -48270,7 +48322,9 @@ func test_snapshot_cmp_blob(tls *libc.TLS, clientData uintptr, interp uintptr, o res = sqlite3.Xsqlite3_snapshot_cmp(tls, p1, p2) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, res)) return 0 -} // in test_delete.c +} + +// in test_delete.c func test_delete_database(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2581:26: */ var rc int32 var zFile uintptr @@ -48649,6 +48703,7 @@ func test_bind(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv // interp pointer to use when evaluating the TCL script is stored in // pTestCollateInterp. var pTestCollateInterp uintptr /* test1.c:2975:18: */ + func test_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintptr, nB int32, zB uintptr) int32 { /* test1.c:2976:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -48703,6 +48758,7 @@ func test_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintptr, nB int tcl.XTcl_GetIntFromObj(tls, i, tcl.XTcl_GetObjResult(tls, i), bp /* &res */) return *(*int32)(unsafe.Pointer(bp /* res */)) } + func test_collate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3026:26: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -48834,6 +48890,7 @@ func test_utf16bin_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintpt } return res } + func test_utf16bin_collate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3100:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -48950,6 +49007,7 @@ bad_args: // Both collating functions increment the unaligned utf16 counter // whenever they see a string that begins on an odd byte boundary. var unaligned_string_counter int32 = 0 /* test1.c:3192:12 */ + func alignmentCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* test1.c:3193:12: */ var rc int32 var n int32 @@ -48970,6 +49028,7 @@ func alignmentCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintpt } return rc } + func add_alignment_test_collations(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3208:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -49040,6 +49099,7 @@ func test_function_utf8(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function_utf16le(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3276:13: */ var interp uintptr var pX uintptr @@ -49063,6 +49123,7 @@ func test_function_utf16le(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr sqlite3.Xsqlite3_result_text(tls, pCtx, sqlite3.Xsqlite3_value_text(tls, pVal), -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function_utf16be(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3298:13: */ var interp uintptr var pX uintptr @@ -49091,6 +49152,7 @@ func test_function_utf16be(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3326:26: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -49364,6 +49426,7 @@ func test_intarray_addr(tls *libc.TLS, clientData uintptr, interp uintptr, objc } var p uintptr = uintptr(0) /* test1.c:3540:14 */ + // Usage: intarray_addr INT ... // // Return the address of a C-language array of 32-bit integers. @@ -49400,6 +49463,7 @@ func test_int64array_addr(tls *libc.TLS, clientData uintptr, interp uintptr, obj } var p1 uintptr = uintptr(0) /* test1.c:3574:24 */ + // Usage: doublearray_addr INT ... // // Return the address of a C-language array of doubles. @@ -49430,6 +49494,7 @@ func test_doublearray_addr(tls *libc.TLS, clientData uintptr, interp uintptr, ob } var p2 uintptr = uintptr(0) /* test1.c:3610:17 */ + // Usage: textarray_addr TEXT ... // // Return the address of a C-language array of strings. @@ -50749,6 +50814,7 @@ func test_sql(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, obj tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_sql(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))), uintptr(1)) return 0 } + func test_ex_sql(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4784:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -52420,6 +52486,7 @@ type LogCallback = struct { // tclcmd: test_sqlite3_log ?SCRIPT? var logcallback = LogCallback{} /* test1.c:6707:3 */ + func xLogcallback(tls *libc.TLS, unused uintptr, err int32, zMsg uintptr) { /* test1.c:6708:13: */ var pNew uintptr = tcl.XTcl_DuplicateObj(tls, logcallback.FpObj) (*Tcl_Obj)(unsafe.Pointer(pNew)).FrefCount++ @@ -52434,6 +52501,7 @@ func xLogcallback(tls *libc.TLS, unused uintptr, err int32, zMsg uintptr) { /* t } } } + func test_sqlite3_log(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6718:26: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -54893,6 +54961,7 @@ func testPendingByte(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, var faultSimInterp uintptr = uintptr(0) /* test2.c:580:19 */ var faultSimScriptSize int32 = 0 /* test2.c:581:12 */ var faultSimScript uintptr /* test2.c:582:13: */ + func faultSimCallback(tls *libc.TLS, x int32) int32 { /* test2.c:583:12: */ bp := tls.Alloc(38) defer tls.Free(38) @@ -58035,6 +58104,7 @@ func test_translate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int3 return 0 } + func test_translate_selftest(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test5.c:189:26: */ sqlite3.Xsqlite3UtfSelfTest(tls) return 0 @@ -58137,9 +58207,11 @@ var sqlite3CrashTestEnable int32 = 0 /* test6.c:161:12 */ func crash_malloc(tls *libc.TLS, nByte int32) uintptr { /* test6.c:163:13: */ return tcl.XTcl_AttemptAlloc(tls, uint32(size_t(nByte))) } + func crash_free(tls *libc.TLS, p uintptr) { /* test6.c:166:13: */ tcl.XTcl_Free(tls, p) } + func crash_realloc(tls *libc.TLS, p uintptr, n int32) uintptr { /* test6.c:169:13: */ return tcl.XTcl_AttemptRealloc(tls, p, uint32(size_t(n))) } @@ -58444,12 +58516,15 @@ func cfFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* test6.c: func cfLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test6.c:514:12: */ return sqlite3.Xsqlite3OsLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, eLock) } + func cfUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test6.c:517:12: */ return sqlite3.Xsqlite3OsUnlock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, eLock) } + func cfCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* test6.c:520:12: */ return sqlite3.Xsqlite3OsCheckReservedLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, pResOut) } + func cfFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* test6.c:523:12: */ if op == 5 { var pCrash uintptr = pFile @@ -58470,6 +58545,7 @@ func cfFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { func cfSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:542:12: */ return g.FiSectorSize } + func cfDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:545:12: */ return g.FiDeviceCharacteristics } @@ -58478,14 +58554,17 @@ func cfDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:54 func cfShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* test6.c:552:12: */ return sqlite3.Xsqlite3OsShmLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, ofst, n, flags) } + func cfShmBarrier(tls *libc.TLS, pFile uintptr) { /* test6.c:555:13: */ sqlite3.Xsqlite3OsShmBarrier(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile) } + func cfShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* test6.c:558:12: */ return sqlite3.Xsqlite3OsShmUnmap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, delFlag) } + func cfShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, sz int32, w int32, pp uintptr) int32 { /* test6.c:561:12: */ - return sqlite3.Xsqlite3OsShmMap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, iRegion, sz, w, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, iRegion, sz, w, libc.AtomicLoadUintptr(&pp)) } var CrashFileVtab = sqlite3_io_methods{ @@ -58591,42 +58670,52 @@ func cfDelete(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, dirSync int32) int32 var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pVfs + 48 /* &.xDelete */))))(tls, pVfs, zPath, dirSync) } + func cfAccess(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* test6.c:665:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 56 /* &.xAccess */))))(tls, pVfs, zPath, flags, pResOut) } + func cfFullPathname(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* test6.c:674:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 64 /* &.xFullPathname */))))(tls, pVfs, zPath, nPathOut, zPathOut) } + func cfDlOpen(tls *libc.TLS, pCfVfs uintptr, zPath uintptr) uintptr { /* test6.c:683:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 72 /* &.xDlOpen */))))(tls, pVfs, zPath) } + func cfDlError(tls *libc.TLS, pCfVfs uintptr, nByte int32, zErrMsg uintptr) { /* test6.c:687:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pVfs + 80 /* &.xDlError */))))(tls, pVfs, nByte, zErrMsg) } + func cfDlSym(tls *libc.TLS, pCfVfs uintptr, pH uintptr, zSym uintptr) uintptr { /* test6.c:691:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 88 /* &.xDlSym */))))(tls, pVfs, pH, zSym) } + func cfDlClose(tls *libc.TLS, pCfVfs uintptr, pHandle uintptr) { /* test6.c:695:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pVfs + 96 /* &.xDlClose */))))(tls, pVfs, pHandle) } + func cfRandomness(tls *libc.TLS, pCfVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* test6.c:699:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 104 /* &.xRandomness */))))(tls, pVfs, nByte, zBufOut) } + func cfSleep(tls *libc.TLS, pCfVfs uintptr, nMicro int32) int32 { /* test6.c:703:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pVfs + 112 /* &.xSleep */))))(tls, pVfs, nMicro) } + func cfCurrentTime(tls *libc.TLS, pCfVfs uintptr, pTimeOut uintptr) int32 { /* test6.c:707:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pVfs + 120 /* &.xCurrentTime */))))(tls, pVfs, pTimeOut) } + func cfGetLastError(tls *libc.TLS, pCfVfs uintptr, n int32, z uintptr) int32 { /* test6.c:711:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 128 /* &.xGetLastError */))))(tls, pVfs, n, z) @@ -60931,6 +61020,7 @@ func echoTransactionCall(tls *libc.TLS, tab uintptr, zCall uintptr) int32 { /* t sqlite3.Xsqlite3_free(tls, z) return 0 } + func echoBegin(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1111:12: */ var rc int32 var pVtab uintptr = tab @@ -60960,6 +61050,7 @@ func echoBegin(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1111:12: */ } return rc } + func echoSync(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1142:12: */ var rc int32 var pVtab uintptr = tab @@ -60986,6 +61077,7 @@ func echoSync(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1142:12: */ } return rc } + func echoCommit(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1170:12: */ var pVtab uintptr = tab var rc int32 @@ -61003,6 +61095,7 @@ func echoCommit(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1170:12: */ (*echo_vtab)(unsafe.Pointer(pVtab)).FinTransaction = 0 return rc } + func echoRollback(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1188:12: */ var rc int32 var pVtab uintptr = tab @@ -63493,9 +63586,11 @@ func demoFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* test_d func demoLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_demovfs.c:360:12: */ return 0 } + func demoUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_demovfs.c:363:12: */ return 0 } + func demoCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* test_demovfs.c:366:12: */ *(*int32)(unsafe.Pointer(pResOut)) = 0 return 0 @@ -63512,6 +63607,7 @@ func demoFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 func demoSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test_demovfs.c:383:12: */ return 0 } + func demoDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test_demovfs.c:386:12: */ return 0 } @@ -63697,13 +63793,16 @@ func demoFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32 func demoDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* test_demovfs.c:564:13: */ return uintptr(0) } + func demoDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* test_demovfs.c:567:13: */ sqlite3.Xsqlite3_snprintf(tls, nByte, zErrMsg, ts+29503 /* "Loadable extensi..." */, 0) *(*int8)(unsafe.Pointer(zErrMsg + uintptr((nByte - 1)))) = int8(0) } + func demoDlSym(tls *libc.TLS, pVfs uintptr, pH uintptr, z uintptr) uintptr { /* test_demovfs.c:571:13: */ return uintptr(0) } + func demoDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* test_demovfs.c:574:13: */ return } @@ -63798,6 +63897,7 @@ func register_demovfs(tls *libc.TLS, clientData ClientData, interp uintptr, objc sqlite3.Xsqlite3_vfs_register(tls, sqlite3_demovfs(tls), 1) return 0 } + func unregister_demovfs(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_demovfs.c:666:26: */ sqlite3.Xsqlite3_vfs_unregister(tls, sqlite3_demovfs(tls)) return 0 @@ -63925,14 +64025,17 @@ func devsymShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 var p uintptr = pFile return sqlite3.Xsqlite3OsShmLock(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, ofst, n, flags) } + func devsymShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* test_devsym.c:196:12: */ var p uintptr = pFile - return sqlite3.Xsqlite3OsShmMap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) } + func devsymShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_devsym.c:206:13: */ var p uintptr = pFile sqlite3.Xsqlite3OsShmBarrier(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal) } + func devsymShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* test_devsym.c:210:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsShmUnmap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, delFlag) @@ -65460,6 +65563,7 @@ var zSrc = *(*[79]uint8)(unsafe.Pointer(ts + 29999 /* "abcdefghijklmnop..." */)) // // WARNING: Not threadsafe. var test_destructor_count_var int32 = 0 /* test_func.c:91:12 */ + func destructor(tls *libc.TLS, p uintptr) { /* test_func.c:92:13: */ var zVal uintptr = p @@ -65467,6 +65571,7 @@ func destructor(tls *libc.TLS, p uintptr) { /* test_func.c:92:13: */ sqlite3.Xsqlite3_free(tls, zVal) test_destructor_count_var-- } + func test_destructor(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:99:13: */ var zVal uintptr var len int32 @@ -65487,6 +65592,7 @@ func test_destructor(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* libc.Xmemcpy(tls, zVal, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))), uint64(len)) sqlite3.Xsqlite3_result_text(tls, pCtx, zVal, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{destructor}))) } + func test_destructor16(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:122:13: */ var zVal uintptr var len int32 @@ -65507,11 +65613,14 @@ func test_destructor16(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { libc.Xmemcpy(tls, zVal, sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))), uint64(len)) sqlite3.Xsqlite3_result_text16(tls, pCtx, zVal, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{destructor}))) } + func test_destructor_count(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:145:13: */ sqlite3.Xsqlite3_result_int(tls, pCtx, test_destructor_count_var) } + func test_agg_errmsg16_step(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_func.c:165:13: */ } + func test_agg_errmsg16_final(tls *libc.TLS, ctx uintptr) { /* test_func.c:167:13: */ var z uintptr var db uintptr = sqlite3.Xsqlite3_context_db_handle(tls, ctx) @@ -65532,6 +65641,7 @@ func test_agg_errmsg16_final(tls *libc.TLS, ctx uintptr) { /* test_func.c:167:13 func free_test_auxdata(tls *libc.TLS, p uintptr) { /* test_func.c:188:13: */ sqlite3.Xsqlite3_free(tls, p) } + func test_auxdata(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:189:13: */ var i int32 var zRet uintptr = testContextMalloc(tls, pCtx, (nArg * 2)) @@ -66089,6 +66199,7 @@ func autoinstall_test_funcs(tls *libc.TLS, clientData uintptr, interp uintptr, o // A bogus step function and finalizer function. func tStep(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_func.c:736:13: */ } + func tFinal(tls *libc.TLS, a uintptr) { /* test_func.c:737:13: */ } @@ -67001,22 +67112,28 @@ func wrMemInit(tls *libc.TLS, pAppData uintptr) int32 { /* test_init.c:49:12: */ } return rc } + func wrMemShutdown(tls *libc.TLS, pAppData uintptr) { /* test_init.c:61:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 48 /* &.xShutdown */))))(tls, wrapped.Fmem.FpAppData) wrapped.Fmem_init = 0 } + func wrMemMalloc(tls *libc.TLS, n int32) uintptr { /* test_init.c:65:13: */ return (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ /* &.xMalloc */))))(tls, n) } + func wrMemFree(tls *libc.TLS, p uintptr) { /* test_init.c:66:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 8 /* &.xFree */))))(tls, p) } + func wrMemRealloc(tls *libc.TLS, p uintptr, n int32) uintptr { /* test_init.c:67:13: */ return (*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 16 /* &.xRealloc */))))(tls, p, n) } + func wrMemSize(tls *libc.TLS, p uintptr) int32 { /* test_init.c:68:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 24 /* &.xSize */))))(tls, p) } + func wrMemRoundup(tls *libc.TLS, n int32) int32 { /* test_init.c:69:12: */ return (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 32 /* &.xRoundup */))))(tls, n) } @@ -67033,29 +67150,37 @@ func wrMutexInit(tls *libc.TLS) int32 { /* test_init.c:72:12: */ } return rc } + func wrMutexEnd(tls *libc.TLS) int32 { /* test_init.c:84:12: */ (*(*func(*libc.TLS) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 8 /* &.xMutexEnd */))))(tls) wrapped.Fmutex_init = 0 return 0 } + func wrMutexAlloc(tls *libc.TLS, e int32) uintptr { /* test_init.c:89:22: */ return (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 16 /* &.xMutexAlloc */))))(tls, e) } + func wrMutexFree(tls *libc.TLS, p uintptr) { /* test_init.c:92:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 24 /* &.xMutexFree */))))(tls, p) } + func wrMutexEnter(tls *libc.TLS, p uintptr) { /* test_init.c:95:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 32 /* &.xMutexEnter */))))(tls, p) } + func wrMutexTry(tls *libc.TLS, p uintptr) int32 { /* test_init.c:98:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 40 /* &.xMutexTry */))))(tls, p) } + func wrMutexLeave(tls *libc.TLS, p uintptr) { /* test_init.c:101:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 48 /* &.xMutexLeave */))))(tls, p) } + func wrMutexHeld(tls *libc.TLS, p uintptr) int32 { /* test_init.c:104:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 56 /* &.xMutexHeld */))))(tls, p) } + func wrMutexNotheld(tls *libc.TLS, p uintptr) int32 { /* test_init.c:107:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 64 /* &.xMutexNotheld */))))(tls, p) } @@ -67072,6 +67197,7 @@ func wrPCacheInit(tls *libc.TLS, pArg uintptr) int32 { /* test_init.c:113:12: */ } return rc } + func wrPCacheShutdown(tls *libc.TLS, pArg uintptr) { /* test_init.c:125:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 24 /* &.xShutdown */))))(tls, wrapped.Fpcache.FpArg) wrapped.Fpcache_init = 0 @@ -67080,24 +67206,31 @@ func wrPCacheShutdown(tls *libc.TLS, pArg uintptr) { /* test_init.c:125:13: */ func wrPCacheCreate(tls *libc.TLS, a int32, b int32, c int32) uintptr { /* test_init.c:130:23: */ return (*(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 32 /* &.xCreate */))))(tls, a, b, c) } + func wrPCacheCachesize(tls *libc.TLS, p uintptr, n int32) { /* test_init.c:133:13: */ (*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 40 /* &.xCachesize */))))(tls, p, n) } + func wrPCachePagecount(tls *libc.TLS, p uintptr) int32 { /* test_init.c:136:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 48 /* &.xPagecount */))))(tls, p) } + func wrPCacheFetch(tls *libc.TLS, p uintptr, a uint32, b int32) uintptr { /* test_init.c:139:28: */ return (*(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 56 /* &.xFetch */))))(tls, p, a, b) } + func wrPCacheUnpin(tls *libc.TLS, p uintptr, a uintptr, b int32) { /* test_init.c:142:13: */ (*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 64 /* &.xUnpin */))))(tls, p, a, b) } + func wrPCacheRekey(tls *libc.TLS, p uintptr, a uintptr, b uint32, c uint32) { /* test_init.c:145:13: */ (*(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 72 /* &.xRekey */))))(tls, p, a, b, c) } + func wrPCacheTruncate(tls *libc.TLS, p uintptr, a uint32) { /* test_init.c:153:13: */ (*(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 80 /* &.xTruncate */))))(tls, p, a) } + func wrPCacheDestroy(tls *libc.TLS, p uintptr) { /* test_init.c:156:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 88 /* &.xDestroy */))))(tls, p) } @@ -67725,17 +67858,20 @@ var g2 = JtGlobal{} /* test_journal.c:207:24 */ func enterJtMutex(tls *libc.TLS) { /* test_journal.c:213:13: */ sqlite3.Xsqlite3_mutex_enter(tls, sqlite3.Xsqlite3_mutex_alloc(tls, 5)) } + func leaveJtMutex(tls *libc.TLS) { /* test_journal.c:216:13: */ sqlite3.Xsqlite3_mutex_leave(tls, sqlite3.Xsqlite3_mutex_alloc(tls, 5)) } + func stop_ioerr_simulation(tls *libc.TLS, piSave uintptr, piSave2 uintptr) { /* test_journal.c:222:13: */ - *(*int32)(unsafe.Pointer(piSave)) = sqlite3.Xsqlite3_io_error_pending + *(*int32)(unsafe.Pointer(piSave)) = libc.AtomicLoadInt32(&sqlite3.Xsqlite3_io_error_pending) *(*int32)(unsafe.Pointer(piSave2)) = sqlite3.Xsqlite3_io_error_hit - sqlite3.Xsqlite3_io_error_pending = -1 + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(-1)) sqlite3.Xsqlite3_io_error_hit = 0 } + func start_ioerr_simulation(tls *libc.TLS, iSave int32, iSave2 int32) { /* test_journal.c:228:13: */ - sqlite3.Xsqlite3_io_error_pending = iSave + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(iSave)) sqlite3.Xsqlite3_io_error_hit = iSave2 } @@ -68676,6 +68812,7 @@ func faultsimPending(tls *libc.TLS) int32 { /* test_malloc.c:160:12: */ func faultsimBeginBenign(tls *libc.TLS) { /* test_malloc.c:169:13: */ memfault.FisBenignMode++ } + func faultsimEndBenign(tls *libc.TLS) { /* test_malloc.c:172:13: */ memfault.FisBenignMode-- } @@ -68781,6 +68918,7 @@ __3: } var zHex = *(*[17]int8)(unsafe.Pointer(ts + 30109 /* "0123456789abcdef" */)) /* test_malloc.c:240:21 */ + func hexToInt(tls *libc.TLS, h int32) int32 { /* test_malloc.c:262:12: */ if (h >= '0') && (h <= '9') { return (h - '0') @@ -68791,6 +68929,7 @@ func hexToInt(tls *libc.TLS, h int32) int32 { /* test_malloc.c:262:12: */ } return int32(0) } + func textToPointer(tls *libc.TLS, z uintptr, pp uintptr) int32 { /* test_malloc.c:271:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -70642,6 +70781,7 @@ func md5step(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test } } } + func md5finalize(tls *libc.TLS, context uintptr) { /* test_md5.c:432:13: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -70656,6 +70796,7 @@ func md5finalize(tls *libc.TLS, context uintptr) { /* test_md5.c:432:13: */ MD5DigestToBase16(tls, bp /* &digest[0] */, bp+16 /* &zBuf[0] */) sqlite3.Xsqlite3_result_text(tls, context, bp+16 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) } + func Md5_Register(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pThunk uintptr) int32 { /* test_md5.c:441:5: */ var rc int32 = sqlite3.Xsqlite3_create_function(tls, db, ts+33518 /* "md5sum" */, -1, 1, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { @@ -71210,30 +71351,39 @@ func multiplexDelete(tls *libc.TLS, pVfs uintptr, zName uintptr, syncDir int32) func multiplexAccess(tls *libc.TLS, a uintptr, b uintptr, c int32, d uintptr) int32 { /* test_multiplex.c:656:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 56 /* &.xAccess */))))(tls, gMultiplex.FpOrigVfs, b, c, d) } + func multiplexFullPathname(tls *libc.TLS, a uintptr, b uintptr, c int32, d uintptr) int32 { /* test_multiplex.c:659:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 64 /* &.xFullPathname */))))(tls, gMultiplex.FpOrigVfs, b, c, d) } + func multiplexDlOpen(tls *libc.TLS, a uintptr, b uintptr) uintptr { /* test_multiplex.c:662:13: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((gMultiplex.FpOrigVfs + 72 /* &.xDlOpen */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexDlError(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_multiplex.c:665:13: */ (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((gMultiplex.FpOrigVfs + 80 /* &.xDlError */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexDlSym(tls *libc.TLS, a uintptr, b uintptr, c uintptr) uintptr { /* test_multiplex.c:668:13: */ return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((gMultiplex.FpOrigVfs + 88 /* &.xDlSym */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexDlClose(tls *libc.TLS, a uintptr, b uintptr) { /* test_multiplex.c:671:13: */ (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((gMultiplex.FpOrigVfs + 96 /* &.xDlClose */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexRandomness(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { /* test_multiplex.c:674:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 104 /* &.xRandomness */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexSleep(tls *libc.TLS, a uintptr, b int32) int32 { /* test_multiplex.c:677:12: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 112 /* &.xSleep */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexCurrentTime(tls *libc.TLS, a uintptr, b uintptr) int32 { /* test_multiplex.c:680:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 120 /* &.xCurrentTime */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexGetLastError(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { /* test_multiplex.c:683:12: */ if (*sqlite3_vfs)(unsafe.Pointer(gMultiplex.FpOrigVfs)).FxGetLastError != 0 { return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 128 /* &.xGetLastError */))))(tls, gMultiplex.FpOrigVfs, b, c) @@ -71242,6 +71392,7 @@ func multiplexGetLastError(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { } return int32(0) } + func multiplexCurrentTimeInt64(tls *libc.TLS, a uintptr, b uintptr) int32 { /* test_multiplex.c:690:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 136 /* &.xCurrentTimeInt64 */))))(tls, gMultiplex.FpOrigVfs, b) } @@ -71619,7 +71770,7 @@ func multiplexShmMap(tls *libc.TLS, pConn uintptr, iRegion int32, szRegion int32 var pSubOpen uintptr = multiplexSubOpen(tls, (*multiplexConn)(unsafe.Pointer(p)).FpGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen != 0 { - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 104 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 104 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, libc.AtomicLoadUintptr(&pp)) } return 10 } @@ -73897,16 +74048,18 @@ func vfslogShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 25, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } + func vfslogShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* test_osinst.c:442:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) - rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 104 /* &.xShmMap */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 104 /* &.xShmMap */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 23, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } + func vfslogShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_osinst.c:458:13: */ var t sqlite3_uint64 var p uintptr = pFile @@ -73915,6 +74068,7 @@ func vfslogShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_osinst.c:458:13: * t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 26, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), 0, 0, 0) } + func vfslogShmUnmap(tls *libc.TLS, pFile uintptr, deleteFlag int32) int32 { /* test_osinst.c:466:12: */ var rc int32 var t sqlite3_uint64 @@ -74023,17 +74177,18 @@ func vfslogCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* func vfslogGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* test_osinst.c:610:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 128 /* &.xGetLastError */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, a, b) } + func vfslogCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* test_osinst.c:613:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 136 /* &.xCurrentTimeInt64 */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, p) } func vfslog_flush(tls *libc.TLS, p uintptr) { /* test_osinst.c:617:13: */ - var pending int32 = sqlite3.Xsqlite3_io_error_pending + var pending int32 = libc.AtomicLoadInt32(&sqlite3.Xsqlite3_io_error_pending) var persist int32 = sqlite3.Xsqlite3_io_error_persist var diskfull int32 = sqlite3.Xsqlite3_diskfull_pending - sqlite3.Xsqlite3_io_error_pending = 0 + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(0)) sqlite3.Xsqlite3_io_error_persist = 0 sqlite3.Xsqlite3_diskfull_pending = 0 @@ -74043,7 +74198,7 @@ func vfslog_flush(tls *libc.TLS, p uintptr) { /* test_osinst.c:617:13: */ (*VfslogVfs)(unsafe.Pointer(p)).FnBuf = 0 } - sqlite3.Xsqlite3_io_error_pending = pending + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(pending)) sqlite3.Xsqlite3_io_error_persist = persist sqlite3.Xsqlite3_diskfull_pending = diskfull } @@ -75264,6 +75419,7 @@ var gQuota struct { func quotaEnter(tls *libc.TLS) { /* test_quota.c:190:13: */ sqlite3.Xsqlite3_mutex_enter(tls, gQuota.FpMutex) } + func quotaLeave(tls *libc.TLS) { /* test_quota.c:191:13: */ sqlite3.Xsqlite3_mutex_leave(tls, gQuota.FpMutex) } @@ -75730,7 +75886,7 @@ func quotaDeviceCharacteristics(tls *libc.TLS, pConn uintptr) int32 { /* test_qu // Pass xShmMap requests through to the original VFS unchanged. func quotaShmMap(tls *libc.TLS, pConn uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* test_quota.c:700:12: */ var pSubOpen uintptr = quotaSubOpen(tls, pConn) - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 104 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 104 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, libc.AtomicLoadUintptr(&pp)) } // Pass xShmLock requests through to the original VFS unchanged. @@ -78404,6 +78560,7 @@ func sqlite3_client_open(tls *libc.TLS, zDatabaseName uintptr, ppDb uintptr) int *(*uintptr)(unsafe.Pointer(ppDb)) = (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FpDb return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_prepare(tls *libc.TLS, pDb uintptr, zSql uintptr, nByte int32, ppStmt uintptr, pzTail uintptr) int32 { /* test_server.c:340:5: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -78421,6 +78578,7 @@ func sqlite3_client_prepare(tls *libc.TLS, pDb uintptr, zSql uintptr, nByte int3 } return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_step(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c:357:5: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -78432,6 +78590,7 @@ func sqlite3_client_step(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c: sendToServer(tls, bp /* &msg */) return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_reset(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c:364:5: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -78443,6 +78602,7 @@ func sqlite3_client_reset(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c sendToServer(tls, bp /* &msg */) return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* test_server.c:371:5: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -78454,6 +78614,7 @@ func sqlite3_client_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* test_serve sendToServer(tls, bp /* &msg */) return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode } + func sqlite3_client_close(tls *libc.TLS, pDb uintptr) int32 { /* test_server.c:378:5: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -78765,7 +78926,7 @@ func superlockWalLock(tls *libc.TLS, db uintptr, pBusy uintptr) int32 { /* test_ if rc != 0 { return rc } - libc.Xmemset(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* p */)), 0, uint64(32)) + libc.Xmemset(tls, libc.AtomicLoadPUintptr(bp+8 /* p */), 0, uint64(32)) // Obtain exclusive locks on all the "read-lock" slots. Once these locks // are held, it is guaranteed that there are no active reader, writer or @@ -79963,6 +80124,7 @@ func tclvarConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uin } var zSchema = *(*[100]int8)(unsafe.Pointer(ts + 36295 /* "CREATE TABLE x( ..." */)) /* test_tclvar.c:88:21 */ + // Note that for this virtual table, the xCreate and xConnect // methods are identical. @@ -81274,6 +81436,7 @@ func tvfsInjectIoerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:269:12: */ func tvfsInjectFullerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:273:12: */ return tvfsInjectFault(tls, (p + 72 /* &.full_err */)) } + func tvfsInjectCantopenerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:276:12: */ return tvfsInjectFault(tls, (p + 84 /* &.cantopen_err */)) } @@ -81882,7 +82045,7 @@ func tvfsShmMap(tls *libc.TLS, pFile uintptr, iPage int32, pgsz int32, isWrite i var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if (*Testvfs)(unsafe.Pointer(p)).FisFullshm != 0 { - return sqlite3.Xsqlite3OsShmMap(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, iPage, pgsz, isWrite, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, iPage, pgsz, isWrite, libc.AtomicLoadUintptr(&pp)) } if uintptr(0) == (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm { @@ -81916,7 +82079,7 @@ func tvfsShmMap(tls *libc.TLS, pFile uintptr, iPage int32, pgsz int32, isWrite i tvfsAllocPage(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm, iPage, pgsz) } if (*(*int32)(unsafe.Pointer(bp /* rc */)) == 0) || (*(*int32)(unsafe.Pointer(bp /* rc */)) == 8) { - *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer(((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm + 16 /* &.aPage */) + uintptr(iPage)*8)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer(((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm + 16 /* &.aPage */) + uintptr(iPage)*8)) } return *(*int32)(unsafe.Pointer(bp /* rc */)) @@ -82884,11 +83047,11 @@ func test_vfs_set_readmark(tls *libc.TLS, clientData uintptr, interp uintptr, ob tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return 1 } - if *(*uintptr)(unsafe.Pointer(bp + 40 /* pShm */)) == uintptr(0) { + if libc.AtomicLoadPUintptr(bp+40 /* pShm */) == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+38116 /* "*-shm is not yet..." */, 0)) return 1 } - aShm = *(*uintptr)(unsafe.Pointer(bp + 40 /* pShm */)) + aShm = libc.AtomicLoadPUintptr(bp + 40 /* pShm */) iOff = (((12 * 2) + 1) + *(*int32)(unsafe.Pointer(bp + 24 /* iSlot */))) if objc == 5 { @@ -83040,6 +83203,7 @@ func doTestWindowFinalize(tls *libc.TLS, bValue int32, ctx uintptr) { /* test_wi func testWindowStep(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* test_window.c:107:13: */ doTestWindowStep(tls, 0, ctx, nArg, apArg) } + func testWindowInverse(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* test_window.c:114:13: */ doTestWindowStep(tls, 1, ctx, nArg, apArg) } @@ -83047,6 +83211,7 @@ func testWindowInverse(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { func testWindowFinal(tls *libc.TLS, ctx uintptr) { /* test_window.c:122:13: */ doTestWindowFinalize(tls, 0, ctx) } + func testWindowValue(tls *libc.TLS, ctx uintptr) { /* test_window.c:125:13: */ doTestWindowFinalize(tls, 1, ctx) } diff --git a/internal/testfixture/testfixture_windows_386.go b/internal/testfixture/testfixture_windows_386.go index 3eae346..c58e183 100644 --- a/internal/testfixture/testfixture_windows_386.go +++ b/internal/testfixture/testfixture_windows_386.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DTCLSH_INIT_PROC=sqlite3TestInit -D_HAVE_SQLITE_CONFIG_H -I/usr/include/tcl8.6 -export-defines "" -export-fields F -trace-translation-units -lmodernc.org/tcl/lib,modernc.org/sqlite/internal/libc2,modernc.org/sqlite/lib -o internal/testfixture/testfixture_windows_386.go -Itestdata/sqlite-src-3330000/ext/async -Itestdata/sqlite-src-3330000/ext/fts3 -Itestdata/sqlite-src-3330000/ext/icu -Itestdata/sqlite-src-3330000/ext/rtree -Itestdata/sqlite-src-3330000/ext/session -Itestdata/sqlite-src-3330000/ext/userauth -Itestdata/sqlite-src-3330000/src -Itestdata/sqlite-amalgamation-3330000 -Itestdata/sqlite-src-3330000 testdata/sqlite-src-3330000/ext/expert/sqlite3expert.c testdata/sqlite-src-3330000/ext/expert/test_expert.c testdata/sqlite-src-3330000/ext/fts3/fts3_term.c testdata/sqlite-src-3330000/ext/fts3/fts3_test.c testdata/sqlite-src-3330000/ext/fts5/fts5_tcl.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_mi.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_tok.c testdata/sqlite-src-3330000/ext/misc/amatch.c testdata/sqlite-src-3330000/ext/misc/carray.c testdata/sqlite-src-3330000/ext/misc/closure.c testdata/sqlite-src-3330000/ext/misc/csv.c testdata/sqlite-src-3330000/ext/misc/decimal.c testdata/sqlite-src-3330000/ext/misc/eval.c testdata/sqlite-src-3330000/ext/misc/explain.c testdata/sqlite-src-3330000/ext/misc/fileio.c testdata/sqlite-src-3330000/ext/misc/fuzzer.c testdata/sqlite-src-3330000/ext/misc/ieee754.c testdata/sqlite-src-3330000/ext/misc/mmapwarm.c testdata/sqlite-src-3330000/ext/misc/nextchar.c testdata/sqlite-src-3330000/ext/misc/normalize.c testdata/sqlite-src-3330000/ext/misc/percentile.c testdata/sqlite-src-3330000/ext/misc/prefixes.c testdata/sqlite-src-3330000/ext/misc/regexp.c testdata/sqlite-src-3330000/ext/misc/remember.c testdata/sqlite-src-3330000/ext/misc/series.c testdata/sqlite-src-3330000/ext/misc/spellfix.c testdata/sqlite-src-3330000/ext/misc/totype.c testdata/sqlite-src-3330000/ext/misc/unionvtab.c testdata/sqlite-src-3330000/ext/misc/wholenumber.c testdata/sqlite-src-3330000/ext/misc/zipfile.c testdata/sqlite-src-3330000/ext/rbu/test_rbu.c testdata/sqlite-src-3330000/ext/userauth/userauth.c testdata/sqlite-src-3330000/src/tclsqlite.c testdata/sqlite-src-3330000/src/test1.c testdata/sqlite-src-3330000/src/test2.c testdata/sqlite-src-3330000/src/test3.c testdata/sqlite-src-3330000/src/test4.c testdata/sqlite-src-3330000/src/test5.c testdata/sqlite-src-3330000/src/test6.c testdata/sqlite-src-3330000/src/test7.c testdata/sqlite-src-3330000/src/test8.c testdata/sqlite-src-3330000/src/test9.c testdata/sqlite-src-3330000/src/test_async.c testdata/sqlite-src-3330000/src/test_autoext.c testdata/sqlite-src-3330000/src/test_backup.c testdata/sqlite-src-3330000/src/test_bestindex.c testdata/sqlite-src-3330000/src/test_blob.c testdata/sqlite-src-3330000/src/test_btree.c testdata/sqlite-src-3330000/src/test_config.c testdata/sqlite-src-3330000/src/test_delete.c testdata/sqlite-src-3330000/src/test_demovfs.c testdata/sqlite-src-3330000/src/test_devsym.c testdata/sqlite-src-3330000/src/test_fs.c testdata/sqlite-src-3330000/src/test_func.c testdata/sqlite-src-3330000/src/test_hexio.c testdata/sqlite-src-3330000/src/test_init.c testdata/sqlite-src-3330000/src/test_intarray.c testdata/sqlite-src-3330000/src/test_journal.c testdata/sqlite-src-3330000/src/test_malloc.c testdata/sqlite-src-3330000/src/test_md5.c testdata/sqlite-src-3330000/src/test_multiplex.c testdata/sqlite-src-3330000/src/test_mutex.c testdata/sqlite-src-3330000/src/test_onefile.c testdata/sqlite-src-3330000/src/test_osinst.c testdata/sqlite-src-3330000/src/test_pcache.c testdata/sqlite-src-3330000/src/test_quota.c testdata/sqlite-src-3330000/src/test_rtree.c testdata/sqlite-src-3330000/src/test_schema.c testdata/sqlite-src-3330000/src/test_server.c testdata/sqlite-src-3330000/src/test_superlock.c testdata/sqlite-src-3330000/src/test_syscall.c testdata/sqlite-src-3330000/src/test_tclsh.c testdata/sqlite-src-3330000/src/test_tclvar.c testdata/sqlite-src-3330000/src/test_thread.c testdata/sqlite-src-3330000/src/test_vdbecov.c testdata/sqlite-src-3330000/src/test_vfs.c testdata/sqlite-src-3330000/src/test_windirent.c testdata/sqlite-src-3330000/src/test_window.c testdata/sqlite-src-3330000/src/test_wsd.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DTCLSH_INIT_PROC=sqlite3TestInit -D_HAVE_SQLITE_CONFIG_H -I/usr/include/tcl8.6 -export-defines "" -export-fields F -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count -lmodernc.org/tcl/lib,modernc.org/sqlite/internal/libc2,modernc.org/sqlite/lib -o internal/testfixture/testfixture_windows_386.go -Itestdata/sqlite-src-3330000/ext/async -Itestdata/sqlite-src-3330000/ext/fts3 -Itestdata/sqlite-src-3330000/ext/icu -Itestdata/sqlite-src-3330000/ext/rtree -Itestdata/sqlite-src-3330000/ext/session -Itestdata/sqlite-src-3330000/ext/userauth -Itestdata/sqlite-src-3330000/src -Itestdata/sqlite-amalgamation-3330000 -Itestdata/sqlite-src-3330000 testdata/sqlite-src-3330000/ext/expert/sqlite3expert.c testdata/sqlite-src-3330000/ext/expert/test_expert.c testdata/sqlite-src-3330000/ext/fts3/fts3_term.c testdata/sqlite-src-3330000/ext/fts3/fts3_test.c testdata/sqlite-src-3330000/ext/fts5/fts5_tcl.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_mi.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_tok.c testdata/sqlite-src-3330000/ext/misc/amatch.c testdata/sqlite-src-3330000/ext/misc/carray.c testdata/sqlite-src-3330000/ext/misc/closure.c testdata/sqlite-src-3330000/ext/misc/csv.c testdata/sqlite-src-3330000/ext/misc/decimal.c testdata/sqlite-src-3330000/ext/misc/eval.c testdata/sqlite-src-3330000/ext/misc/explain.c testdata/sqlite-src-3330000/ext/misc/fileio.c testdata/sqlite-src-3330000/ext/misc/fuzzer.c testdata/sqlite-src-3330000/ext/misc/ieee754.c testdata/sqlite-src-3330000/ext/misc/mmapwarm.c testdata/sqlite-src-3330000/ext/misc/nextchar.c testdata/sqlite-src-3330000/ext/misc/normalize.c testdata/sqlite-src-3330000/ext/misc/percentile.c testdata/sqlite-src-3330000/ext/misc/prefixes.c testdata/sqlite-src-3330000/ext/misc/regexp.c testdata/sqlite-src-3330000/ext/misc/remember.c testdata/sqlite-src-3330000/ext/misc/series.c testdata/sqlite-src-3330000/ext/misc/spellfix.c testdata/sqlite-src-3330000/ext/misc/totype.c testdata/sqlite-src-3330000/ext/misc/unionvtab.c testdata/sqlite-src-3330000/ext/misc/wholenumber.c testdata/sqlite-src-3330000/ext/misc/zipfile.c testdata/sqlite-src-3330000/ext/rbu/test_rbu.c testdata/sqlite-src-3330000/ext/userauth/userauth.c testdata/sqlite-src-3330000/src/tclsqlite.c testdata/sqlite-src-3330000/src/test1.c testdata/sqlite-src-3330000/src/test2.c testdata/sqlite-src-3330000/src/test3.c testdata/sqlite-src-3330000/src/test4.c testdata/sqlite-src-3330000/src/test5.c testdata/sqlite-src-3330000/src/test6.c testdata/sqlite-src-3330000/src/test7.c testdata/sqlite-src-3330000/src/test8.c testdata/sqlite-src-3330000/src/test9.c testdata/sqlite-src-3330000/src/test_async.c testdata/sqlite-src-3330000/src/test_autoext.c testdata/sqlite-src-3330000/src/test_backup.c testdata/sqlite-src-3330000/src/test_bestindex.c testdata/sqlite-src-3330000/src/test_blob.c testdata/sqlite-src-3330000/src/test_btree.c testdata/sqlite-src-3330000/src/test_config.c testdata/sqlite-src-3330000/src/test_delete.c testdata/sqlite-src-3330000/src/test_demovfs.c testdata/sqlite-src-3330000/src/test_devsym.c testdata/sqlite-src-3330000/src/test_fs.c testdata/sqlite-src-3330000/src/test_func.c testdata/sqlite-src-3330000/src/test_hexio.c testdata/sqlite-src-3330000/src/test_init.c testdata/sqlite-src-3330000/src/test_intarray.c testdata/sqlite-src-3330000/src/test_journal.c testdata/sqlite-src-3330000/src/test_malloc.c testdata/sqlite-src-3330000/src/test_md5.c testdata/sqlite-src-3330000/src/test_multiplex.c testdata/sqlite-src-3330000/src/test_mutex.c testdata/sqlite-src-3330000/src/test_onefile.c testdata/sqlite-src-3330000/src/test_osinst.c testdata/sqlite-src-3330000/src/test_pcache.c testdata/sqlite-src-3330000/src/test_quota.c testdata/sqlite-src-3330000/src/test_rtree.c testdata/sqlite-src-3330000/src/test_schema.c testdata/sqlite-src-3330000/src/test_server.c testdata/sqlite-src-3330000/src/test_superlock.c testdata/sqlite-src-3330000/src/test_syscall.c testdata/sqlite-src-3330000/src/test_tclsh.c testdata/sqlite-src-3330000/src/test_tclvar.c testdata/sqlite-src-3330000/src/test_thread.c testdata/sqlite-src-3330000/src/test_vdbecov.c testdata/sqlite-src-3330000/src/test_vfs.c testdata/sqlite-src-3330000/src/test_windirent.c testdata/sqlite-src-3330000/src/test_window.c testdata/sqlite-src-3330000/src/test_wsd.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -14,6 +15,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -19235,106 +19237,6 @@ const ( /* bcrypt.h:423:3: */ DSA_FIPS186_3 = 1 ) -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. - -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. -// * -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER within this package. -// * -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER within this package. - -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. - -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. -// * -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. -// * -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER within this package. - -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. - -// Make sure we have internals defined. -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. - -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. - -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. - -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. -// * -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER within this package. - -// * -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER within this package. - -// * -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER within this package. - -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. - -// Make sure we have internals defined. -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. - -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. - -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. - -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. - -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. - const ( /* combaseapi.h:138:1: */ REGCLS_SINGLEUSE = 0 REGCLS_MULTIPLEUSE = 1 @@ -24986,6 +24888,7 @@ type off64_t = int64 /* _mingw_off_t.h:15:39 */ type off_t = off64_t /* _mingw_off_t.h:24:17 */ // A pointer to an array of FILE type fpos_t = int64 /* stdio.h:104:37 */ + func vsnwprintf(tls *libc.TLS, s uintptr, n size_t, format uintptr, arg va_list) int32 { /* stdio.h:1213:15: */ return libc.X_vsnwprintf(tls, s, n, format, arg) @@ -25567,6 +25470,7 @@ var expertModule = sqlite3_module{ FxShadowName:// xRollbackTo uintptr(0), // xShadowName } /* sqlite3expert.c:623:25 */ + // // End of virtual table implementation. // @@ -32454,6 +32358,7 @@ func amatchStrcpy(tls *libc.TLS, dest uintptr, src uintptr) { /* amatch.c:1005:1 for (int32(libc.AssignPtrInt8(libc.PostIncUintptr(&dest, 1), *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&src, 1)))))) != 0 { } } + func amatchStrcat(tls *libc.TLS, dest uintptr, src uintptr) { /* amatch.c:1008:13: */ for *(*int8)(unsafe.Pointer(dest)) != 0 { dest++ @@ -35885,6 +35790,7 @@ func decimalAddFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { decimal_free(tls, pA) decimal_free(tls, pB) } + func decimalSubFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:454:13: */ var pA uintptr = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*4)), 0, uintptr(0)) var pB uintptr = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*4)), 0, uintptr(0)) @@ -35929,6 +35835,7 @@ func decimalSumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { decimal_add(tls, p, pArg) decimal_free(tls, pArg) } + func decimalSumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:501:13: */ var p uintptr var pArg uintptr @@ -35947,6 +35854,7 @@ func decimalSumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) decimal_add(tls, p, pArg) decimal_free(tls, pArg) } + func decimalSumValue(tls *libc.TLS, context uintptr) { /* decimal.c:517:13: */ var p uintptr = sqlite3.Xsqlite3_aggregate_context(tls, context, 0) if p == uintptr(0) { @@ -35954,6 +35862,7 @@ func decimalSumValue(tls *libc.TLS, context uintptr) { /* decimal.c:517:13: */ } decimal_result(tls, context, p) } + func decimalSumFinalize(tls *libc.TLS, context uintptr) { /* decimal.c:522:13: */ var p uintptr = sqlite3.Xsqlite3_aggregate_context(tls, context, 0) if p == uintptr(0) { @@ -68127,6 +68036,7 @@ func ieee754func_from_blob(tls *libc.TLS, context uintptr, argc int32, argv uint sqlite3.Xsqlite3_result_double(tls, context, *(*float64)(unsafe.Pointer(bp /* r */))) } } + func ieee754func_to_blob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* ieee754.c:225:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -69823,6 +69733,7 @@ func re_next_char(tls *libc.TLS, p uintptr) uint32 { /* regexp.c:147:17: */ } return c } + func re_next_char_nocase(tls *libc.TLS, p uintptr) uint32 { /* regexp.c:172:17: */ var c uint32 = re_next_char(tls, p) if (c >= uint32('A')) && (c <= uint32('Z')) { @@ -71670,6 +71581,7 @@ func editDist3ConfigClear(tls *libc.TLS, p uintptr) { /* spellfix.c:640:13: */ sqlite3.Xsqlite3_free(tls, (*EditDist3Config)(unsafe.Pointer(p)).Fa) libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(EditDist3Config{}))) } + func editDist3ConfigDelete(tls *libc.TLS, pIn uintptr) { /* spellfix.c:655:13: */ var p uintptr = pIn editDist3ConfigClear(tls, p) @@ -75162,9 +75074,11 @@ func spellfix1Uninit(tls *libc.TLS, isDestroy int32, pVTab uintptr) int32 { /* s } return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } + func spellfix1Disconnect(tls *libc.TLS, pVTab uintptr) int32 { /* spellfix.c:1994:12: */ return spellfix1Uninit(tls, 0, pVTab) } + func spellfix1Destroy(tls *libc.TLS, pVTab uintptr) int32 { /* spellfix.c:1997:12: */ return spellfix1Uninit(tls, 1, pVTab) } @@ -75279,6 +75193,7 @@ func spellfix1Init(tls *libc.TLS, isCreate int32, db uintptr, pAux uintptr, argc func spellfix1Connect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* spellfix.c:2133:12: */ return spellfix1Init(tls, 0, db, pAux, argc, argv, ppVTab, pzErr) } + func spellfix1Create(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* spellfix.c:2142:12: */ return spellfix1Init(tls, 1, db, pAux, argc, argv, ppVTab, pzErr) } @@ -79494,6 +79409,7 @@ func zipfileTableErr(tls *libc.TLS, pTab uintptr, zFmt uintptr, va uintptr) { /* (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) _ = ap } + func zipfileCursorErr(tls *libc.TLS, pCsr uintptr, zFmt uintptr, va uintptr) { /* zipfile.c:486:13: */ var ap va_list _ = ap @@ -82346,6 +82262,7 @@ func incrblobSeek(tls *libc.TLS, instanceData ClientData, offset int32, seekMode func incrblobWatch(tls *libc.TLS, instanceData ClientData, mode int32) { /* tclsqlite.c:355:27: */ // NO-OP } + func incrblobHandle(tls *libc.TLS, instanceData ClientData, dir int32, hPtr uintptr) int32 { /* tclsqlite.c:361:26: */ return 1 } @@ -87335,12 +87252,15 @@ func Sqlite3_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3877:12: } return rc } + func Tclsqlite3_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3891:12: */ return Sqlite3_Init(tls, interp) } + func Sqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3892:12: */ return 0 } + func Tclsqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3893:12: */ return 0 } @@ -87351,6 +87271,7 @@ func Tclsqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tc func Sqlite3_SafeInit(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3899:12: */ return 1 } + func Sqlite3_SafeUnload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3900:12: */ return 1 } @@ -87358,12 +87279,15 @@ func Sqlite3_SafeUnload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* t func Sqlite_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3905:5: */ return Sqlite3_Init(tls, interp) } + func Tclsqlite_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3906:5: */ return Sqlite3_Init(tls, interp) } + func Sqlite_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3907:5: */ return 0 } + func Tclsqlite_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3908:5: */ return 0 } @@ -89962,6 +89886,7 @@ func testHexToInt(tls *libc.TLS, h int32) int32 { /* test1.c:44:12: */ } return int32(0) } + func sqlite3TestTextToPtr(tls *libc.TLS, z uintptr) uintptr { /* test1.c:54:6: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -90288,6 +90213,7 @@ func db_enter(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv u sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* db */)))).Fmutex) return 0 } + func db_leave(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:396:26: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -90645,6 +90571,7 @@ func hex8Func(tls *libc.TLS, p uintptr, argc int32, argv uintptr) { /* test1.c:7 *(*int8)(unsafe.Pointer(bp + 16 /* &zBuf[0] */ + uintptr((i * 2)))) = int8(0) sqlite3.Xsqlite3_result_text(tls, p, bp+16 /* zBuf */, -1, libc.UintptrFromInt32(-1)) } + func hex16Func(tls *libc.TLS, p uintptr, argc int32, argv uintptr) { /* test1.c:760:13: */ bp := tls.Alloc(416) defer tls.Free(416) @@ -91011,6 +90938,7 @@ type t1CountCtx1 = struct{ Fn int32 } /* test1.c:1123:9 */ // is reported on the step function. If the total count is 42, then // a UTF-8 error is reported on the finalize function. type t1CountCtx = t1CountCtx1 /* test1.c:1123:27 */ + func t1CountStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test1.c:1127:13: */ bp := tls.Alloc(9) defer tls.Free(9) @@ -91030,6 +90958,7 @@ func t1CountStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* } } } + func t1CountFinalize(tls *libc.TLS, context uintptr) { /* test1.c:1149:13: */ var p uintptr p = sqlite3.Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(t1CountCtx{}))) @@ -91608,6 +91537,7 @@ type TestCollationX1 = struct { } /* test1.c:1715:1 */ type TestCollationX = TestCollationX1 /* test1.c:1720:31 */ + func testCreateCollationDel(tls *libc.TLS, pCtx uintptr) { /* test1.c:1721:13: */ var p uintptr = pCtx @@ -91630,6 +91560,7 @@ func testCreateCollationDel(tls *libc.TLS, pCtx uintptr) { /* test1.c:1721:13: * } sqlite3.Xsqlite3_free(tls, p) } + func testCreateCollationCmp(tls *libc.TLS, pCtx uintptr, nLeft int32, zLeft uintptr, nRight int32, zRight uintptr) int32 { /* test1.c:1733:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -91655,6 +91586,7 @@ func testCreateCollationCmp(tls *libc.TLS, pCtx uintptr, nLeft int32, zLeft uint return *(*int32)(unsafe.Pointer(bp /* iRes */)) } + func test_create_collation_v2(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1757:26: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -91720,12 +91652,16 @@ type CreateFunctionV21 = struct { // -final SCRIPT // -destroy SCRIPT type CreateFunctionV2 = CreateFunctionV21 /* test1.c:1804:33 */ + func cf2Func(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* test1.c:1812:13: */ } + func cf2Step(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* test1.c:1814:13: */ } + func cf2Final(tls *libc.TLS, ctx uintptr) { /* test1.c:1816:13: */ } + func cf2Destroy(tls *libc.TLS, pUser uintptr) { /* test1.c:1818:13: */ var p uintptr = pUser @@ -91770,6 +91706,7 @@ func cf2Destroy(tls *libc.TLS, pUser uintptr) { /* test1.c:1818:13: */ } sqlite3.Xsqlite3_free(tls, p) } + func test_create_function_v2(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1832:26: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -92495,7 +92432,9 @@ func test_snapshot_cmp_blob(tls *libc.TLS, clientData uintptr, interp uintptr, o res = sqlite3.Xsqlite3_snapshot_cmp(tls, p1, p2) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, res)) return 0 -} // in test_delete.c +} + +// in test_delete.c func test_delete_database(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2581:26: */ var rc int32 var zFile uintptr @@ -92874,6 +92813,7 @@ func test_bind(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv // interp pointer to use when evaluating the TCL script is stored in // pTestCollateInterp. var pTestCollateInterp uintptr /* test1.c:2975:18: */ + func test_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintptr, nB int32, zB uintptr) int32 { /* test1.c:2976:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -92928,6 +92868,7 @@ func test_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintptr, nB int tcl.XTcl_GetIntFromObj(tls, i, tcl.XTcl_GetObjResult(tls, i), bp /* &res */) return *(*int32)(unsafe.Pointer(bp /* res */)) } + func test_collate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3026:26: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -93059,6 +93000,7 @@ func test_utf16bin_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintpt } return res } + func test_utf16bin_collate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3100:26: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -93175,6 +93117,7 @@ bad_args: // Both collating functions increment the unaligned utf16 counter // whenever they see a string that begins on an odd byte boundary. var unaligned_string_counter int32 = 0 /* test1.c:3192:12 */ + func alignmentCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* test1.c:3193:12: */ var rc int32 var n int32 @@ -93195,6 +93138,7 @@ func alignmentCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintpt } return rc } + func add_alignment_test_collations(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3208:26: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -93265,6 +93209,7 @@ func test_function_utf8(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function_utf16le(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3276:13: */ var interp uintptr var pX uintptr @@ -93288,6 +93233,7 @@ func test_function_utf16le(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr sqlite3.Xsqlite3_result_text(tls, pCtx, sqlite3.Xsqlite3_value_text(tls, pVal), -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function_utf16be(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3298:13: */ var interp uintptr var pX uintptr @@ -93316,6 +93262,7 @@ func test_function_utf16be(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3326:26: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -93589,6 +93536,7 @@ func test_intarray_addr(tls *libc.TLS, clientData uintptr, interp uintptr, objc } var p uintptr = uintptr(0) /* test1.c:3540:14 */ + // Usage: intarray_addr INT ... // // Return the address of a C-language array of 32-bit integers. @@ -93625,6 +93573,7 @@ func test_int64array_addr(tls *libc.TLS, clientData uintptr, interp uintptr, obj } var p1 uintptr = uintptr(0) /* test1.c:3574:24 */ + // Usage: doublearray_addr INT ... // // Return the address of a C-language array of doubles. @@ -93655,6 +93604,7 @@ func test_doublearray_addr(tls *libc.TLS, clientData uintptr, interp uintptr, ob } var p2 uintptr = uintptr(0) /* test1.c:3610:17 */ + // Usage: textarray_addr TEXT ... // // Return the address of a C-language array of strings. @@ -94973,6 +94923,7 @@ func test_sql(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, obj tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_sql(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))), uintptr(1)) return 0 } + func test_ex_sql(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4784:26: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -96737,6 +96688,7 @@ type LogCallback = struct { // tclcmd: test_sqlite3_log ?SCRIPT? var logcallback = LogCallback{} /* test1.c:6707:3 */ + func xLogcallback(tls *libc.TLS, unused uintptr, err int32, zMsg uintptr) { /* test1.c:6708:13: */ var pNew uintptr = tcl.XTcl_DuplicateObj(tls, logcallback.FpObj) (*Tcl_Obj)(unsafe.Pointer(pNew)).FrefCount++ @@ -96751,6 +96703,7 @@ func xLogcallback(tls *libc.TLS, unused uintptr, err int32, zMsg uintptr) { /* t } } } + func test_sqlite3_log(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6718:26: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -99351,6 +99304,7 @@ func testPendingByte(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, var faultSimInterp uintptr = uintptr(0) /* test2.c:580:19 */ var faultSimScriptSize int32 = 0 /* test2.c:581:12 */ var faultSimScript uintptr /* test2.c:582:13: */ + func faultSimCallback(tls *libc.TLS, x int32) int32 { /* test2.c:583:12: */ bp := tls.Alloc(46) defer tls.Free(46) @@ -101210,6 +101164,7 @@ func test_translate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int3 return 0 } + func test_translate_selftest(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test5.c:189:26: */ sqlite3.Xsqlite3UtfSelfTest(tls) return 0 @@ -101309,9 +101264,11 @@ var sqlite3CrashTestEnable int32 = 0 /* test6.c:161:12 */ func crash_malloc(tls *libc.TLS, nByte int32) uintptr { /* test6.c:163:13: */ return tcl.XTcl_AttemptAlloc(tls, size_t(nByte)) } + func crash_free(tls *libc.TLS, p uintptr) { /* test6.c:166:13: */ tcl.XTcl_Free(tls, p) } + func crash_realloc(tls *libc.TLS, p uintptr, n int32) uintptr { /* test6.c:169:13: */ return tcl.XTcl_AttemptRealloc(tls, p, size_t(n)) } @@ -101616,12 +101573,15 @@ func cfFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* test6.c: func cfLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test6.c:514:12: */ return sqlite3.Xsqlite3OsLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, eLock) } + func cfUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test6.c:517:12: */ return sqlite3.Xsqlite3OsUnlock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, eLock) } + func cfCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* test6.c:520:12: */ return sqlite3.Xsqlite3OsCheckReservedLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, pResOut) } + func cfFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* test6.c:523:12: */ if op == 5 { var pCrash uintptr = pFile @@ -101642,6 +101602,7 @@ func cfFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { func cfSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:542:12: */ return g.FiSectorSize } + func cfDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:545:12: */ return g.FiDeviceCharacteristics } @@ -101650,14 +101611,17 @@ func cfDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:54 func cfShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* test6.c:552:12: */ return sqlite3.Xsqlite3OsShmLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, ofst, n, flags) } + func cfShmBarrier(tls *libc.TLS, pFile uintptr) { /* test6.c:555:13: */ sqlite3.Xsqlite3OsShmBarrier(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile) } + func cfShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* test6.c:558:12: */ return sqlite3.Xsqlite3OsShmUnmap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, delFlag) } + func cfShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, sz int32, w int32, pp uintptr) int32 { /* test6.c:561:12: */ - return sqlite3.Xsqlite3OsShmMap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, iRegion, sz, w, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, iRegion, sz, w, libc.AtomicLoadUintptr(&pp)) } var CrashFileVtab = sqlite3_io_methods{ @@ -101763,42 +101727,52 @@ func cfDelete(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, dirSync int32) int32 var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pVfs + 28 /* &.xDelete */))))(tls, pVfs, zPath, dirSync) } + func cfAccess(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* test6.c:665:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 32 /* &.xAccess */))))(tls, pVfs, zPath, flags, pResOut) } + func cfFullPathname(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* test6.c:674:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 36 /* &.xFullPathname */))))(tls, pVfs, zPath, nPathOut, zPathOut) } + func cfDlOpen(tls *libc.TLS, pCfVfs uintptr, zPath uintptr) uintptr { /* test6.c:683:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 40 /* &.xDlOpen */))))(tls, pVfs, zPath) } + func cfDlError(tls *libc.TLS, pCfVfs uintptr, nByte int32, zErrMsg uintptr) { /* test6.c:687:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pVfs + 44 /* &.xDlError */))))(tls, pVfs, nByte, zErrMsg) } + func cfDlSym(tls *libc.TLS, pCfVfs uintptr, pH uintptr, zSym uintptr) uintptr { /* test6.c:691:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 48 /* &.xDlSym */))))(tls, pVfs, pH, zSym) } + func cfDlClose(tls *libc.TLS, pCfVfs uintptr, pHandle uintptr) { /* test6.c:695:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pVfs + 52 /* &.xDlClose */))))(tls, pVfs, pHandle) } + func cfRandomness(tls *libc.TLS, pCfVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* test6.c:699:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 56 /* &.xRandomness */))))(tls, pVfs, nByte, zBufOut) } + func cfSleep(tls *libc.TLS, pCfVfs uintptr, nMicro int32) int32 { /* test6.c:703:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pVfs + 60 /* &.xSleep */))))(tls, pVfs, nMicro) } + func cfCurrentTime(tls *libc.TLS, pCfVfs uintptr, pTimeOut uintptr) int32 { /* test6.c:707:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pVfs + 64 /* &.xCurrentTime */))))(tls, pVfs, pTimeOut) } + func cfGetLastError(tls *libc.TLS, pCfVfs uintptr, n int32, z uintptr) int32 { /* test6.c:711:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 68 /* &.xGetLastError */))))(tls, pVfs, n, z) @@ -103401,6 +103375,7 @@ func echoTransactionCall(tls *libc.TLS, tab uintptr, zCall uintptr) int32 { /* t sqlite3.Xsqlite3_free(tls, z) return 0 } + func echoBegin(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1111:12: */ var rc int32 var pVtab uintptr = tab @@ -103430,6 +103405,7 @@ func echoBegin(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1111:12: */ } return rc } + func echoSync(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1142:12: */ var rc int32 var pVtab uintptr = tab @@ -103456,6 +103432,7 @@ func echoSync(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1142:12: */ } return rc } + func echoCommit(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1170:12: */ var pVtab uintptr = tab var rc int32 @@ -103473,6 +103450,7 @@ func echoCommit(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1170:12: */ (*echo_vtab)(unsafe.Pointer(pVtab)).FinTransaction = 0 return rc } + func echoRollback(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1188:12: */ var rc int32 var pVtab uintptr = tab @@ -105778,14 +105756,17 @@ func devsymShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 var p uintptr = pFile return sqlite3.Xsqlite3OsShmLock(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, ofst, n, flags) } + func devsymShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* test_devsym.c:196:12: */ var p uintptr = pFile - return sqlite3.Xsqlite3OsShmMap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) } + func devsymShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_devsym.c:206:13: */ var p uintptr = pFile sqlite3.Xsqlite3OsShmBarrier(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal) } + func devsymShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* test_devsym.c:210:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsShmUnmap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, delFlag) @@ -106973,6 +106954,7 @@ var zSrc = *(*[79]uint8)(unsafe.Pointer(ts + 29666 /* "abcdefghijklmnop..." */)) // // WARNING: Not threadsafe. var test_destructor_count_var int32 = 0 /* test_func.c:91:12 */ + func destructor(tls *libc.TLS, p uintptr) { /* test_func.c:92:13: */ var zVal uintptr = p @@ -106980,6 +106962,7 @@ func destructor(tls *libc.TLS, p uintptr) { /* test_func.c:92:13: */ sqlite3.Xsqlite3_free(tls, zVal) test_destructor_count_var-- } + func test_destructor(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:99:13: */ var zVal uintptr var len int32 @@ -107000,6 +106983,7 @@ func test_destructor(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* libc.Xmemcpy(tls, zVal, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*4))), uint32(len)) sqlite3.Xsqlite3_result_text(tls, pCtx, zVal, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{destructor}))) } + func test_destructor16(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:122:13: */ var zVal uintptr var len int32 @@ -107020,11 +107004,14 @@ func test_destructor16(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { libc.Xmemcpy(tls, zVal, sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*4))), uint32(len)) sqlite3.Xsqlite3_result_text16(tls, pCtx, zVal, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{destructor}))) } + func test_destructor_count(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:145:13: */ sqlite3.Xsqlite3_result_int(tls, pCtx, test_destructor_count_var) } + func test_agg_errmsg16_step(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_func.c:165:13: */ } + func test_agg_errmsg16_final(tls *libc.TLS, ctx uintptr) { /* test_func.c:167:13: */ var z uintptr var db uintptr = sqlite3.Xsqlite3_context_db_handle(tls, ctx) @@ -107045,6 +107032,7 @@ func test_agg_errmsg16_final(tls *libc.TLS, ctx uintptr) { /* test_func.c:167:13 func free_test_auxdata(tls *libc.TLS, p uintptr) { /* test_func.c:188:13: */ sqlite3.Xsqlite3_free(tls, p) } + func test_auxdata(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:189:13: */ var i int32 var zRet uintptr = testContextMalloc(tls, pCtx, (nArg * 2)) @@ -107602,6 +107590,7 @@ func autoinstall_test_funcs(tls *libc.TLS, clientData uintptr, interp uintptr, o // A bogus step function and finalizer function. func tStep(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_func.c:736:13: */ } + func tFinal(tls *libc.TLS, a uintptr) { /* test_func.c:737:13: */ } @@ -108442,22 +108431,28 @@ func wrMemInit(tls *libc.TLS, pAppData uintptr) int32 { /* test_init.c:49:12: */ } return rc } + func wrMemShutdown(tls *libc.TLS, pAppData uintptr) { /* test_init.c:61:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ + 24 /* &.xShutdown */))))(tls, wrapped.Fmem.FpAppData) wrapped.Fmem_init = 0 } + func wrMemMalloc(tls *libc.TLS, n int32) uintptr { /* test_init.c:65:13: */ return (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ /* &.xMalloc */))))(tls, n) } + func wrMemFree(tls *libc.TLS, p uintptr) { /* test_init.c:66:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ + 4 /* &.xFree */))))(tls, p) } + func wrMemRealloc(tls *libc.TLS, p uintptr, n int32) uintptr { /* test_init.c:67:13: */ return (*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ + 8 /* &.xRealloc */))))(tls, p, n) } + func wrMemSize(tls *libc.TLS, p uintptr) int32 { /* test_init.c:68:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ + 12 /* &.xSize */))))(tls, p) } + func wrMemRoundup(tls *libc.TLS, n int32) int32 { /* test_init.c:69:12: */ return (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 52 /* &.mem */ + 16 /* &.xRoundup */))))(tls, n) } @@ -108474,29 +108469,37 @@ func wrMutexInit(tls *libc.TLS) int32 { /* test_init.c:72:12: */ } return rc } + func wrMutexEnd(tls *libc.TLS) int32 { /* test_init.c:84:12: */ (*(*func(*libc.TLS) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 4 /* &.xMutexEnd */))))(tls) wrapped.Fmutex_init = 0 return 0 } + func wrMutexAlloc(tls *libc.TLS, e int32) uintptr { /* test_init.c:89:22: */ return (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 8 /* &.xMutexAlloc */))))(tls, e) } + func wrMutexFree(tls *libc.TLS, p uintptr) { /* test_init.c:92:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 12 /* &.xMutexFree */))))(tls, p) } + func wrMutexEnter(tls *libc.TLS, p uintptr) { /* test_init.c:95:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 16 /* &.xMutexEnter */))))(tls, p) } + func wrMutexTry(tls *libc.TLS, p uintptr) int32 { /* test_init.c:98:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 20 /* &.xMutexTry */))))(tls, p) } + func wrMutexLeave(tls *libc.TLS, p uintptr) { /* test_init.c:101:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 24 /* &.xMutexLeave */))))(tls, p) } + func wrMutexHeld(tls *libc.TLS, p uintptr) int32 { /* test_init.c:104:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 28 /* &.xMutexHeld */))))(tls, p) } + func wrMutexNotheld(tls *libc.TLS, p uintptr) int32 { /* test_init.c:107:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 84 /* &.mutex */ + 32 /* &.xMutexNotheld */))))(tls, p) } @@ -108513,6 +108516,7 @@ func wrPCacheInit(tls *libc.TLS, pArg uintptr) int32 { /* test_init.c:113:12: */ } return rc } + func wrPCacheShutdown(tls *libc.TLS, pArg uintptr) { /* test_init.c:125:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 12 /* &.xShutdown */))))(tls, wrapped.Fpcache.FpArg) wrapped.Fpcache_init = 0 @@ -108521,24 +108525,31 @@ func wrPCacheShutdown(tls *libc.TLS, pArg uintptr) { /* test_init.c:125:13: */ func wrPCacheCreate(tls *libc.TLS, a int32, b int32, c int32) uintptr { /* test_init.c:130:23: */ return (*(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 16 /* &.xCreate */))))(tls, a, b, c) } + func wrPCacheCachesize(tls *libc.TLS, p uintptr, n int32) { /* test_init.c:133:13: */ (*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 20 /* &.xCachesize */))))(tls, p, n) } + func wrPCachePagecount(tls *libc.TLS, p uintptr) int32 { /* test_init.c:136:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 24 /* &.xPagecount */))))(tls, p) } + func wrPCacheFetch(tls *libc.TLS, p uintptr, a uint32, b int32) uintptr { /* test_init.c:139:28: */ return (*(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 28 /* &.xFetch */))))(tls, p, a, b) } + func wrPCacheUnpin(tls *libc.TLS, p uintptr, a uintptr, b int32) { /* test_init.c:142:13: */ (*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 32 /* &.xUnpin */))))(tls, p, a, b) } + func wrPCacheRekey(tls *libc.TLS, p uintptr, a uintptr, b uint32, c uint32) { /* test_init.c:145:13: */ (*(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 36 /* &.xRekey */))))(tls, p, a, b, c) } + func wrPCacheTruncate(tls *libc.TLS, p uintptr, a uint32) { /* test_init.c:153:13: */ (*(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 40 /* &.xTruncate */))))(tls, p, a) } + func wrPCacheDestroy(tls *libc.TLS, p uintptr) { /* test_init.c:156:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 44 /* &.xDestroy */))))(tls, p) } @@ -109164,17 +109175,20 @@ var g2 = JtGlobal{} /* test_journal.c:207:24 */ func enterJtMutex(tls *libc.TLS) { /* test_journal.c:213:13: */ sqlite3.Xsqlite3_mutex_enter(tls, sqlite3.Xsqlite3_mutex_alloc(tls, 5)) } + func leaveJtMutex(tls *libc.TLS) { /* test_journal.c:216:13: */ sqlite3.Xsqlite3_mutex_leave(tls, sqlite3.Xsqlite3_mutex_alloc(tls, 5)) } + func stop_ioerr_simulation(tls *libc.TLS, piSave uintptr, piSave2 uintptr) { /* test_journal.c:222:13: */ - *(*int32)(unsafe.Pointer(piSave)) = sqlite3.Xsqlite3_io_error_pending + *(*int32)(unsafe.Pointer(piSave)) = libc.AtomicLoadInt32(&sqlite3.Xsqlite3_io_error_pending) *(*int32)(unsafe.Pointer(piSave2)) = sqlite3.Xsqlite3_io_error_hit - sqlite3.Xsqlite3_io_error_pending = -1 + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(-1)) sqlite3.Xsqlite3_io_error_hit = 0 } + func start_ioerr_simulation(tls *libc.TLS, iSave int32, iSave2 int32) { /* test_journal.c:228:13: */ - sqlite3.Xsqlite3_io_error_pending = iSave + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(iSave)) sqlite3.Xsqlite3_io_error_hit = iSave2 } @@ -109982,6 +109996,7 @@ func faultsimPending(tls *libc.TLS) int32 { /* test_malloc.c:160:12: */ func faultsimBeginBenign(tls *libc.TLS) { /* test_malloc.c:169:13: */ memfault.FisBenignMode++ } + func faultsimEndBenign(tls *libc.TLS) { /* test_malloc.c:172:13: */ memfault.FisBenignMode-- } @@ -110087,6 +110102,7 @@ __3: } var zHex = *(*[17]int8)(unsafe.Pointer(ts + 29776 /* "0123456789abcdef" */)) /* test_malloc.c:240:21 */ + func hexToInt(tls *libc.TLS, h int32) int32 { /* test_malloc.c:262:12: */ if (h >= '0') && (h <= '9') { return (h - '0') @@ -110097,6 +110113,7 @@ func hexToInt(tls *libc.TLS, h int32) int32 { /* test_malloc.c:262:12: */ } return int32(0) } + func textToPointer(tls *libc.TLS, z uintptr, pp uintptr) int32 { /* test_malloc.c:271:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -111934,6 +111951,7 @@ func md5step(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test } } } + func md5finalize(tls *libc.TLS, context uintptr) { /* test_md5.c:432:13: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -111948,6 +111966,7 @@ func md5finalize(tls *libc.TLS, context uintptr) { /* test_md5.c:432:13: */ MD5DigestToBase16(tls, bp /* &digest[0] */, bp+16 /* &zBuf[0] */) sqlite3.Xsqlite3_result_text(tls, context, bp+16 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) } + func Md5_Register(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pThunk uintptr) int32 { /* test_md5.c:441:5: */ var rc int32 = sqlite3.Xsqlite3_create_function(tls, db, ts+33176 /* "md5sum" */, -1, 1, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { @@ -112500,30 +112519,39 @@ func multiplexDelete(tls *libc.TLS, pVfs uintptr, zName uintptr, syncDir int32) func multiplexAccess(tls *libc.TLS, a uintptr, b uintptr, c int32, d uintptr) int32 { /* test_multiplex.c:656:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 32 /* &.xAccess */))))(tls, gMultiplex.FpOrigVfs, b, c, d) } + func multiplexFullPathname(tls *libc.TLS, a uintptr, b uintptr, c int32, d uintptr) int32 { /* test_multiplex.c:659:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 36 /* &.xFullPathname */))))(tls, gMultiplex.FpOrigVfs, b, c, d) } + func multiplexDlOpen(tls *libc.TLS, a uintptr, b uintptr) uintptr { /* test_multiplex.c:662:13: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((gMultiplex.FpOrigVfs + 40 /* &.xDlOpen */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexDlError(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_multiplex.c:665:13: */ (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((gMultiplex.FpOrigVfs + 44 /* &.xDlError */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexDlSym(tls *libc.TLS, a uintptr, b uintptr, c uintptr) uintptr { /* test_multiplex.c:668:13: */ return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((gMultiplex.FpOrigVfs + 48 /* &.xDlSym */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexDlClose(tls *libc.TLS, a uintptr, b uintptr) { /* test_multiplex.c:671:13: */ (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((gMultiplex.FpOrigVfs + 52 /* &.xDlClose */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexRandomness(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { /* test_multiplex.c:674:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 56 /* &.xRandomness */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexSleep(tls *libc.TLS, a uintptr, b int32) int32 { /* test_multiplex.c:677:12: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 60 /* &.xSleep */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexCurrentTime(tls *libc.TLS, a uintptr, b uintptr) int32 { /* test_multiplex.c:680:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 64 /* &.xCurrentTime */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexGetLastError(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { /* test_multiplex.c:683:12: */ if (*sqlite3_vfs)(unsafe.Pointer(gMultiplex.FpOrigVfs)).FxGetLastError != 0 { return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 68 /* &.xGetLastError */))))(tls, gMultiplex.FpOrigVfs, b, c) @@ -112532,6 +112560,7 @@ func multiplexGetLastError(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { } return int32(0) } + func multiplexCurrentTimeInt64(tls *libc.TLS, a uintptr, b uintptr) int32 { /* test_multiplex.c:690:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 72 /* &.xCurrentTimeInt64 */))))(tls, gMultiplex.FpOrigVfs, b) } @@ -112909,7 +112938,7 @@ func multiplexShmMap(tls *libc.TLS, pConn uintptr, iRegion int32, szRegion int32 var pSubOpen uintptr = multiplexSubOpen(tls, (*multiplexConn)(unsafe.Pointer(p)).FpGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen != 0 { - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 52 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 52 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, libc.AtomicLoadUintptr(&pp)) } return 10 } @@ -115099,16 +115128,18 @@ func vfslogShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 25, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } + func vfslogShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* test_osinst.c:442:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) - rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 52 /* &.xShmMap */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 52 /* &.xShmMap */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 23, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } + func vfslogShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_osinst.c:458:13: */ var t sqlite3_uint64 var p uintptr = pFile @@ -115117,6 +115148,7 @@ func vfslogShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_osinst.c:458:13: * t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 26, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), 0, 0, 0) } + func vfslogShmUnmap(tls *libc.TLS, pFile uintptr, deleteFlag int32) int32 { /* test_osinst.c:466:12: */ var rc int32 var t sqlite3_uint64 @@ -115225,17 +115257,18 @@ func vfslogCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* func vfslogGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* test_osinst.c:610:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 68 /* &.xGetLastError */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, a, b) } + func vfslogCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* test_osinst.c:613:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 72 /* &.xCurrentTimeInt64 */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, p) } func vfslog_flush(tls *libc.TLS, p uintptr) { /* test_osinst.c:617:13: */ - var pending int32 = sqlite3.Xsqlite3_io_error_pending + var pending int32 = libc.AtomicLoadInt32(&sqlite3.Xsqlite3_io_error_pending) var persist int32 = sqlite3.Xsqlite3_io_error_persist var diskfull int32 = sqlite3.Xsqlite3_diskfull_pending - sqlite3.Xsqlite3_io_error_pending = 0 + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(0)) sqlite3.Xsqlite3_io_error_persist = 0 sqlite3.Xsqlite3_diskfull_pending = 0 @@ -115245,7 +115278,7 @@ func vfslog_flush(tls *libc.TLS, p uintptr) { /* test_osinst.c:617:13: */ (*VfslogVfs)(unsafe.Pointer(p)).FnBuf = 0 } - sqlite3.Xsqlite3_io_error_pending = pending + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(pending)) sqlite3.Xsqlite3_io_error_persist = persist sqlite3.Xsqlite3_diskfull_pending = diskfull } @@ -116445,6 +116478,7 @@ var gQuota struct { func quotaEnter(tls *libc.TLS) { /* test_quota.c:190:13: */ sqlite3.Xsqlite3_mutex_enter(tls, gQuota.FpMutex) } + func quotaLeave(tls *libc.TLS) { /* test_quota.c:191:13: */ sqlite3.Xsqlite3_mutex_leave(tls, gQuota.FpMutex) } @@ -116944,7 +116978,7 @@ func quotaDeviceCharacteristics(tls *libc.TLS, pConn uintptr) int32 { /* test_qu // Pass xShmMap requests through to the original VFS unchanged. func quotaShmMap(tls *libc.TLS, pConn uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* test_quota.c:700:12: */ var pSubOpen uintptr = quotaSubOpen(tls, pConn) - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 52 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 52 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, libc.AtomicLoadUintptr(&pp)) } // Pass xShmLock requests through to the original VFS unchanged. @@ -120552,7 +120586,7 @@ func superlockWalLock(tls *libc.TLS, db uintptr, pBusy uintptr) int32 { /* test_ if rc != 0 { return rc } - libc.Xmemset(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* p */)), 0, uint32(32)) + libc.Xmemset(tls, libc.AtomicLoadPUintptr(bp+4 /* p */), 0, uint32(32)) // Obtain exclusive locks on all the "read-lock" slots. Once these locks // are held, it is guaranteed that there are no active reader, writer or @@ -120956,6 +120990,7 @@ func tclvarConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uin } var zSchema = *(*[100]int8)(unsafe.Pointer(ts + 35581 /* "CREATE TABLE x( ..." */)) /* test_tclvar.c:88:21 */ + // Note that for this virtual table, the xCreate and xConnect // methods are identical. @@ -122078,6 +122113,7 @@ func tvfsInjectIoerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:269:12: */ func tvfsInjectFullerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:273:12: */ return tvfsInjectFault(tls, (p + 48 /* &.full_err */)) } + func tvfsInjectCantopenerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:276:12: */ return tvfsInjectFault(tls, (p + 60 /* &.cantopen_err */)) } @@ -122685,7 +122721,7 @@ func tvfsShmMap(tls *libc.TLS, pFile uintptr, iPage int32, pgsz int32, isWrite i var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if (*Testvfs)(unsafe.Pointer(p)).FisFullshm != 0 { - return sqlite3.Xsqlite3OsShmMap(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, iPage, pgsz, isWrite, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, iPage, pgsz, isWrite, libc.AtomicLoadUintptr(&pp)) } if uintptr(0) == (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm { @@ -122719,7 +122755,7 @@ func tvfsShmMap(tls *libc.TLS, pFile uintptr, iPage int32, pgsz int32, isWrite i tvfsAllocPage(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm, iPage, pgsz) } if (*(*int32)(unsafe.Pointer(bp /* rc */)) == 0) || (*(*int32)(unsafe.Pointer(bp /* rc */)) == 8) { - *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer(((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm + 8 /* &.aPage */) + uintptr(iPage)*4)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer(((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm + 8 /* &.aPage */) + uintptr(iPage)*4)) } return *(*int32)(unsafe.Pointer(bp /* rc */)) @@ -123685,11 +123721,11 @@ func test_vfs_set_readmark(tls *libc.TLS, clientData uintptr, interp uintptr, ob tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return 1 } - if *(*uintptr)(unsafe.Pointer(bp + 40 /* pShm */)) == uintptr(0) { + if libc.AtomicLoadPUintptr(bp+40 /* pShm */) == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+37322 /* "*-shm is not yet..." */, 0)) return 1 } - aShm = *(*uintptr)(unsafe.Pointer(bp + 40 /* pShm */)) + aShm = libc.AtomicLoadPUintptr(bp + 40 /* pShm */) iOff = (((12 * 2) + 1) + *(*int32)(unsafe.Pointer(bp + 28 /* iSlot */))) if objc == 5 { @@ -124046,6 +124082,7 @@ func doTestWindowFinalize(tls *libc.TLS, bValue int32, ctx uintptr) { /* test_wi func testWindowStep(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* test_window.c:107:13: */ doTestWindowStep(tls, 0, ctx, nArg, apArg) } + func testWindowInverse(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* test_window.c:114:13: */ doTestWindowStep(tls, 1, ctx, nArg, apArg) } @@ -124053,6 +124090,7 @@ func testWindowInverse(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { func testWindowFinal(tls *libc.TLS, ctx uintptr) { /* test_window.c:122:13: */ doTestWindowFinalize(tls, 0, ctx) } + func testWindowValue(tls *libc.TLS, ctx uintptr) { /* test_window.c:125:13: */ doTestWindowFinalize(tls, 1, ctx) } diff --git a/internal/testfixture/testfixture_windows_amd64.go b/internal/testfixture/testfixture_windows_amd64.go index 6423cea..49a7f70 100644 --- a/internal/testfixture/testfixture_windows_amd64.go +++ b/internal/testfixture/testfixture_windows_amd64.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DTCLSH_INIT_PROC=sqlite3TestInit -D_HAVE_SQLITE_CONFIG_H -I/usr/include/tcl8.6 -export-defines "" -export-fields F -trace-translation-units -lmodernc.org/tcl/lib,modernc.org/sqlite/internal/libc2,modernc.org/sqlite/lib -o internal/testfixture/testfixture_windows_amd64.go -Itestdata/sqlite-src-3330000/ext/async -Itestdata/sqlite-src-3330000/ext/fts3 -Itestdata/sqlite-src-3330000/ext/icu -Itestdata/sqlite-src-3330000/ext/rtree -Itestdata/sqlite-src-3330000/ext/session -Itestdata/sqlite-src-3330000/ext/userauth -Itestdata/sqlite-src-3330000/src -Itestdata/sqlite-amalgamation-3330000 -Itestdata/sqlite-src-3330000 testdata/sqlite-src-3330000/ext/expert/sqlite3expert.c testdata/sqlite-src-3330000/ext/expert/test_expert.c testdata/sqlite-src-3330000/ext/fts3/fts3_term.c testdata/sqlite-src-3330000/ext/fts3/fts3_test.c testdata/sqlite-src-3330000/ext/fts5/fts5_tcl.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_mi.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_tok.c testdata/sqlite-src-3330000/ext/misc/amatch.c testdata/sqlite-src-3330000/ext/misc/carray.c testdata/sqlite-src-3330000/ext/misc/closure.c testdata/sqlite-src-3330000/ext/misc/csv.c testdata/sqlite-src-3330000/ext/misc/decimal.c testdata/sqlite-src-3330000/ext/misc/eval.c testdata/sqlite-src-3330000/ext/misc/explain.c testdata/sqlite-src-3330000/ext/misc/fileio.c testdata/sqlite-src-3330000/ext/misc/fuzzer.c testdata/sqlite-src-3330000/ext/misc/ieee754.c testdata/sqlite-src-3330000/ext/misc/mmapwarm.c testdata/sqlite-src-3330000/ext/misc/nextchar.c testdata/sqlite-src-3330000/ext/misc/normalize.c testdata/sqlite-src-3330000/ext/misc/percentile.c testdata/sqlite-src-3330000/ext/misc/prefixes.c testdata/sqlite-src-3330000/ext/misc/regexp.c testdata/sqlite-src-3330000/ext/misc/remember.c testdata/sqlite-src-3330000/ext/misc/series.c testdata/sqlite-src-3330000/ext/misc/spellfix.c testdata/sqlite-src-3330000/ext/misc/totype.c testdata/sqlite-src-3330000/ext/misc/unionvtab.c testdata/sqlite-src-3330000/ext/misc/wholenumber.c testdata/sqlite-src-3330000/ext/misc/zipfile.c testdata/sqlite-src-3330000/ext/rbu/test_rbu.c testdata/sqlite-src-3330000/ext/userauth/userauth.c testdata/sqlite-src-3330000/src/tclsqlite.c testdata/sqlite-src-3330000/src/test1.c testdata/sqlite-src-3330000/src/test2.c testdata/sqlite-src-3330000/src/test3.c testdata/sqlite-src-3330000/src/test4.c testdata/sqlite-src-3330000/src/test5.c testdata/sqlite-src-3330000/src/test6.c testdata/sqlite-src-3330000/src/test7.c testdata/sqlite-src-3330000/src/test8.c testdata/sqlite-src-3330000/src/test9.c testdata/sqlite-src-3330000/src/test_async.c testdata/sqlite-src-3330000/src/test_autoext.c testdata/sqlite-src-3330000/src/test_backup.c testdata/sqlite-src-3330000/src/test_bestindex.c testdata/sqlite-src-3330000/src/test_blob.c testdata/sqlite-src-3330000/src/test_btree.c testdata/sqlite-src-3330000/src/test_config.c testdata/sqlite-src-3330000/src/test_delete.c testdata/sqlite-src-3330000/src/test_demovfs.c testdata/sqlite-src-3330000/src/test_devsym.c testdata/sqlite-src-3330000/src/test_fs.c testdata/sqlite-src-3330000/src/test_func.c testdata/sqlite-src-3330000/src/test_hexio.c testdata/sqlite-src-3330000/src/test_init.c testdata/sqlite-src-3330000/src/test_intarray.c testdata/sqlite-src-3330000/src/test_journal.c testdata/sqlite-src-3330000/src/test_malloc.c testdata/sqlite-src-3330000/src/test_md5.c testdata/sqlite-src-3330000/src/test_multiplex.c testdata/sqlite-src-3330000/src/test_mutex.c testdata/sqlite-src-3330000/src/test_onefile.c testdata/sqlite-src-3330000/src/test_osinst.c testdata/sqlite-src-3330000/src/test_pcache.c testdata/sqlite-src-3330000/src/test_quota.c testdata/sqlite-src-3330000/src/test_rtree.c testdata/sqlite-src-3330000/src/test_schema.c testdata/sqlite-src-3330000/src/test_server.c testdata/sqlite-src-3330000/src/test_superlock.c testdata/sqlite-src-3330000/src/test_syscall.c testdata/sqlite-src-3330000/src/test_tclsh.c testdata/sqlite-src-3330000/src/test_tclvar.c testdata/sqlite-src-3330000/src/test_thread.c testdata/sqlite-src-3330000/src/test_vdbecov.c testdata/sqlite-src-3330000/src/test_vfs.c testdata/sqlite-src-3330000/src/test_windirent.c testdata/sqlite-src-3330000/src/test_window.c testdata/sqlite-src-3330000/src/test_wsd.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DTCLSH_INIT_PROC=sqlite3TestInit -D_HAVE_SQLITE_CONFIG_H -I/usr/include/tcl8.6 -export-defines "" -export-fields F -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count -lmodernc.org/tcl/lib,modernc.org/sqlite/internal/libc2,modernc.org/sqlite/lib -o internal/testfixture/testfixture_windows_amd64.go -Itestdata/sqlite-src-3330000/ext/async -Itestdata/sqlite-src-3330000/ext/fts3 -Itestdata/sqlite-src-3330000/ext/icu -Itestdata/sqlite-src-3330000/ext/rtree -Itestdata/sqlite-src-3330000/ext/session -Itestdata/sqlite-src-3330000/ext/userauth -Itestdata/sqlite-src-3330000/src -Itestdata/sqlite-amalgamation-3330000 -Itestdata/sqlite-src-3330000 testdata/sqlite-src-3330000/ext/expert/sqlite3expert.c testdata/sqlite-src-3330000/ext/expert/test_expert.c testdata/sqlite-src-3330000/ext/fts3/fts3_term.c testdata/sqlite-src-3330000/ext/fts3/fts3_test.c testdata/sqlite-src-3330000/ext/fts5/fts5_tcl.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_mi.c testdata/sqlite-src-3330000/ext/fts5/fts5_test_tok.c testdata/sqlite-src-3330000/ext/misc/amatch.c testdata/sqlite-src-3330000/ext/misc/carray.c testdata/sqlite-src-3330000/ext/misc/closure.c testdata/sqlite-src-3330000/ext/misc/csv.c testdata/sqlite-src-3330000/ext/misc/decimal.c testdata/sqlite-src-3330000/ext/misc/eval.c testdata/sqlite-src-3330000/ext/misc/explain.c testdata/sqlite-src-3330000/ext/misc/fileio.c testdata/sqlite-src-3330000/ext/misc/fuzzer.c testdata/sqlite-src-3330000/ext/misc/ieee754.c testdata/sqlite-src-3330000/ext/misc/mmapwarm.c testdata/sqlite-src-3330000/ext/misc/nextchar.c testdata/sqlite-src-3330000/ext/misc/normalize.c testdata/sqlite-src-3330000/ext/misc/percentile.c testdata/sqlite-src-3330000/ext/misc/prefixes.c testdata/sqlite-src-3330000/ext/misc/regexp.c testdata/sqlite-src-3330000/ext/misc/remember.c testdata/sqlite-src-3330000/ext/misc/series.c testdata/sqlite-src-3330000/ext/misc/spellfix.c testdata/sqlite-src-3330000/ext/misc/totype.c testdata/sqlite-src-3330000/ext/misc/unionvtab.c testdata/sqlite-src-3330000/ext/misc/wholenumber.c testdata/sqlite-src-3330000/ext/misc/zipfile.c testdata/sqlite-src-3330000/ext/rbu/test_rbu.c testdata/sqlite-src-3330000/ext/userauth/userauth.c testdata/sqlite-src-3330000/src/tclsqlite.c testdata/sqlite-src-3330000/src/test1.c testdata/sqlite-src-3330000/src/test2.c testdata/sqlite-src-3330000/src/test3.c testdata/sqlite-src-3330000/src/test4.c testdata/sqlite-src-3330000/src/test5.c testdata/sqlite-src-3330000/src/test6.c testdata/sqlite-src-3330000/src/test7.c testdata/sqlite-src-3330000/src/test8.c testdata/sqlite-src-3330000/src/test9.c testdata/sqlite-src-3330000/src/test_async.c testdata/sqlite-src-3330000/src/test_autoext.c testdata/sqlite-src-3330000/src/test_backup.c testdata/sqlite-src-3330000/src/test_bestindex.c testdata/sqlite-src-3330000/src/test_blob.c testdata/sqlite-src-3330000/src/test_btree.c testdata/sqlite-src-3330000/src/test_config.c testdata/sqlite-src-3330000/src/test_delete.c testdata/sqlite-src-3330000/src/test_demovfs.c testdata/sqlite-src-3330000/src/test_devsym.c testdata/sqlite-src-3330000/src/test_fs.c testdata/sqlite-src-3330000/src/test_func.c testdata/sqlite-src-3330000/src/test_hexio.c testdata/sqlite-src-3330000/src/test_init.c testdata/sqlite-src-3330000/src/test_intarray.c testdata/sqlite-src-3330000/src/test_journal.c testdata/sqlite-src-3330000/src/test_malloc.c testdata/sqlite-src-3330000/src/test_md5.c testdata/sqlite-src-3330000/src/test_multiplex.c testdata/sqlite-src-3330000/src/test_mutex.c testdata/sqlite-src-3330000/src/test_onefile.c testdata/sqlite-src-3330000/src/test_osinst.c testdata/sqlite-src-3330000/src/test_pcache.c testdata/sqlite-src-3330000/src/test_quota.c testdata/sqlite-src-3330000/src/test_rtree.c testdata/sqlite-src-3330000/src/test_schema.c testdata/sqlite-src-3330000/src/test_server.c testdata/sqlite-src-3330000/src/test_superlock.c testdata/sqlite-src-3330000/src/test_syscall.c testdata/sqlite-src-3330000/src/test_tclsh.c testdata/sqlite-src-3330000/src/test_tclvar.c testdata/sqlite-src-3330000/src/test_thread.c testdata/sqlite-src-3330000/src/test_vdbecov.c testdata/sqlite-src-3330000/src/test_vfs.c testdata/sqlite-src-3330000/src/test_windirent.c testdata/sqlite-src-3330000/src/test_window.c testdata/sqlite-src-3330000/src/test_wsd.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -14,6 +15,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -25000,6 +25002,7 @@ type off64_t = int64 /* _mingw_off_t.h:15:39 */ type off_t = off64_t /* _mingw_off_t.h:24:17 */ type fpos_t = int64 /* stdio.h:104:37 */ + func vsnwprintf(tls *libc.TLS, s uintptr, n size_t, format uintptr, arg va_list) int32 { /* stdio.h:1213:15: */ return libc.X_vsnwprintf(tls, s, n, format, arg) @@ -25586,6 +25589,7 @@ var expertModule = sqlite3_module{ FxShadowName:// xRollbackTo uintptr(0), // xShadowName } /* sqlite3expert.c:623:25 */ + // // End of virtual table implementation. // @@ -32486,6 +32490,7 @@ func amatchStrcpy(tls *libc.TLS, dest uintptr, src uintptr) { /* amatch.c:1005:1 for (int32(libc.AssignPtrInt8(libc.PostIncUintptr(&dest, 1), *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&src, 1)))))) != 0 { } } + func amatchStrcat(tls *libc.TLS, dest uintptr, src uintptr) { /* amatch.c:1008:13: */ for *(*int8)(unsafe.Pointer(dest)) != 0 { dest++ @@ -35920,6 +35925,7 @@ func decimalAddFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { decimal_free(tls, pA) decimal_free(tls, pB) } + func decimalSubFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:454:13: */ var pA uintptr = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), 0, uintptr(0)) var pB uintptr = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), 0, uintptr(0)) @@ -35964,6 +35970,7 @@ func decimalSumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { decimal_add(tls, p, pArg) decimal_free(tls, pArg) } + func decimalSumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:501:13: */ var p uintptr var pArg uintptr @@ -35982,6 +35989,7 @@ func decimalSumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) decimal_add(tls, p, pArg) decimal_free(tls, pArg) } + func decimalSumValue(tls *libc.TLS, context uintptr) { /* decimal.c:517:13: */ var p uintptr = sqlite3.Xsqlite3_aggregate_context(tls, context, 0) if p == uintptr(0) { @@ -35989,6 +35997,7 @@ func decimalSumValue(tls *libc.TLS, context uintptr) { /* decimal.c:517:13: */ } decimal_result(tls, context, p) } + func decimalSumFinalize(tls *libc.TLS, context uintptr) { /* decimal.c:522:13: */ var p uintptr = sqlite3.Xsqlite3_aggregate_context(tls, context, 0) if p == uintptr(0) { @@ -69218,6 +69227,7 @@ func ieee754func_from_blob(tls *libc.TLS, context uintptr, argc int32, argv uint sqlite3.Xsqlite3_result_double(tls, context, *(*float64)(unsafe.Pointer(bp /* r */))) } } + func ieee754func_to_blob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* ieee754.c:225:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -70915,6 +70925,7 @@ func re_next_char(tls *libc.TLS, p uintptr) uint32 { /* regexp.c:147:17: */ } return c } + func re_next_char_nocase(tls *libc.TLS, p uintptr) uint32 { /* regexp.c:172:17: */ var c uint32 = re_next_char(tls, p) if (c >= uint32('A')) && (c <= uint32('Z')) { @@ -72766,6 +72777,7 @@ func editDist3ConfigClear(tls *libc.TLS, p uintptr) { /* spellfix.c:640:13: */ sqlite3.Xsqlite3_free(tls, (*EditDist3Config)(unsafe.Pointer(p)).Fa) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(EditDist3Config{}))) } + func editDist3ConfigDelete(tls *libc.TLS, pIn uintptr) { /* spellfix.c:655:13: */ var p uintptr = pIn editDist3ConfigClear(tls, p) @@ -76257,9 +76269,11 @@ func spellfix1Uninit(tls *libc.TLS, isDestroy int32, pVTab uintptr) int32 { /* s } return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } + func spellfix1Disconnect(tls *libc.TLS, pVTab uintptr) int32 { /* spellfix.c:1994:12: */ return spellfix1Uninit(tls, 0, pVTab) } + func spellfix1Destroy(tls *libc.TLS, pVTab uintptr) int32 { /* spellfix.c:1997:12: */ return spellfix1Uninit(tls, 1, pVTab) } @@ -76374,6 +76388,7 @@ func spellfix1Init(tls *libc.TLS, isCreate int32, db uintptr, pAux uintptr, argc func spellfix1Connect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* spellfix.c:2133:12: */ return spellfix1Init(tls, 0, db, pAux, argc, argv, ppVTab, pzErr) } + func spellfix1Create(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* spellfix.c:2142:12: */ return spellfix1Init(tls, 1, db, pAux, argc, argv, ppVTab, pzErr) } @@ -80594,6 +80609,7 @@ func zipfileTableErr(tls *libc.TLS, pTab uintptr, zFmt uintptr, va uintptr) { /* (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) _ = ap } + func zipfileCursorErr(tls *libc.TLS, pCsr uintptr, zFmt uintptr, va uintptr) { /* zipfile.c:486:13: */ var ap va_list _ = ap @@ -83454,6 +83470,7 @@ func incrblobSeek(tls *libc.TLS, instanceData ClientData, offset int32, seekMode func incrblobWatch(tls *libc.TLS, instanceData ClientData, mode int32) { /* tclsqlite.c:355:27: */ // NO-OP } + func incrblobHandle(tls *libc.TLS, instanceData ClientData, dir int32, hPtr uintptr) int32 { /* tclsqlite.c:361:26: */ return 1 } @@ -88444,12 +88461,15 @@ func Sqlite3_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3877:12: } return rc } + func Tclsqlite3_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3891:12: */ return Sqlite3_Init(tls, interp) } + func Sqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3892:12: */ return 0 } + func Tclsqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3893:12: */ return 0 } @@ -88460,6 +88480,7 @@ func Tclsqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tc func Sqlite3_SafeInit(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3899:12: */ return 1 } + func Sqlite3_SafeUnload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3900:12: */ return 1 } @@ -88467,12 +88488,15 @@ func Sqlite3_SafeUnload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* t func Sqlite_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3905:5: */ return Sqlite3_Init(tls, interp) } + func Tclsqlite_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3906:5: */ return Sqlite3_Init(tls, interp) } + func Sqlite_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3907:5: */ return 0 } + func Tclsqlite_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3908:5: */ return 0 } @@ -90963,6 +90987,7 @@ func testHexToInt(tls *libc.TLS, h int32) int32 { /* test1.c:44:12: */ } return int32(0) } + func sqlite3TestTextToPtr(tls *libc.TLS, z uintptr) uintptr { /* test1.c:54:6: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -91289,6 +91314,7 @@ func db_enter(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv u sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* db */)))).Fmutex) return 0 } + func db_leave(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:396:26: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -91646,6 +91672,7 @@ func hex8Func(tls *libc.TLS, p uintptr, argc int32, argv uintptr) { /* test1.c:7 *(*int8)(unsafe.Pointer(bp + 16 /* &zBuf[0] */ + uintptr((i * 2)))) = int8(0) sqlite3.Xsqlite3_result_text(tls, p, bp+16 /* zBuf */, -1, libc.UintptrFromInt32(-1)) } + func hex16Func(tls *libc.TLS, p uintptr, argc int32, argv uintptr) { /* test1.c:760:13: */ bp := tls.Alloc(416) defer tls.Free(416) @@ -92012,6 +92039,7 @@ type t1CountCtx1 = struct{ Fn int32 } /* test1.c:1123:9 */ // is reported on the step function. If the total count is 42, then // a UTF-8 error is reported on the finalize function. type t1CountCtx = t1CountCtx1 /* test1.c:1123:27 */ + func t1CountStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test1.c:1127:13: */ bp := tls.Alloc(9) defer tls.Free(9) @@ -92031,6 +92059,7 @@ func t1CountStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* } } } + func t1CountFinalize(tls *libc.TLS, context uintptr) { /* test1.c:1149:13: */ var p uintptr p = sqlite3.Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(t1CountCtx{}))) @@ -92609,6 +92638,7 @@ type TestCollationX1 = struct { } /* test1.c:1715:1 */ type TestCollationX = TestCollationX1 /* test1.c:1720:31 */ + func testCreateCollationDel(tls *libc.TLS, pCtx uintptr) { /* test1.c:1721:13: */ var p uintptr = pCtx @@ -92631,6 +92661,7 @@ func testCreateCollationDel(tls *libc.TLS, pCtx uintptr) { /* test1.c:1721:13: * } sqlite3.Xsqlite3_free(tls, p) } + func testCreateCollationCmp(tls *libc.TLS, pCtx uintptr, nLeft int32, zLeft uintptr, nRight int32, zRight uintptr) int32 { /* test1.c:1733:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -92656,6 +92687,7 @@ func testCreateCollationCmp(tls *libc.TLS, pCtx uintptr, nLeft int32, zLeft uint return *(*int32)(unsafe.Pointer(bp /* iRes */)) } + func test_create_collation_v2(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1757:26: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -92721,12 +92753,16 @@ type CreateFunctionV21 = struct { // -final SCRIPT // -destroy SCRIPT type CreateFunctionV2 = CreateFunctionV21 /* test1.c:1804:33 */ + func cf2Func(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* test1.c:1812:13: */ } + func cf2Step(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* test1.c:1814:13: */ } + func cf2Final(tls *libc.TLS, ctx uintptr) { /* test1.c:1816:13: */ } + func cf2Destroy(tls *libc.TLS, pUser uintptr) { /* test1.c:1818:13: */ var p uintptr = pUser @@ -92771,6 +92807,7 @@ func cf2Destroy(tls *libc.TLS, pUser uintptr) { /* test1.c:1818:13: */ } sqlite3.Xsqlite3_free(tls, p) } + func test_create_function_v2(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1832:26: */ bp := tls.Alloc(188) defer tls.Free(188) @@ -93500,7 +93537,9 @@ func test_snapshot_cmp_blob(tls *libc.TLS, clientData uintptr, interp uintptr, o res = sqlite3.Xsqlite3_snapshot_cmp(tls, p1, p2) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, res)) return 0 -} // in test_delete.c +} + +// in test_delete.c func test_delete_database(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2581:26: */ var rc int32 var zFile uintptr @@ -93879,6 +93918,7 @@ func test_bind(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv // interp pointer to use when evaluating the TCL script is stored in // pTestCollateInterp. var pTestCollateInterp uintptr /* test1.c:2975:18: */ + func test_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintptr, nB int32, zB uintptr) int32 { /* test1.c:2976:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -93933,6 +93973,7 @@ func test_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintptr, nB int tcl.XTcl_GetIntFromObj(tls, i, tcl.XTcl_GetObjResult(tls, i), bp /* &res */) return *(*int32)(unsafe.Pointer(bp /* res */)) } + func test_collate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3026:26: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -94064,6 +94105,7 @@ func test_utf16bin_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintpt } return res } + func test_utf16bin_collate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3100:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -94180,6 +94222,7 @@ bad_args: // Both collating functions increment the unaligned utf16 counter // whenever they see a string that begins on an odd byte boundary. var unaligned_string_counter int32 = 0 /* test1.c:3192:12 */ + func alignmentCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* test1.c:3193:12: */ var rc int32 var n int32 @@ -94200,6 +94243,7 @@ func alignmentCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintpt } return rc } + func add_alignment_test_collations(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3208:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -94270,6 +94314,7 @@ func test_function_utf8(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function_utf16le(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3276:13: */ var interp uintptr var pX uintptr @@ -94293,6 +94338,7 @@ func test_function_utf16le(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr sqlite3.Xsqlite3_result_text(tls, pCtx, sqlite3.Xsqlite3_value_text(tls, pVal), -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function_utf16be(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3298:13: */ var interp uintptr var pX uintptr @@ -94321,6 +94367,7 @@ func test_function_utf16be(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } + func test_function(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3326:26: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -94594,6 +94641,7 @@ func test_intarray_addr(tls *libc.TLS, clientData uintptr, interp uintptr, objc } var p uintptr = uintptr(0) /* test1.c:3540:14 */ + // Usage: intarray_addr INT ... // // Return the address of a C-language array of 32-bit integers. @@ -94630,6 +94678,7 @@ func test_int64array_addr(tls *libc.TLS, clientData uintptr, interp uintptr, obj } var p1 uintptr = uintptr(0) /* test1.c:3574:24 */ + // Usage: doublearray_addr INT ... // // Return the address of a C-language array of doubles. @@ -94660,6 +94709,7 @@ func test_doublearray_addr(tls *libc.TLS, clientData uintptr, interp uintptr, ob } var p2 uintptr = uintptr(0) /* test1.c:3610:17 */ + // Usage: textarray_addr TEXT ... // // Return the address of a C-language array of strings. @@ -95979,6 +96029,7 @@ func test_sql(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, obj tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_sql(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))), uintptr(1)) return 0 } + func test_ex_sql(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4784:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97746,6 +97797,7 @@ type LogCallback = struct { // tclcmd: test_sqlite3_log ?SCRIPT? var logcallback = LogCallback{} /* test1.c:6707:3 */ + func xLogcallback(tls *libc.TLS, unused uintptr, err int32, zMsg uintptr) { /* test1.c:6708:13: */ var pNew uintptr = tcl.XTcl_DuplicateObj(tls, logcallback.FpObj) (*Tcl_Obj)(unsafe.Pointer(pNew)).FrefCount++ @@ -97760,6 +97812,7 @@ func xLogcallback(tls *libc.TLS, unused uintptr, err int32, zMsg uintptr) { /* t } } } + func test_sqlite3_log(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6718:26: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -100368,6 +100421,7 @@ func testPendingByte(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, var faultSimInterp uintptr = uintptr(0) /* test2.c:580:19 */ var faultSimScriptSize int32 = 0 /* test2.c:581:12 */ var faultSimScript uintptr /* test2.c:582:13: */ + func faultSimCallback(tls *libc.TLS, x int32) int32 { /* test2.c:583:12: */ bp := tls.Alloc(46) defer tls.Free(46) @@ -102227,6 +102281,7 @@ func test_translate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int3 return 0 } + func test_translate_selftest(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test5.c:189:26: */ sqlite3.Xsqlite3UtfSelfTest(tls) return 0 @@ -102329,9 +102384,11 @@ var sqlite3CrashTestEnable int32 = 0 /* test6.c:161:12 */ func crash_malloc(tls *libc.TLS, nByte int32) uintptr { /* test6.c:163:13: */ return tcl.XTcl_AttemptAlloc(tls, uint32(size_t(nByte))) } + func crash_free(tls *libc.TLS, p uintptr) { /* test6.c:166:13: */ tcl.XTcl_Free(tls, p) } + func crash_realloc(tls *libc.TLS, p uintptr, n int32) uintptr { /* test6.c:169:13: */ return tcl.XTcl_AttemptRealloc(tls, p, uint32(size_t(n))) } @@ -102636,12 +102693,15 @@ func cfFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* test6.c: func cfLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test6.c:514:12: */ return sqlite3.Xsqlite3OsLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, eLock) } + func cfUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test6.c:517:12: */ return sqlite3.Xsqlite3OsUnlock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, eLock) } + func cfCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* test6.c:520:12: */ return sqlite3.Xsqlite3OsCheckReservedLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, pResOut) } + func cfFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* test6.c:523:12: */ if op == 5 { var pCrash uintptr = pFile @@ -102662,6 +102722,7 @@ func cfFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { func cfSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:542:12: */ return g.FiSectorSize } + func cfDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:545:12: */ return g.FiDeviceCharacteristics } @@ -102670,14 +102731,17 @@ func cfDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:54 func cfShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* test6.c:552:12: */ return sqlite3.Xsqlite3OsShmLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, ofst, n, flags) } + func cfShmBarrier(tls *libc.TLS, pFile uintptr) { /* test6.c:555:13: */ sqlite3.Xsqlite3OsShmBarrier(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile) } + func cfShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* test6.c:558:12: */ return sqlite3.Xsqlite3OsShmUnmap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, delFlag) } + func cfShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, sz int32, w int32, pp uintptr) int32 { /* test6.c:561:12: */ - return sqlite3.Xsqlite3OsShmMap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, iRegion, sz, w, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, iRegion, sz, w, libc.AtomicLoadUintptr(&pp)) } var CrashFileVtab = sqlite3_io_methods{ @@ -102783,42 +102847,52 @@ func cfDelete(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, dirSync int32) int32 var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pVfs + 48 /* &.xDelete */))))(tls, pVfs, zPath, dirSync) } + func cfAccess(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* test6.c:665:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 56 /* &.xAccess */))))(tls, pVfs, zPath, flags, pResOut) } + func cfFullPathname(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* test6.c:674:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 64 /* &.xFullPathname */))))(tls, pVfs, zPath, nPathOut, zPathOut) } + func cfDlOpen(tls *libc.TLS, pCfVfs uintptr, zPath uintptr) uintptr { /* test6.c:683:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 72 /* &.xDlOpen */))))(tls, pVfs, zPath) } + func cfDlError(tls *libc.TLS, pCfVfs uintptr, nByte int32, zErrMsg uintptr) { /* test6.c:687:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pVfs + 80 /* &.xDlError */))))(tls, pVfs, nByte, zErrMsg) } + func cfDlSym(tls *libc.TLS, pCfVfs uintptr, pH uintptr, zSym uintptr) uintptr { /* test6.c:691:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 88 /* &.xDlSym */))))(tls, pVfs, pH, zSym) } + func cfDlClose(tls *libc.TLS, pCfVfs uintptr, pHandle uintptr) { /* test6.c:695:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pVfs + 96 /* &.xDlClose */))))(tls, pVfs, pHandle) } + func cfRandomness(tls *libc.TLS, pCfVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* test6.c:699:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 104 /* &.xRandomness */))))(tls, pVfs, nByte, zBufOut) } + func cfSleep(tls *libc.TLS, pCfVfs uintptr, nMicro int32) int32 { /* test6.c:703:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pVfs + 112 /* &.xSleep */))))(tls, pVfs, nMicro) } + func cfCurrentTime(tls *libc.TLS, pCfVfs uintptr, pTimeOut uintptr) int32 { /* test6.c:707:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pVfs + 120 /* &.xCurrentTime */))))(tls, pVfs, pTimeOut) } + func cfGetLastError(tls *libc.TLS, pCfVfs uintptr, n int32, z uintptr) int32 { /* test6.c:711:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 128 /* &.xGetLastError */))))(tls, pVfs, n, z) @@ -104423,6 +104497,7 @@ func echoTransactionCall(tls *libc.TLS, tab uintptr, zCall uintptr) int32 { /* t sqlite3.Xsqlite3_free(tls, z) return 0 } + func echoBegin(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1111:12: */ var rc int32 var pVtab uintptr = tab @@ -104452,6 +104527,7 @@ func echoBegin(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1111:12: */ } return rc } + func echoSync(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1142:12: */ var rc int32 var pVtab uintptr = tab @@ -104478,6 +104554,7 @@ func echoSync(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1142:12: */ } return rc } + func echoCommit(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1170:12: */ var pVtab uintptr = tab var rc int32 @@ -104495,6 +104572,7 @@ func echoCommit(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1170:12: */ (*echo_vtab)(unsafe.Pointer(pVtab)).FinTransaction = 0 return rc } + func echoRollback(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1188:12: */ var rc int32 var pVtab uintptr = tab @@ -106801,14 +106879,17 @@ func devsymShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 var p uintptr = pFile return sqlite3.Xsqlite3OsShmLock(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, ofst, n, flags) } + func devsymShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* test_devsym.c:196:12: */ var p uintptr = pFile - return sqlite3.Xsqlite3OsShmMap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) } + func devsymShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_devsym.c:206:13: */ var p uintptr = pFile sqlite3.Xsqlite3OsShmBarrier(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal) } + func devsymShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* test_devsym.c:210:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsShmUnmap(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, delFlag) @@ -107990,6 +108071,7 @@ var zSrc = *(*[79]uint8)(unsafe.Pointer(ts + 29666 /* "abcdefghijklmnop..." */)) // // WARNING: Not threadsafe. var test_destructor_count_var int32 = 0 /* test_func.c:91:12 */ + func destructor(tls *libc.TLS, p uintptr) { /* test_func.c:92:13: */ var zVal uintptr = p @@ -107997,6 +108079,7 @@ func destructor(tls *libc.TLS, p uintptr) { /* test_func.c:92:13: */ sqlite3.Xsqlite3_free(tls, zVal) test_destructor_count_var-- } + func test_destructor(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:99:13: */ var zVal uintptr var len int32 @@ -108017,6 +108100,7 @@ func test_destructor(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* libc.Xmemcpy(tls, zVal, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))), uint64(len)) sqlite3.Xsqlite3_result_text(tls, pCtx, zVal, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{destructor}))) } + func test_destructor16(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:122:13: */ var zVal uintptr var len int32 @@ -108037,11 +108121,14 @@ func test_destructor16(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { libc.Xmemcpy(tls, zVal, sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))), uint64(len)) sqlite3.Xsqlite3_result_text16(tls, pCtx, zVal, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{destructor}))) } + func test_destructor_count(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:145:13: */ sqlite3.Xsqlite3_result_int(tls, pCtx, test_destructor_count_var) } + func test_agg_errmsg16_step(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_func.c:165:13: */ } + func test_agg_errmsg16_final(tls *libc.TLS, ctx uintptr) { /* test_func.c:167:13: */ var z uintptr var db uintptr = sqlite3.Xsqlite3_context_db_handle(tls, ctx) @@ -108062,6 +108149,7 @@ func test_agg_errmsg16_final(tls *libc.TLS, ctx uintptr) { /* test_func.c:167:13 func free_test_auxdata(tls *libc.TLS, p uintptr) { /* test_func.c:188:13: */ sqlite3.Xsqlite3_free(tls, p) } + func test_auxdata(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:189:13: */ var i int32 var zRet uintptr = testContextMalloc(tls, pCtx, (nArg * 2)) @@ -108619,6 +108707,7 @@ func autoinstall_test_funcs(tls *libc.TLS, clientData uintptr, interp uintptr, o // A bogus step function and finalizer function. func tStep(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_func.c:736:13: */ } + func tFinal(tls *libc.TLS, a uintptr) { /* test_func.c:737:13: */ } @@ -109459,22 +109548,28 @@ func wrMemInit(tls *libc.TLS, pAppData uintptr) int32 { /* test_init.c:49:12: */ } return rc } + func wrMemShutdown(tls *libc.TLS, pAppData uintptr) { /* test_init.c:61:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 48 /* &.xShutdown */))))(tls, wrapped.Fmem.FpAppData) wrapped.Fmem_init = 0 } + func wrMemMalloc(tls *libc.TLS, n int32) uintptr { /* test_init.c:65:13: */ return (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ /* &.xMalloc */))))(tls, n) } + func wrMemFree(tls *libc.TLS, p uintptr) { /* test_init.c:66:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 8 /* &.xFree */))))(tls, p) } + func wrMemRealloc(tls *libc.TLS, p uintptr, n int32) uintptr { /* test_init.c:67:13: */ return (*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 16 /* &.xRealloc */))))(tls, p, n) } + func wrMemSize(tls *libc.TLS, p uintptr) int32 { /* test_init.c:68:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 24 /* &.xSize */))))(tls, p) } + func wrMemRoundup(tls *libc.TLS, n int32) int32 { /* test_init.c:69:12: */ return (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 32 /* &.xRoundup */))))(tls, n) } @@ -109491,29 +109586,37 @@ func wrMutexInit(tls *libc.TLS) int32 { /* test_init.c:72:12: */ } return rc } + func wrMutexEnd(tls *libc.TLS) int32 { /* test_init.c:84:12: */ (*(*func(*libc.TLS) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 8 /* &.xMutexEnd */))))(tls) wrapped.Fmutex_init = 0 return 0 } + func wrMutexAlloc(tls *libc.TLS, e int32) uintptr { /* test_init.c:89:22: */ return (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 16 /* &.xMutexAlloc */))))(tls, e) } + func wrMutexFree(tls *libc.TLS, p uintptr) { /* test_init.c:92:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 24 /* &.xMutexFree */))))(tls, p) } + func wrMutexEnter(tls *libc.TLS, p uintptr) { /* test_init.c:95:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 32 /* &.xMutexEnter */))))(tls, p) } + func wrMutexTry(tls *libc.TLS, p uintptr) int32 { /* test_init.c:98:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 40 /* &.xMutexTry */))))(tls, p) } + func wrMutexLeave(tls *libc.TLS, p uintptr) { /* test_init.c:101:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 48 /* &.xMutexLeave */))))(tls, p) } + func wrMutexHeld(tls *libc.TLS, p uintptr) int32 { /* test_init.c:104:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 56 /* &.xMutexHeld */))))(tls, p) } + func wrMutexNotheld(tls *libc.TLS, p uintptr) int32 { /* test_init.c:107:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 64 /* &.xMutexNotheld */))))(tls, p) } @@ -109530,6 +109633,7 @@ func wrPCacheInit(tls *libc.TLS, pArg uintptr) int32 { /* test_init.c:113:12: */ } return rc } + func wrPCacheShutdown(tls *libc.TLS, pArg uintptr) { /* test_init.c:125:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 24 /* &.xShutdown */))))(tls, wrapped.Fpcache.FpArg) wrapped.Fpcache_init = 0 @@ -109538,24 +109642,31 @@ func wrPCacheShutdown(tls *libc.TLS, pArg uintptr) { /* test_init.c:125:13: */ func wrPCacheCreate(tls *libc.TLS, a int32, b int32, c int32) uintptr { /* test_init.c:130:23: */ return (*(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 32 /* &.xCreate */))))(tls, a, b, c) } + func wrPCacheCachesize(tls *libc.TLS, p uintptr, n int32) { /* test_init.c:133:13: */ (*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 40 /* &.xCachesize */))))(tls, p, n) } + func wrPCachePagecount(tls *libc.TLS, p uintptr) int32 { /* test_init.c:136:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 48 /* &.xPagecount */))))(tls, p) } + func wrPCacheFetch(tls *libc.TLS, p uintptr, a uint32, b int32) uintptr { /* test_init.c:139:28: */ return (*(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 56 /* &.xFetch */))))(tls, p, a, b) } + func wrPCacheUnpin(tls *libc.TLS, p uintptr, a uintptr, b int32) { /* test_init.c:142:13: */ (*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 64 /* &.xUnpin */))))(tls, p, a, b) } + func wrPCacheRekey(tls *libc.TLS, p uintptr, a uintptr, b uint32, c uint32) { /* test_init.c:145:13: */ (*(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 72 /* &.xRekey */))))(tls, p, a, b, c) } + func wrPCacheTruncate(tls *libc.TLS, p uintptr, a uint32) { /* test_init.c:153:13: */ (*(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 80 /* &.xTruncate */))))(tls, p, a) } + func wrPCacheDestroy(tls *libc.TLS, p uintptr) { /* test_init.c:156:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 88 /* &.xDestroy */))))(tls, p) } @@ -110183,17 +110294,20 @@ var g2 = JtGlobal{} /* test_journal.c:207:24 */ func enterJtMutex(tls *libc.TLS) { /* test_journal.c:213:13: */ sqlite3.Xsqlite3_mutex_enter(tls, sqlite3.Xsqlite3_mutex_alloc(tls, 5)) } + func leaveJtMutex(tls *libc.TLS) { /* test_journal.c:216:13: */ sqlite3.Xsqlite3_mutex_leave(tls, sqlite3.Xsqlite3_mutex_alloc(tls, 5)) } + func stop_ioerr_simulation(tls *libc.TLS, piSave uintptr, piSave2 uintptr) { /* test_journal.c:222:13: */ - *(*int32)(unsafe.Pointer(piSave)) = sqlite3.Xsqlite3_io_error_pending + *(*int32)(unsafe.Pointer(piSave)) = libc.AtomicLoadInt32(&sqlite3.Xsqlite3_io_error_pending) *(*int32)(unsafe.Pointer(piSave2)) = sqlite3.Xsqlite3_io_error_hit - sqlite3.Xsqlite3_io_error_pending = -1 + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(-1)) sqlite3.Xsqlite3_io_error_hit = 0 } + func start_ioerr_simulation(tls *libc.TLS, iSave int32, iSave2 int32) { /* test_journal.c:228:13: */ - sqlite3.Xsqlite3_io_error_pending = iSave + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(iSave)) sqlite3.Xsqlite3_io_error_hit = iSave2 } @@ -111002,6 +111116,7 @@ func faultsimPending(tls *libc.TLS) int32 { /* test_malloc.c:160:12: */ func faultsimBeginBenign(tls *libc.TLS) { /* test_malloc.c:169:13: */ memfault.FisBenignMode++ } + func faultsimEndBenign(tls *libc.TLS) { /* test_malloc.c:172:13: */ memfault.FisBenignMode-- } @@ -111107,6 +111222,7 @@ __3: } var zHex = *(*[17]int8)(unsafe.Pointer(ts + 29776 /* "0123456789abcdef" */)) /* test_malloc.c:240:21 */ + func hexToInt(tls *libc.TLS, h int32) int32 { /* test_malloc.c:262:12: */ if (h >= '0') && (h <= '9') { return (h - '0') @@ -111117,6 +111233,7 @@ func hexToInt(tls *libc.TLS, h int32) int32 { /* test_malloc.c:262:12: */ } return int32(0) } + func textToPointer(tls *libc.TLS, z uintptr, pp uintptr) int32 { /* test_malloc.c:271:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -112962,6 +113079,7 @@ func md5step(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test } } } + func md5finalize(tls *libc.TLS, context uintptr) { /* test_md5.c:432:13: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -112976,6 +113094,7 @@ func md5finalize(tls *libc.TLS, context uintptr) { /* test_md5.c:432:13: */ MD5DigestToBase16(tls, bp /* &digest[0] */, bp+16 /* &zBuf[0] */) sqlite3.Xsqlite3_result_text(tls, context, bp+16 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) } + func Md5_Register(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pThunk uintptr) int32 { /* test_md5.c:441:5: */ var rc int32 = sqlite3.Xsqlite3_create_function(tls, db, ts+33176 /* "md5sum" */, -1, 1, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { @@ -113530,30 +113649,39 @@ func multiplexDelete(tls *libc.TLS, pVfs uintptr, zName uintptr, syncDir int32) func multiplexAccess(tls *libc.TLS, a uintptr, b uintptr, c int32, d uintptr) int32 { /* test_multiplex.c:656:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 56 /* &.xAccess */))))(tls, gMultiplex.FpOrigVfs, b, c, d) } + func multiplexFullPathname(tls *libc.TLS, a uintptr, b uintptr, c int32, d uintptr) int32 { /* test_multiplex.c:659:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 64 /* &.xFullPathname */))))(tls, gMultiplex.FpOrigVfs, b, c, d) } + func multiplexDlOpen(tls *libc.TLS, a uintptr, b uintptr) uintptr { /* test_multiplex.c:662:13: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((gMultiplex.FpOrigVfs + 72 /* &.xDlOpen */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexDlError(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_multiplex.c:665:13: */ (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((gMultiplex.FpOrigVfs + 80 /* &.xDlError */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexDlSym(tls *libc.TLS, a uintptr, b uintptr, c uintptr) uintptr { /* test_multiplex.c:668:13: */ return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((gMultiplex.FpOrigVfs + 88 /* &.xDlSym */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexDlClose(tls *libc.TLS, a uintptr, b uintptr) { /* test_multiplex.c:671:13: */ (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((gMultiplex.FpOrigVfs + 96 /* &.xDlClose */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexRandomness(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { /* test_multiplex.c:674:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 104 /* &.xRandomness */))))(tls, gMultiplex.FpOrigVfs, b, c) } + func multiplexSleep(tls *libc.TLS, a uintptr, b int32) int32 { /* test_multiplex.c:677:12: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 112 /* &.xSleep */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexCurrentTime(tls *libc.TLS, a uintptr, b uintptr) int32 { /* test_multiplex.c:680:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 120 /* &.xCurrentTime */))))(tls, gMultiplex.FpOrigVfs, b) } + func multiplexGetLastError(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { /* test_multiplex.c:683:12: */ if (*sqlite3_vfs)(unsafe.Pointer(gMultiplex.FpOrigVfs)).FxGetLastError != 0 { return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 128 /* &.xGetLastError */))))(tls, gMultiplex.FpOrigVfs, b, c) @@ -113562,6 +113690,7 @@ func multiplexGetLastError(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { } return int32(0) } + func multiplexCurrentTimeInt64(tls *libc.TLS, a uintptr, b uintptr) int32 { /* test_multiplex.c:690:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 136 /* &.xCurrentTimeInt64 */))))(tls, gMultiplex.FpOrigVfs, b) } @@ -113939,7 +114068,7 @@ func multiplexShmMap(tls *libc.TLS, pConn uintptr, iRegion int32, szRegion int32 var pSubOpen uintptr = multiplexSubOpen(tls, (*multiplexConn)(unsafe.Pointer(p)).FpGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen != 0 { - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 104 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 104 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, libc.AtomicLoadUintptr(&pp)) } return 10 } @@ -116132,16 +116261,18 @@ func vfslogShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 25, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } + func vfslogShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* test_osinst.c:442:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) - rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 104 /* &.xShmMap */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 104 /* &.xShmMap */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 23, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } + func vfslogShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_osinst.c:458:13: */ var t sqlite3_uint64 var p uintptr = pFile @@ -116150,6 +116281,7 @@ func vfslogShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_osinst.c:458:13: * t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, 26, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), 0, 0, 0) } + func vfslogShmUnmap(tls *libc.TLS, pFile uintptr, deleteFlag int32) int32 { /* test_osinst.c:466:12: */ var rc int32 var t sqlite3_uint64 @@ -116258,17 +116390,18 @@ func vfslogCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* func vfslogGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* test_osinst.c:610:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 128 /* &.xGetLastError */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, a, b) } + func vfslogCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* test_osinst.c:613:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 136 /* &.xCurrentTimeInt64 */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, p) } func vfslog_flush(tls *libc.TLS, p uintptr) { /* test_osinst.c:617:13: */ - var pending int32 = sqlite3.Xsqlite3_io_error_pending + var pending int32 = libc.AtomicLoadInt32(&sqlite3.Xsqlite3_io_error_pending) var persist int32 = sqlite3.Xsqlite3_io_error_persist var diskfull int32 = sqlite3.Xsqlite3_diskfull_pending - sqlite3.Xsqlite3_io_error_pending = 0 + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(0)) sqlite3.Xsqlite3_io_error_persist = 0 sqlite3.Xsqlite3_diskfull_pending = 0 @@ -116278,7 +116411,7 @@ func vfslog_flush(tls *libc.TLS, p uintptr) { /* test_osinst.c:617:13: */ (*VfslogVfs)(unsafe.Pointer(p)).FnBuf = 0 } - sqlite3.Xsqlite3_io_error_pending = pending + libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(pending)) sqlite3.Xsqlite3_io_error_persist = persist sqlite3.Xsqlite3_diskfull_pending = diskfull } @@ -117476,6 +117609,7 @@ var gQuota struct { func quotaEnter(tls *libc.TLS) { /* test_quota.c:190:13: */ sqlite3.Xsqlite3_mutex_enter(tls, gQuota.FpMutex) } + func quotaLeave(tls *libc.TLS) { /* test_quota.c:191:13: */ sqlite3.Xsqlite3_mutex_leave(tls, gQuota.FpMutex) } @@ -117975,7 +118109,7 @@ func quotaDeviceCharacteristics(tls *libc.TLS, pConn uintptr) int32 { /* test_qu // Pass xShmMap requests through to the original VFS unchanged. func quotaShmMap(tls *libc.TLS, pConn uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* test_quota.c:700:12: */ var pSubOpen uintptr = quotaSubOpen(tls, pConn) - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 104 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 104 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, libc.AtomicLoadUintptr(&pp)) } // Pass xShmLock requests through to the original VFS unchanged. @@ -121592,7 +121726,7 @@ func superlockWalLock(tls *libc.TLS, db uintptr, pBusy uintptr) int32 { /* test_ if rc != 0 { return rc } - libc.Xmemset(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* p */)), 0, uint64(32)) + libc.Xmemset(tls, libc.AtomicLoadPUintptr(bp+8 /* p */), 0, uint64(32)) // Obtain exclusive locks on all the "read-lock" slots. Once these locks // are held, it is guaranteed that there are no active reader, writer or @@ -121996,6 +122130,7 @@ func tclvarConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uin } var zSchema = *(*[100]int8)(unsafe.Pointer(ts + 35581 /* "CREATE TABLE x( ..." */)) /* test_tclvar.c:88:21 */ + // Note that for this virtual table, the xCreate and xConnect // methods are identical. @@ -123125,6 +123260,7 @@ func tvfsInjectIoerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:269:12: */ func tvfsInjectFullerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:273:12: */ return tvfsInjectFault(tls, (p + 72 /* &.full_err */)) } + func tvfsInjectCantopenerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:276:12: */ return tvfsInjectFault(tls, (p + 84 /* &.cantopen_err */)) } @@ -123733,7 +123869,7 @@ func tvfsShmMap(tls *libc.TLS, pFile uintptr, iPage int32, pgsz int32, isWrite i var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if (*Testvfs)(unsafe.Pointer(p)).FisFullshm != 0 { - return sqlite3.Xsqlite3OsShmMap(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, iPage, pgsz, isWrite, pp) + return sqlite3.Xsqlite3OsShmMap(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, iPage, pgsz, isWrite, libc.AtomicLoadUintptr(&pp)) } if uintptr(0) == (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm { @@ -123767,7 +123903,7 @@ func tvfsShmMap(tls *libc.TLS, pFile uintptr, iPage int32, pgsz int32, isWrite i tvfsAllocPage(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm, iPage, pgsz) } if (*(*int32)(unsafe.Pointer(bp /* rc */)) == 0) || (*(*int32)(unsafe.Pointer(bp /* rc */)) == 8) { - *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer(((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm + 16 /* &.aPage */) + uintptr(iPage)*8)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer(((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm + 16 /* &.aPage */) + uintptr(iPage)*8)) } return *(*int32)(unsafe.Pointer(bp /* rc */)) @@ -124735,11 +124871,11 @@ func test_vfs_set_readmark(tls *libc.TLS, clientData uintptr, interp uintptr, ob tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return 1 } - if *(*uintptr)(unsafe.Pointer(bp + 48 /* pShm */)) == uintptr(0) { + if libc.AtomicLoadPUintptr(bp+48 /* pShm */) == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+37322 /* "*-shm is not yet..." */, 0)) return 1 } - aShm = *(*uintptr)(unsafe.Pointer(bp + 48 /* pShm */)) + aShm = libc.AtomicLoadPUintptr(bp + 48 /* pShm */) iOff = (((12 * 2) + 1) + *(*int32)(unsafe.Pointer(bp + 32 /* iSlot */))) if objc == 5 { @@ -125096,6 +125232,7 @@ func doTestWindowFinalize(tls *libc.TLS, bValue int32, ctx uintptr) { /* test_wi func testWindowStep(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* test_window.c:107:13: */ doTestWindowStep(tls, 0, ctx, nArg, apArg) } + func testWindowInverse(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* test_window.c:114:13: */ doTestWindowStep(tls, 1, ctx, nArg, apArg) } @@ -125103,6 +125240,7 @@ func testWindowInverse(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { func testWindowFinal(tls *libc.TLS, ctx uintptr) { /* test_window.c:122:13: */ doTestWindowFinalize(tls, 0, ctx) } + func testWindowValue(tls *libc.TLS, ctx uintptr) { /* test_window.c:125:13: */ doTestWindowFinalize(tls, 1, ctx) } diff --git a/lib/capi_darwin_amd64.go b/lib/capi_darwin_amd64.go index de1c5cc..14d2f95 100644 --- a/lib/capi_darwin_amd64.go +++ b/lib/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -pkgname sqlite3 -o lib/sqlite_darwin_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1 -DSQLITE_WITHOUT_ZONEMALLOC', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -pkgname sqlite3 -o lib/sqlite_darwin_amd64.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1 -DSQLITE_WITHOUT_ZONEMALLOC', DO NOT EDIT. package sqlite3 diff --git a/lib/capi_linux_386.go b/lib/capi_linux_386.go index 00a702d..4330f31 100644 --- a/lib/capi_linux_386.go +++ b/lib/capi_linux_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -pkgname sqlite3 -o lib/sqlite_linux_386.go -trace-translation-units testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -pkgname sqlite3 -o lib/sqlite_linux_386.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 diff --git a/lib/capi_linux_amd64.go b/lib/capi_linux_amd64.go index 54b2211..1c2c9ac 100644 --- a/lib/capi_linux_amd64.go +++ b/lib/capi_linux_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -pkgname sqlite3 -o lib/sqlite_linux_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -pkgname sqlite3 -o lib/sqlite_linux_amd64.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 diff --git a/lib/capi_linux_arm.go b/lib/capi_linux_arm.go index 6ec4e2d..fbf21ab 100644 --- a/lib/capi_linux_arm.go +++ b/lib/capi_linux_arm.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -pkgname sqlite3 -o lib/sqlite_linux_arm.go -trace-translation-units testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -pkgname sqlite3 -o lib/sqlite_linux_arm.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 diff --git a/lib/capi_linux_arm64.go b/lib/capi_linux_arm64.go index 3a0bc48..9de7124 100644 --- a/lib/capi_linux_arm64.go +++ b/lib/capi_linux_arm64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -pkgname sqlite3 -o lib/sqlite_linux_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -pkgname sqlite3 -o lib/sqlite_linux_arm64.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 diff --git a/lib/capi_windows_386.go b/lib/capi_windows_386.go index ade4da7..f32dc1f 100644 --- a/lib/capi_windows_386.go +++ b/lib/capi_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -pkgname sqlite3 -o lib/sqlite_windows_386.go -trace-translation-units testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -pkgname sqlite3 -o lib/sqlite_windows_386.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. package sqlite3 diff --git a/lib/capi_windows_amd64.go b/lib/capi_windows_amd64.go index a7f863e..866aad6 100644 --- a/lib/capi_windows_amd64.go +++ b/lib/capi_windows_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -pkgname sqlite3 -o lib/sqlite_windows_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -pkgname sqlite3 -o lib/sqlite_windows_amd64.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. package sqlite3 diff --git a/lib/sqlite_darwin_amd64.go b/lib/sqlite_darwin_amd64.go index 5fa9a74..107f7b7 100644 --- a/lib/sqlite_darwin_amd64.go +++ b/lib/sqlite_darwin_amd64.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -pkgname sqlite3 -o lib/sqlite_darwin_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1 -DSQLITE_WITHOUT_ZONEMALLOC', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -pkgname sqlite3 -o lib/sqlite_darwin_amd64.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1 -DSQLITE_WITHOUT_ZONEMALLOC', DO NOT EDIT. package sqlite3 import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -12,6 +13,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer const ( @@ -4247,8 +4249,14 @@ type Size_t = uint64 /* :9:23 */ type Wchar_t = int32 /* :15:24 */ -type X__int128_t = [2]int64 /* :21:24 */ //TODO -type X__uint128_t = [2]uint64 /* :22:25 */ //TODO +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 type X__builtin_va_list = uintptr /* :47:14 */ type X__float128 = float64 /* :48:21 */ @@ -17011,6 +17019,7 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:21407:21: *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 /* &.mxValue */) + uintptr(op)*8)) = *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) /* &.nowValue */) + uintptr(op)*8)) } } + func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:21418:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) /* &.nowValue */) + uintptr(op)*8)) -= (Sqlite3StatValueType(N)) @@ -17051,6 +17060,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex // Prevent warning when SQLITE_THREADSAFE=0 return 0 } + func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:21477:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -19197,6 +19207,7 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:23048:21: */ (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = uintptr(0) } } + func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:23054:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -19208,6 +19219,7 @@ func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I return (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 16 /* &.xRead */))))(tls, id, pBuf, amt, offset) } + func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:23058:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -19219,9 +19231,11 @@ func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset return (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 24 /* &.xWrite */))))(tls, id, pBuf, amt, offset) } + func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:23062:20: */ return (*(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 32 /* &.xTruncate */))))(tls, id, size) } + func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:23065:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -19236,6 +19250,7 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c } return 0 } + func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:23069:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -19247,6 +19262,7 @@ func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sql return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 48 /* &.xFileSize */))))(tls, id, pSize) } + func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:23073:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -19258,9 +19274,11 @@ func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 56 /* &.xLock */))))(tls, id, lockType) } + func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:23077:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 64 /* &.xUnlock */))))(tls, id, lockType) } + func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:23080:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -19306,6 +19324,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in } return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 80 /* &.xFileControl */))))(tls, id, op, pArg) } + func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:23114:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 80 /* &.xFileControl */))))(tls, id, op, pArg) @@ -19321,18 +19340,23 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:23118: return 4096 }() } + func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:23122:20: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 96 /* &.xDeviceCharacteristics */))))(tls, id) } + func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:23126:20: */ return (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 112 /* &.xShmLock */))))(tls, id, offset, n, flags) } + func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:23129:21: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 120 /* &.xShmBarrier */))))(tls, id) } + func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:23132:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 128 /* &.xShmUnmap */))))(tls, id, deleteFlag) } + func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:23135:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -19342,7 +19366,7 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten Xsqlite3_free(tls, pTstAlloc) } - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 104 /* &.xShmMap */))))(tls, id, iPage, pgsz, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 104 /* &.xShmMap */))))(tls, id, iPage, pgsz, bExtend, libc.AtomicLoadUintptr(&pp)) } // The real implementation of xFetch and xUnfetch @@ -19357,6 +19381,7 @@ func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr return (*(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 136 /* &.xFetch */))))(tls, id, iOff, iAmt, pp) } + func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:23153:20: */ return (*(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 144 /* &.xUnfetch */))))(tls, id, iOff, p) } @@ -19381,6 +19406,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f return rc } + func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:23188:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -19392,6 +19418,7 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pVfs + 48 /* &.xDelete */))))(tls, pVfs, zPath, dirSync) } + func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:23193:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -19403,6 +19430,7 @@ func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, p return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 56 /* &.xAccess */))))(tls, pVfs, zPath, flags, pResOut) } + func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:23202:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -19415,18 +19443,23 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut *(*int8)(unsafe.Pointer(zPathOut + uintptr(0))) = int8(0) return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 64 /* &.xFullPathname */))))(tls, pVfs, zPath, nPathOut, zPathOut) } + func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:23213:21: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 72 /* &.xDlOpen */))))(tls, pVfs, zPath) } + func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:23216:21: */ (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pVfs + 80 /* &.xDlError */))))(tls, pVfs, nByte, zBufOut) } + func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:23219:21: */ return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 88 /* &.xDlSym */))))(tls, pVfs, pHdle, zSym) } + func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:23222:21: */ (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pVfs + 96 /* &.xDlClose */))))(tls, pVfs, pHandle) } + func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:23226:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.X__builtin___memset_chk(tls, zBufOut, 0, uint64(nByte), libc.X__builtin_object_size(tls, zBufOut, 0)) @@ -19441,15 +19474,18 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint return int32(0) } + func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:23237:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pVfs + 112 /* &.xSleep */))))(tls, pVfs, nMicro) } + func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:23240:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 128 /* &.xGetLastError */))))(tls, pVfs, 0, uintptr(0)) } return 0 } + func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:23243:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -19487,6 +19523,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin } return rc } + func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:23283:21: */ Xsqlite3OsClose(tls, pFile) @@ -19678,6 +19715,7 @@ func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23474:21: */ (*(*func(*libc.TLS))(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Hooks)) /* &.xBenignBegin */))))(tls) } } + func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23480:21: */ if sqlite3Hooks.FxBenignEnd != 0 { @@ -20153,25 +20191,31 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:25985:17: */ func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:26048:12: */ return 0 } + func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:26049:12: */ return 0 } + func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26050:22: */ _ = id return uintptr(8) } + func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:26054:13: */ _ = p return } + func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:26055:13: */ _ = p return } + func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:26056:12: */ _ = p return 0 } + func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:26060:13: */ _ = p return @@ -20330,6 +20374,7 @@ func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } return priorLimit } + func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:27437:17: */ if n < 0 { n = 0 @@ -20519,6 +20564,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:27620:17: */ } return Xsqlite3Malloc(tls, uint64(n)) } + func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:27626:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) @@ -20537,12 +20583,14 @@ func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27648:20: return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 24 /* &.xSize */))))(tls, p) } + func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:27652:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return 128 } + func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:27659:20: */ if db != 0 { @@ -20559,6 +20607,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit } return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 24 /* &.xSize */))))(tls, p) } + func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:27688:27: */ if p != 0 { @@ -20618,6 +20667,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:27725 Xsqlite3_free(tls, p) } + func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:27762:21: */ if p != 0 { @@ -20685,6 +20735,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 } // IMP: R-26507-47431 return Xsqlite3Realloc(tls, pOld, uint64(n)) } + func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:27831:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) @@ -20755,6 +20806,7 @@ func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3. return p } + func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:27905:21: */ var pBuf uintptr @@ -20812,6 +20864,7 @@ func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* } return dbReallocFinish(tls, db, p, n) } + func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:27977:29: */ var pNew uintptr = uintptr(0) @@ -20863,6 +20916,7 @@ func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3 } return zNew } + func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:28036:21: */ var zNew uintptr @@ -21224,12 +21278,14 @@ func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:28292:22: } return Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*8))) } + func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:28296:15: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return 0.0 } return Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*8))) } + func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:28300:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) @@ -22717,7 +22773,8 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 816 /* "thstndrd" */)) /* sqlite3.c:28611:29 */ // End of function +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 816 /* "thstndrd" */)) /* sqlite3.c:28611:29 */ +// End of function // Enlarge the memory allocation on a StrAccum object so that it is // able to accept at least N more bytes of text. @@ -22836,6 +22893,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:2915 (*StrAccum)(unsafe.Pointer(p)).FzText = zText return zText } + func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29169:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*int8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = int8(0) @@ -23041,6 +23099,7 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a *(*int8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp /* &acc */)).FnChar))) = int8(0) return zBuf } + func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:29369:17: */ var z uintptr var ap Va_list @@ -23290,9 +23349,11 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:30 // The sqlite3_test_control() interface calls these routines to // control the PRNG. var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:30353:42: */ + func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:30354:21: */ libc.X__builtin___memcpy_chk(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uintptr(unsafe.Pointer(&sqlite3Prng)), uint64(unsafe.Sizeof(sqlite3Prng)), libc.X__builtin_object_size(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), 0)) } + func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:30361:21: */ libc.X__builtin___memcpy_chk(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uint64(unsafe.Sizeof(sqlite3Prng)), libc.X__builtin_object_size(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), 0)) } @@ -24328,6 +24389,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:31417:21: */ } *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) } + func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:31439:21: */ *(*U32)(unsafe.Pointer(p + 4 /* &.flags */)) |= (func() uint32 { @@ -24366,6 +24428,7 @@ func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* s } return Xsqlite3StrICmp(tls, zLeft, zRight) } + func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:31474:20: */ var a uintptr var b uintptr @@ -24391,6 +24454,7 @@ func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sq } return c } + func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:31493:16: */ var a uintptr var b uintptr @@ -25241,6 +25305,7 @@ __3: ; return n } + func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:32123:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p + uintptr(0))) = (uint8(v & uint64(0x7f))) @@ -25502,6 +25567,7 @@ func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:32446:20: */ libc.X__builtin___memcpy_chk(tls, bp /* &x */, p, uint64(4), libc.X__builtin_object_size(tls, bp /* &x */, 0)) return libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(bp /* x */))) } + func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:32464:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -25580,6 +25646,7 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:32548 } return int32(0) } + func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:32565:20: */ var magic U32 magic = (*Sqlite3)(unsafe.Pointer(db)).Fmagic @@ -25600,9 +25667,11 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32585:20: */ return libc.X__builtin_add_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } + func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32605:20: */ return libc.X__builtin_sub_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } + func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32620:20: */ return libc.X__builtin_mul_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } @@ -35291,6 +35360,7 @@ type UnixFile = unixFile /* sqlite3.c:33567:25 */ // method was called. If xOpen() is called from a different process id, // indicating that a fork() has occurred, the PRNG will be reset. var randomnessPid Pid_t = 0 /* sqlite3.c:33628:14 */ + func local_ioerr(tls *libc.TLS) { /* sqlite3.c:33812:13: */ Xsqlite3_io_error_hit++ @@ -35488,7 +35558,8 @@ var aSyscall = [29]unix_syscall{ FzName: ts + 4619, /* "ioctl" */ FpCurrent: uintptr(0), FpDefault: uintptr(0)}, -} /* sqlite3.c:33935:3 */ // End of the overrideable system calls +} /* sqlite3.c:33935:3 */ +// End of the overrideable system calls // On some systems, calls to fchown() will trigger a message in a security // log if they come from non-root processes. So avoid calling fchown() if @@ -35663,10 +35734,12 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3 // OK: enter(pLockInfo) // ERROR: enter(pLockInfo), enter(unixBigLock) var unixBigLock uintptr = uintptr(0) /* sqlite3.c:34284:22 */ + func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:34285:13: */ // Not a recursive mutex Xsqlite3_mutex_enter(tls, unixBigLock) } + func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:34289:13: */ Xsqlite3_mutex_leave(tls, unixBigLock) @@ -35868,7 +35941,8 @@ type unixFileId = struct { // A lists of all unixInodeInfo objects. // // Must hold unixBigLock in order to read or write this variable. -var inodeList uintptr = uintptr(0) /* sqlite3.c:34734:22 */ // All unixInodeInfo objects +var inodeList uintptr = uintptr(0) /* sqlite3.c:34734:22 */ +// All unixInodeInfo objects // // This function - unixLogErrorAtLine(), is only ever called via the macro @@ -36132,7 +36206,7 @@ func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { / var reserved int32 = 0 var pFile uintptr = id - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(14) << 8)) } @@ -36760,7 +36834,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:35634:12: */ if Xsqlite3OSTrace != 0 { Xsqlite3DebugPrintf(tls, ts+5055 /* "CLOSE %-3d\n" */, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).Fh)) } - Xsqlite3_open_file_count = Xsqlite3_open_file_count + (-1) + libc.AtomicAddInt32(&Xsqlite3_open_file_count, int32(-1)) Xsqlite3_free(tls, (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused) libc.X__builtin___memset_chk(tls, pFile, 0, uint64(unsafe.Sizeof(UnixFile{})), libc.X__builtin_object_size(tls, pFile, 0)) return 0 @@ -36821,11 +36895,13 @@ func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) in *(*int32)(unsafe.Pointer(pResOut)) = 0 return 0 } + func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:35725:12: */ _ = NotUsed _ = NotUsed2 return 0 } + func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:35729:12: */ _ = NotUsed _ = NotUsed2 @@ -36882,7 +36958,7 @@ func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 var reserved int32 = 0 var pFile uintptr = id - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(14) << 8)) } @@ -37052,7 +37128,7 @@ func flockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { var reserved int32 = 0 var pFile uintptr = id - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(14) << 8)) } @@ -37356,7 +37432,7 @@ func afpCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* var pFile uintptr = id var context uintptr - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(14) << 8)) } @@ -37712,7 +37788,7 @@ func afpUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c: if int32((*UnixFile)(unsafe.Pointer(pFile)).FeFileLock) > 1 { Xsqlite3_io_error_benign = 1 - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) h = -1 } @@ -37750,7 +37826,7 @@ func afpUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c: (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnShared-- if (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnShared == 0 { Xsqlite3_io_error_benign = 1 - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) h = -1 } @@ -37866,7 +37942,7 @@ func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, for ok := true; ok; ok = (got > 0) { got = int32((*(*func(*libc.TLS, int32, uintptr, Size_t, Off_t) Ssize_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(9)*24 + 8 /* &.pCurrent */))))(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, pBuf, uint64(cnt), offset)) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) got = -1 } @@ -37986,7 +38062,7 @@ func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite offset = offset + (Sqlite3_int64(wrote)) pBuf = ((pBuf) + uintptr(wrote)) } - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) wrote = -1 amt = 1 @@ -38193,7 +38269,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:37261 Xsqlite3DebugPrintf(tls, ts+5591 /* "SYNC %-3d\n" */, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).Fh)) } rc = full_fsync(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, isFullsync, isDataOnly) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) rc = 1 } @@ -38230,7 +38306,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:373 var pFile uintptr = id var rc int32 - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(6) << 8)) } @@ -38270,7 +38346,7 @@ func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c // var buf stat at bp, 144 rc = (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(5)*24 + 8 /* &.pCurrent */))))(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, bp /* &buf */) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) rc = 1 } @@ -39073,10 +39149,10 @@ shmpage_out: if !(int32((*UnixShmNode)(unsafe.Pointer(pShmNode)).FnRegion) > iRegion) { goto __25 } - *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(pShmNode)).FapRegion + uintptr(iRegion)*8)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(pShmNode)).FapRegion + uintptr(iRegion)*8)) goto __26 __25: - *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = uintptr(0) __26: ; if !(((*UnixShmNode)(unsafe.Pointer(pShmNode)).FisReadonly != 0) && (rc == 0)) { @@ -39869,7 +39945,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle - Xsqlite3_open_file_count = Xsqlite3_open_file_count + (+1) + libc.AtomicAddInt32(&Xsqlite3_open_file_count, int32(+1)) verifyDbFile(tls, pNew) } return rc @@ -39930,7 +40006,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3 // using the io-error infrastructure to test that SQLite handles this // function failing. *(*int8)(unsafe.Pointer(zBuf + uintptr(0))) = int8(0) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return 10 } @@ -40512,7 +40588,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in var rc int32 = 0 _ = NotUsed - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(10) << 8)) } @@ -40555,7 +40631,7 @@ func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pRes defer tls.Free(144) _ = NotUsed - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(13) << 8)) } @@ -40620,7 +40696,7 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO // using the io-error infrastructure to test that SQLite handles this // function failing. This function could fail if, for example, the // current working directory has been unlinked. - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return 1 } @@ -41003,6 +41079,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { } unixLeaveMutex(tls) } + func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:40000:13: */ // GCC with -pedantic-errors says that C90 does not allow a void* to be // cast into a pointer to a function. And yet the library dlsym() routine @@ -41026,6 +41103,7 @@ func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr }{libc.Xdlsym})) return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(&x)))(tls, p, zSym) } + func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:40023:13: */ _ = NotUsed libc.Xdlclose(tls, pHandle) @@ -41066,7 +41144,8 @@ func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sq // The following variable, if set to a non-zero value, is interpreted as // the number of seconds since 1970 and is used to set the result of // sqlite3OsCurrentTime() during testing. -var Xsqlite3_current_time int32 = 0 /* sqlite3.c:40111:16 */ // Fake system time in seconds since 1970. +var Xsqlite3_current_time int32 = 0 /* sqlite3.c:40111:16 */ +// Fake system time in seconds since 1970. // Find the current time (in Universal Coordinated Time). Write into *piNow // the current time and date as a Julian Day number times 86_400_000. In @@ -43269,6 +43348,7 @@ func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c: func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:48283:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 128 /* &.xGetLastError */))))(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } + func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:48286:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 136 /* &.xCurrentTimeInt64 */))))(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) } @@ -43516,6 +43596,7 @@ func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlit } return int32(0) } + func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:48618:20: */ return (libc.Bool32((p != uintptr(0)) && (Xsqlite3BitvecTestNotNull(tls, p, i) != 0))) } @@ -44023,6 +44104,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:49138:20: */ } return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 16 /* &.xInit */))))(tls, Xsqlite3Config.Fpcache2.FpArg) } + func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:49148:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. @@ -45464,6 +45546,7 @@ func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32 } return uintptr(0) } + func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:50793:15: */ var pCache uintptr = p var pPage uintptr @@ -45474,6 +45557,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) return pPage } + func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:50808:28: */ var pCache uintptr = p @@ -48946,7 +49030,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54657:12: */ libc.X__builtin___memcpy_chk(tls, (pPager + 136 /* &.dbFileVers */), dbFileVers, uint64(unsafe.Sizeof([16]int8{})), libc.X__builtin_object_size(tls, (pPager+136 /* &.dbFileVers */), 0)) } } - Xsqlite3_pager_readdb_count++ + atomic.AddInt32(&Xsqlite3_pager_readdb_count, 1) (*Pager)(unsafe.Pointer(pPager)).FnRead++ return rc @@ -49663,12 +49747,14 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno } var saved_cnt int32 /* sqlite3.c:55493:12: */ + func Xdisable_simulated_io_errors(tls *libc.TLS) { /* sqlite3.c:55494:6: */ - saved_cnt = Xsqlite3_io_error_pending - Xsqlite3_io_error_pending = -1 + saved_cnt = libc.AtomicLoadInt32(&Xsqlite3_io_error_pending) + libc.AtomicStoreInt32(&Xsqlite3_io_error_pending, int32(-1)) } + func Xenable_simulated_io_errors(tls *libc.TLS) { /* sqlite3.c:55498:6: */ - Xsqlite3_io_error_pending = saved_cnt + libc.AtomicStoreInt32(&Xsqlite3_io_error_pending, int32(saved_cnt)) } // Read the first N bytes from the beginning of the file into memory @@ -50207,7 +50293,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // Update any backup objects copying the contents of this pager. Xsqlite3BackupUpdate(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup, pgno, (*PgHdr)(unsafe.Pointer(pList)).FpData) - Xsqlite3_pager_writedb_count++ + atomic.AddInt32(&Xsqlite3_pager_writedb_count, 1) } else { } @@ -50278,6 +50364,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56159:12: * } return rc } + func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56195:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) @@ -51585,11 +51672,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57391: // Do not use this routine to release the last reference to page1 } + func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57403:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } + func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57406:21: */ var pPager uintptr @@ -51796,7 +51885,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite return rc } - Xsqlite3_pager_writej_count++ + atomic.AddInt32(&Xsqlite3_pager_writej_count, 1) *(*I64)(unsafe.Pointer(pPager + 96 /* &.journalOff */)) += (I64(8 + (*Pager)(unsafe.Pointer(pPager)).FpageSize)) (*Pager)(unsafe.Pointer(pPager)).FnRec++ @@ -52577,6 +52666,7 @@ func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { return rc } + func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:58562:20: */ if (nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint) && ((*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0) { @@ -53936,6 +54026,7 @@ func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintpt return rc } + func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:60010:12: */ if ((*Wal)(unsafe.Pointer(pWal)).FnWiData <= iPage) || ((libc.AssignPtrUintptr(ppPage, *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*8)))) == uintptr(0)) { return walIndexPageRealloc(tls, pWal, iPage, ppPage) @@ -54114,6 +54205,7 @@ func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite return rc } + func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:60272:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return @@ -54122,6 +54214,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: (1 | 4)) } + func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:60278:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { @@ -54132,6 +54225,7 @@ func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 return rc } + func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:60288:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return @@ -54148,6 +54242,7 @@ func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:60301:12: */ return (int32((iPage * U32(383)) & (U32((4096 * 2) - 1)))) } + func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:60306:12: */ return ((iPriorHash + 1) & ((4096 * 2) - 1)) } @@ -58101,11 +58196,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64358:29: */ } (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } + func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64372:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } + func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64375:29: */ var i int32 var p uintptr @@ -58117,6 +58214,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64375:29: */ } } } + func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64384:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) @@ -58131,6 +58229,7 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64384:21: * func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:64470:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } + func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:64474:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -58358,7 +58457,9 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: (*BtLock)(unsafe.Pointer(pLock)).FeLock = U8(1) } } -} // Forward reference +} + +// Forward reference // This routine is used inside of assert() only **** // @@ -58968,6 +59069,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn (*CellInfo)(unsafe.Pointer(pInfo)).FpPayload = uintptr(0) return } + func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:65649:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -59032,6 +59134,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt btreeParseCellAdjustSizeForOverflow(tls, pPage, pCell, pInfo) } } + func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:65717:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -59062,6 +59165,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u btreeParseCellAdjustSizeForOverflow(tls, pPage, pCell, pInfo) } } + func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:65754:13: */ (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((pPage + 128 /* &.xParseCell */))))(tls, pPage, ((*MemPage)(unsafe.Pointer((pPage))).FaData + uintptr((int32((*MemPage)(unsafe.Pointer((pPage))).FmaskPage) & int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(((*MemPage)(unsafe.Pointer((pPage))).FaCellIdx + uintptr((2 * (iCell))))))))))), pInfo) } @@ -59116,6 +59220,7 @@ func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c return U16(nSize) } + func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:65822:12: */ var pIter uintptr = (pCell + uintptr(4)) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -59968,6 +60073,7 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:66624:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } + func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:66627:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) @@ -60053,11 +60159,13 @@ func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66704:13: * Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } + func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66713:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } + func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66716:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -62367,6 +62475,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(1) return 0 } + func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:68920:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -62374,6 +62483,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK Xsqlite3BtreeLeave(tls, p) return rc } + func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:68933:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -62468,6 +62578,7 @@ func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:69070:21 *(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) |= U8((0x40)) } + func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:69074:21: */ *(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) &= libc.Uint8FromInt32((^libc.Int32(0x40))) @@ -62812,6 +62923,7 @@ func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf } return accessPayload(tls, pCur, offset, amt, pBuf, 0) } + func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:69495:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == 0 { @@ -63674,6 +63786,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70198:28: */ } return int32(0) } + func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:70268:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -63767,6 +63880,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70308:28: * } return rc } + func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:70357:20: */ _ = flags // Used in COMDB2 but not native SQLite @@ -64513,6 +64627,7 @@ __18: releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pTrunk */))) return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } + func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:70851:13: */ if (*(*int32)(unsafe.Pointer(pRC))) == 0 { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) @@ -65096,6 +65211,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:71397 *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer(((*CellArray)(unsafe.Pointer(p)).FpRef + 120 /* &.xCellSize */))))(tls, (*CellArray)(unsafe.Pointer(p)).FpRef, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FapCell + uintptr(N)*8))) return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } + func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:71403:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { @@ -67907,6 +68023,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags *(*Pgno)(unsafe.Pointer(piTable)) = *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)) return 0 } + func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:73729:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -68161,6 +68278,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 } return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) } + func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:73941:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -68488,6 +68606,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:74299:1 i = j } } + func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:74309:12: */ var j U32 var i U32 @@ -69958,6 +70077,7 @@ func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqli } } } + func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:75746:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) @@ -70455,6 +70575,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:76417:28: */ Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp /* &value */, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) return *(*I64)(unsafe.Pointer(bp /* value */)) } + func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:76422:20: */ var flags int32 @@ -70485,6 +70606,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:76445:31: Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp /* &val */, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) return *(*float64)(unsafe.Pointer(bp /* val */)) } + func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:76451:23: */ if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & 0x0008) != 0 { @@ -70683,6 +70805,7 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:76652:21 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(0x0001) } } + func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:76659:21: */ Xsqlite3VdbeMemSetNull(tls, p) } @@ -70800,6 +70923,7 @@ func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sq Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } + func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:76833:21: */ if (int32((*Mem)(unsafe.Pointer((pTo))).Fflags) & (0x2000 | 0x0400)) != 0 { @@ -70986,6 +71110,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, } return rc } + func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:77029:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -71788,6 +71913,7 @@ func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:77717: } return 0 } + func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:77720:20: */ var p uintptr = pVal @@ -71952,6 +72078,7 @@ func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) i return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) } + func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:77972:20: */ var i int32 var pOp uintptr @@ -71973,12 +72100,15 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, (*VdbeOp)(unsafe.Pointer(pOp)).FzComment = uintptr(0) return i } + func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:78009:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } + func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:78012:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, 0, 0) } + func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:78015:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } @@ -72231,6 +72361,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(p)).FaLabel + uintptr(j)*4)) = (*Vdbe)(unsafe.Pointer(v)).FnOp } } + func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:78302:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -72499,15 +72630,19 @@ __3: func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:78782:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } + func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78785:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } + func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78788:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } + func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78791:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } + func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:78794:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { @@ -72556,10 +72691,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:78849:29: */ } Xsqlite3DbFreeNN(tls, db, p) } + func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:78853:29: */ freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) Xsqlite3DbFreeNN(tls, db, p) } + func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:78857:13: */ switch p4type { @@ -72704,6 +72841,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-7) } } + func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:79034:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -72789,6 +72927,7 @@ func vdbeVComment(tls *libc.TLS, p uintptr, zFormat uintptr, ap Va_list) { /* sq (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(((*Vdbe)(unsafe.Pointer(p)).FnOp-1))*32)).FzComment = Xsqlite3VMPrintf(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, zFormat, ap) } } + func Xsqlite3VdbeComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79123:21: */ var ap Va_list _ = ap @@ -72798,6 +72937,7 @@ func Xsqlite3VdbeComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) _ = ap } } + func Xsqlite3VdbeNoopComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79131:21: */ var ap Va_list _ = ap @@ -73183,6 +73323,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:79548:29: */ } } } + func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:79562:21: */ if ((*Vdbe)(unsafe.Pointer(p)).FlockMask) == YDbMask(0) { return @@ -74108,6 +74249,7 @@ func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3. } return rc } + func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:80715:20: */ if ((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0) && ((*Vdbe)(unsafe.Pointer(p)).FiStatement != 0) { return vdbeCloseStatement(tls, p, eOp) @@ -74539,7 +74681,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:812 if *(*int32)(unsafe.Pointer(bp /* res */)) != 0 { return Xsqlite3CorruptError(tls, 81251) } - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(0) return 0 @@ -74673,6 +74815,7 @@ func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3. } return U32(0) } + func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:81468:19: */ return sqlite3SmallTypeSizes[serial_type] @@ -74800,6 +74943,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { } return U32(8) } + func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { /* sqlite3.c:81629:20: */ switch serial_type { case U32(10): @@ -74903,6 +75047,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin } var aFlag = [2]U16{(U16(0x0010 | 0x1000)), (U16(0x0002 | 0x1000))} /* sqlite3.c:81711:24 */ + // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if // the first argument is a pointer to KeyInfo structure pKeyInfo. @@ -75498,6 +75643,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } + func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:82413:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -76100,6 +76246,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83026:12: */ } return int32(0) } + func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83034:12: */ if p == uintptr(0) { Xsqlite3_log(tls, 21, ts+8181 /* "API called with ..." */, 0) @@ -76237,21 +76384,27 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:831 } return uintptr(0) } + func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83172:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(1)) } + func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83175:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(2)) } + func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:83178:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } + func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83181:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } + func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:83184:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } + func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:83187:25: */ var pMem uintptr = pVal return func() uint32 { @@ -76261,6 +76414,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 return uint32(0) }() } + func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:83191:17: */ var p uintptr = pVal if ((((int32((*Mem)(unsafe.Pointer(p)).Fflags) & ((0xc1bf | 0x0200) | 0x8000)) == ((0x0001 | 0x0200) | 0x8000)) && @@ -76273,15 +76427,19 @@ func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr } return uintptr(0) } + func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83204:32: */ return Xsqlite3ValueText(tls, pVal, uint8(1)) } + func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83208:23: */ return Xsqlite3ValueText(tls, pVal, uint8(2)) } + func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83211:23: */ return Xsqlite3ValueText(tls, pVal, uint8(3)) } + func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83214:23: */ return Xsqlite3ValueText(tls, pVal, uint8(2)) } @@ -76417,6 +76575,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 Xsqlite3_result_error_toobig(tls, pCtx) } } + func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:83369:12: */ if xDel == uintptr(0) { @@ -76431,10 +76590,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) } return 18 } + func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83385:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(0), xDel) } + func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:83395:17: */ if n > uint64(0x7fffffff) { @@ -76443,32 +76604,39 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui setResultStrOrError(tls, pCtx, z, int32(n), uint8(0), xDel) } } + func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:83409:17: */ Xsqlite3VdbeMemSetDouble(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, rVal) } + func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:83413:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = 1 Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, n, uint8(1), libc.UintptrFromInt32(-1)) } + func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:83419:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = 1 Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, n, uint8(2), libc.UintptrFromInt32(-1)) } + func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:83425:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } + func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:83429:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } + func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:83433:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) } + func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:83437:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut @@ -76476,16 +76644,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(0x0001) Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } + func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:83449:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = (U8(eSubtype & uint32(0xff))) *(*U16)(unsafe.Pointer(pOut + 8 /* &.flags */)) |= U16((0x8000)) } + func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83455:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(1), xDel) } + func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:83464:17: */ if int32(enc) == 4 { @@ -76497,26 +76668,32 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui setResultStrOrError(tls, pCtx, z, int32(n), enc, xDel) } } + func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83481:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(2), xDel) } + func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83490:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(3), xDel) } + func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83499:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(2), xDel) } + func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:83509:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } + func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:83513:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } + func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:83517:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut @@ -76526,6 +76703,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, int32(n)) return 0 } + func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:83526:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { @@ -77130,36 +77308,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84107:16: */ var val int32 = Xsqlite3_value_bytes(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84112:16: */ var val int32 = Xsqlite3_value_bytes16(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:84117:19: */ var val float64 = Xsqlite3_value_double(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84122:16: */ var val int32 = Xsqlite3_value_int(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:84127:25: */ var val Sqlite_int64 = Xsqlite3_value_int64(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84132:32: */ var val uintptr = Xsqlite3_value_text(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84137:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if (int32((*Mem)(unsafe.Pointer(pOut)).Fflags) & 0x0800) != 0 { @@ -77169,11 +77354,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s columnMallocFailure(tls, pStmt) return pOut } + func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84147:23: */ var val uintptr = Xsqlite3_value_text16(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84153:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) @@ -77229,6 +77416,7 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84224:23: */ return columnName(tls, pStmt, N, 0, 0) } + func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84228:23: */ return columnName(tls, pStmt, N, 1, 0) } @@ -77241,6 +77429,7 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84247:23: */ return columnName(tls, pStmt, N, 0, 1) } + func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84251:23: */ return columnName(tls, pStmt, N, 1, 1) } @@ -77251,6 +77440,7 @@ func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84263:23: */ return columnName(tls, pStmt, N, 0, 2) } + func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84267:23: */ return columnName(tls, pStmt, N, 1, 2) } @@ -77261,6 +77451,7 @@ func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uint func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84277:23: */ return columnName(tls, pStmt, N, 0, 3) } + func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84281:23: */ return columnName(tls, pStmt, N, 1, 3) } @@ -77271,6 +77462,7 @@ func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84291:23: */ return columnName(tls, pStmt, N, 0, 4) } + func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84295:23: */ return columnName(tls, pStmt, N, 1, 4) } @@ -77365,6 +77557,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84396:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(0)) } + func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:84408:16: */ if nData > uint64(0x7fffffff) { @@ -77374,6 +77567,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, } return int32(0) } + func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:84422:16: */ var rc int32 var p uintptr = pStmt @@ -77384,9 +77578,11 @@ func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) } return rc } + func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:84432:16: */ return Xsqlite3_bind_int64(tls, p, i, I64(iValue)) } + func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:84435:16: */ var rc int32 var p uintptr = pStmt @@ -77397,6 +77593,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in } return rc } + func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84445:16: */ var rc int32 var p uintptr = pStmt @@ -77406,6 +77603,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite } return rc } + func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:84454:16: */ var rc int32 var p uintptr = pStmt @@ -77418,9 +77616,11 @@ func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, } return rc } + func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84472:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(1)) } + func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:84481:16: */ if nData > uint64(0x7fffffff) { @@ -77433,9 +77633,11 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, } return int32(0) } + func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84498:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(2)) } + func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:84508:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { @@ -77477,6 +77679,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) } return rc } + func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:84539:16: */ var rc int32 var p uintptr = pStmt @@ -77487,6 +77690,7 @@ func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int3 } return rc } + func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:84549:16: */ var rc int32 var p uintptr = pStmt @@ -77533,6 +77737,7 @@ func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName i } return Xsqlite3VListNameToNum(tls, (*Vdbe)(unsafe.Pointer(p)).FpVList, zName, nName) } + func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:84594:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } @@ -78198,6 +78403,7 @@ var Xsqlite3_sort_count int32 = 0 /* sqlite3.c:85308:16 */ // is working correctly. This variable has no function other than to // help verify the correct operation of the library. var Xsqlite3_max_blobsize int32 = 0 /* sqlite3.c:85319:16 */ + func updateMaxBlobsize(tls *libc.TLS, p uintptr) { /* sqlite3.c:85320:13: */ if ((int32((*Mem)(unsafe.Pointer(p)).Fflags) & (0x0002 | 0x0010)) != 0) && ((*Mem)(unsafe.Pointer(p)).Fn > Xsqlite3_max_blobsize) { Xsqlite3_max_blobsize = (*Mem)(unsafe.Pointer(p)).Fn @@ -78500,6 +78706,7 @@ func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(0x0004) return pOut } + func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:85966:12: */ var pOut uintptr @@ -85545,7 +85752,7 @@ __551: ; __535: ; - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) if !(oc >= 24) { goto __552 } @@ -86791,7 +86998,7 @@ __656: __114: // jump __115: // jump Xsqlite3_sort_count++ - Xsqlite3_search_count-- + atomic.AddInt32(&Xsqlite3_search_count, -1) *(*U32)(unsafe.Pointer((p + 212 /* &.aCounter */) + uintptr(2)*4))++ // Fall through into OP_Rewind /* no break */ @@ -86924,7 +87131,7 @@ next_tail: } (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(0) *(*U32)(unsafe.Pointer((p + 212 /* &.aCounter */) + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) goto jump_to_p2_and_check_for_interrupt __661: ; @@ -93671,6 +93878,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. } return 0 } + func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:97606:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) @@ -93829,6 +94037,7 @@ func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return 0 } + func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:97725:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- @@ -93890,6 +94099,7 @@ func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli } return 0 } + func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:97794:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -96175,6 +96385,7 @@ func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, p } return pExpr } + func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:99820:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -96703,6 +96914,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:100 } } } + func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:100413:13: */ if p != 0 { var i int32 @@ -96711,6 +96923,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } } + func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:100421:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { @@ -97092,6 +97305,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 Xsqlite3DbFreeNN(tls, db, p) } } + func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:100855:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) @@ -97352,12 +97566,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) } return 0 } + func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101135:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */)) { return 0 } return 1 } + func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:101138:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -97398,6 +97614,7 @@ func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr } return uintptr(0) } + func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:101171:25: */ var pNew uintptr var pItem uintptr @@ -97510,6 +97727,7 @@ func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintp } return pNew } + func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:101263:23: */ var pNew uintptr var i int32 @@ -97538,6 +97756,7 @@ func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } return pNew } + func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:101287:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97842,6 +98061,7 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:1 } Xsqlite3DbFreeNN(tls, db, pList) } + func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:101584:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) @@ -98046,6 +98266,7 @@ func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / } return int32(0) } + func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:101788:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -102721,6 +102942,7 @@ func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* } return i } + func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:105750:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) @@ -107225,6 +107447,7 @@ __3: ; return 0 } + func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:110000:20: */ for pSelect != 0 { if Xsqlite3FixExprList(tls, pFix, (*Select)(unsafe.Pointer(pSelect)).FpEList) != 0 { @@ -107260,6 +107483,7 @@ func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* } return 0 } + func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:110038:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -107295,6 +107519,7 @@ func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqli } return 0 } + func Xsqlite3FixExprList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:110065:20: */ var i int32 var pItem uintptr @@ -108196,6 +108421,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11105 // Verify that no lookaside memory was used by schema tables } + func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:111108:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { @@ -115364,6 +115590,7 @@ func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } } } + func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:117525:13: */ var z1 uintptr var z2 uintptr @@ -116430,6 +116657,7 @@ func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } } } + func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118598:13: */ var p uintptr var type1 int32 @@ -116452,6 +116680,7 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } } + func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118623:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -116465,6 +116694,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118623:13: */ } } } + func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118636:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -116472,6 +116702,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118636:13: */ Xsqlite3_result_double(tls, context, ((*SumCtx)(unsafe.Pointer(p)).FrSum / float64((*SumCtx)(unsafe.Pointer(p)).Fcnt))) } } + func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118643:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -116506,6 +116737,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // expressed as a 32-bit integer. } + func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118681:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -116516,6 +116748,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118681:13: */ return int64(0) }()) } + func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:118687:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) @@ -116563,6 +116796,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3VdbeMemCopy(tls, pBest, pArg) } } + func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:118743:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) @@ -116575,9 +116809,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } } + func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:118754:13: */ minMaxValueFinalize(tls, context, 1) } + func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118760:13: */ minMaxValueFinalize(tls, context, 0) } @@ -116618,6 +116854,7 @@ func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } } + func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118800:13: */ var n int32 var pAccum uintptr @@ -116646,6 +116883,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } } + func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118831:13: */ var pAccum uintptr pAccum = Xsqlite3_aggregate_context(tls, context, 0) @@ -116660,6 +116898,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118831:1 } } } + func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:118846:13: */ var pAccum uintptr pAccum = Xsqlite3_aggregate_context(tls, context, 0) @@ -119393,6 +119632,7 @@ var autoIncEnd = [5]VdbeOpList{ Fp2: int8(0), Fp3: int8(0)}, } /* sqlite3.c:121025:29 */ + func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:121054:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) @@ -122764,6 +123004,7 @@ func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintpt var azEndings = [1]uintptr{ ts + 18256, /* "dylib" */ } /* sqlite3.c:124759:21 */ + func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:124882:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -123782,6 +124023,7 @@ var aPragmaName = [67]PragmaName{ FiArg: /* iArg: */ (uint64(0x00000001 | 0x08000000))}, } /* sqlite3.c:125260:25 */ + // Number of pragmas: 67 on by default, 77 total. //************* End of pragma.h ********************************************* @@ -128759,6 +129001,7 @@ end_prepare: Xsqlite3ParserReset(tls, bp+16 /* &sParse */) return rc } + func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129056:12: */ var rc int32 var cnt int32 = 0 @@ -128835,6 +129078,7 @@ func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppS // VERIFY: F13021 return rc } + func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129152:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works @@ -128847,6 +129091,7 @@ func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, return rc } + func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129170:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from @@ -128918,12 +129163,14 @@ func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, p // VERIFY: F13021 return rc } + func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129268:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0x80), ppStmt, pzTail) // VERIFY: F13021 return rc } + func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129280:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, @@ -132521,6 +132768,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite } return pExpr } + func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:132858:13: */ var i int32 if pList == uintptr(0) { @@ -132530,6 +132778,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: (*ExprList_item)(unsafe.Pointer((pList + 8 /* &.a */) + uintptr(i)*32)).FpExpr = substExpr(tls, pSubst, (*ExprList_item)(unsafe.Pointer((pList+8 /* &.a */)+uintptr(i)*32)).FpExpr) } } + func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:132868:13: */ var pSrc uintptr var pItem uintptr @@ -132588,6 +132837,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int *(*Bitmask)(unsafe.Pointer(pItem + 88 /* &.colUsed */)) |= (Xsqlite3ExprColUsed(tls, pExpr)) return 0 } + func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:132912:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -139800,6 +140050,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) return rc } + func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:139232:12: */ var z uintptr var ap Va_list @@ -144784,6 +145035,7 @@ __3: } return 0 } + func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:144979:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing @@ -145326,12 +145578,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas } return mask } + func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:145532:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } + func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:145535:24: */ var i int32 var mask Bitmask = uint64(0) @@ -151302,6 +151556,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151322:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { @@ -151333,6 +151588,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151354:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -151418,6 +151674,7 @@ error_out: Xsqlite3_result_error(tls, pCtx, ts+24969 /* "second argument ..." */, -1) } + func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151416:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -151440,6 +151697,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151444:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) @@ -151466,6 +151724,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = nArg _ = apArg } + func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151478:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -151488,6 +151747,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr (*CallCount)(unsafe.Pointer(p)).FnTotal++ } } + func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151506:13: */ var p uintptr _ = nArg @@ -151495,6 +151755,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) (*CallCount)(unsafe.Pointer(p)).FnStep++ } + func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151517:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -151522,6 +151783,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnTotal++ } } + func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151551:13: */ var p uintptr _ = nArg @@ -151529,6 +151791,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) (*CallCount)(unsafe.Pointer(p)).FnStep++ } + func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151562:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -151564,6 +151827,7 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } + func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151607:13: */ var p uintptr _ = nArg @@ -151571,6 +151835,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } + func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151618:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -151614,6 +151879,7 @@ func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) } } } + func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151671:13: */ var p uintptr _ = nArg @@ -151627,6 +151893,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } } + func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151688:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -151634,6 +151901,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151688:13: Xsqlite3_result_value(tls, pCtx, (*LastValueCtx)(unsafe.Pointer(p)).FpVal) } } + func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151695:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -151674,7 +151942,9 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 _ = n //NO_TEST _ = a //NO_TEST //NO_TEST -} //NO_TEST +} + +//NO_TEST func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:151744:13: */ _ = p /*no-op*/ } @@ -152083,6 +152353,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return 0 } + func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:151994:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect @@ -156410,7 +156681,8 @@ var yyRuleInfoNRhs = [385]int8{ int8(-4), // (382) anylist ::= anylist LP anylist RP int8(-2), // (383) anylist ::= anylist ANY int8(0), // (384) with ::= -} /* sqlite3.c:157063:26 */ // Forward Declaration +} /* sqlite3.c:157063:26 */ +// Forward Declaration // Perform a reduce action and the shift that must immediately // follow the reduce. @@ -158674,6 +158946,7 @@ var aKWCode = [145]uint8{ uint8(132), uint8(142), uint8(78), uint8(79), uint8(161), uint8(61), uint8(34), uint8(64), uint8(133), uint8(120), } /* sqlite3.c:159536:28 */ + // Hash table decoded: // 0: INSERT // 1: IS @@ -158980,6 +159253,7 @@ func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sq } return n } + func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:159871:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -158988,6 +159262,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c keywordCode(tls, z, n, bp /* &id */) return *(*int32)(unsafe.Pointer(bp /* id */)) } + func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:159877:16: */ if (i < 0) || (i >= 145) { return 1 @@ -158996,9 +159271,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt *(*int32)(unsafe.Pointer(pnName)) = int32(aKWLen[i]) return 0 } + func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:159883:16: */ return 145 } + func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:159884:16: */ return (libc.Bool32(59 != Xsqlite3KeywordCode(tls, zName, nName))) } @@ -159094,6 +159371,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:159987: } return 161 } + func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:159995:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -159107,6 +159385,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq } return 59 } + func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:160002:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -160911,6 +161190,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:162252:16: */ return sqlite3Close(tls, db, 0) } + func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:162253:16: */ return sqlite3Close(tls, db, 1) } @@ -161683,10 +161963,12 @@ func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int return createFunctionApi(tls, db, zFunc, nArg, enc, p, xSFunc, xStep, xFinal, uintptr(0), uintptr(0), uintptr(0)) } + func Xsqlite3_create_function_v2(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xDestroy uintptr) int32 { /* sqlite3.c:162955:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, xSFunc, xStep, xFinal, uintptr(0), uintptr(0), xDestroy) } + func Xsqlite3_create_window_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:162969:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) @@ -162108,6 +162390,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163559:16: } return ((*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask) } + func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163568:16: */ if (db != 0) && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { return Xsqlite3MisuseError(tls, 163570) @@ -162117,6 +162400,7 @@ func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1 } return (*Sqlite3)(unsafe.Pointer(db)).FerrCode } + func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163577:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno @@ -162999,6 +163283,7 @@ func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sq return openDatabase(tls, zFilename, ppDb, (uint32(0x00000002 | 0x00000004)), uintptr(0)) } + func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:164393:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } @@ -163122,14 +163407,17 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) libc.VaList(bp, zType, lineno, (uintptr(20)+Xsqlite3_sourceid(tls)))) return iErr } + func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164593:20: */ return Xsqlite3ReportError(tls, 11, lineno, ts+28917 /* "database corrupt..." */) } + func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164597:20: */ return Xsqlite3ReportError(tls, 21, lineno, ts+28937 /* "misuse" */) } + func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164601:20: */ return Xsqlite3ReportError(tls, 14, lineno, ts+28944 /* "cannot open file" */) @@ -163543,7 +163831,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit { var x int32 = 0 - rc = x + rc = libc.AtomicLoadInt32(&x) break } @@ -163902,6 +164190,7 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165356:23: */ return databaseName(tls, zFilename) } + func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165359:23: */ zFilename = databaseName(tls, zFilename) zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1)) @@ -163911,6 +164200,7 @@ func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sq } return (zFilename + uintptr(1)) } + func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165368:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1)) @@ -167036,6 +167326,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq jsonAppendValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) } } + func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:187331:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) @@ -167065,9 +167356,11 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: } Xsqlite3_result_subtype(tls, ctx, uint32(74)) } + func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187353:13: */ jsonArrayCompute(tls, ctx, 0) } + func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187356:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -167138,6 +167431,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s jsonAppendValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) } } + func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:187439:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) @@ -167166,9 +167460,11 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c } Xsqlite3_result_subtype(tls, ctx, uint32(74)) } + func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187460:13: */ jsonObjectCompute(tls, ctx, 0) } + func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187463:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -168106,10 +168402,12 @@ type RtreeValue = float32 /* sqlite3.c:188256:17 */ func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:188535:12: */ return ((int32(*(*U8)(unsafe.Pointer(p + uintptr(0)))) << 8) + int32(*(*U8)(unsafe.Pointer(p + uintptr(1))))) } + func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:188538:13: */ // p is always 4-byte aligned (*(*U32)(unsafe.Pointer(pCoord /* .Fu */))) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(p))) } + func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:188555:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -168127,6 +168425,7 @@ func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:188587:13: */ *(*U8)(unsafe.Pointer(p + uintptr(0))) = (U8((i >> 8) & 0xFF)) *(*U8)(unsafe.Pointer(p + uintptr(1))) = (U8((i >> 0) & 0xFF)) } + func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:188591:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -168139,6 +168438,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 libc.X__builtin___memcpy_chk(tls, p, bp /* &i */, uint64(4), libc.X__builtin_object_size(tls, p, 0)) return 4 } + func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:188614:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170778,6 +171078,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:191175:1 } return f } + func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:191183:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) @@ -173070,6 +173371,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } } + func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:193173:13: */ var p uintptr var pBBox uintptr @@ -176432,6 +176734,7 @@ __15: goto __14 goto __16 __16: + } // This is a helper function for rbuObjIterCacheTableInfo(). It populates @@ -178871,7 +179174,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:199480:16: (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 104 /* &.xShmMap */))))(tls, pDb, 0, (32 * 1024), 0, bp+16 /* &ptr */) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - *(*U32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 16 /* ptr */))) + uintptr(24)*4)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame + *(*U32)(unsafe.Pointer((libc.AtomicLoadPUintptr(bp + 16 /* ptr */)) + uintptr(24)*4)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame } } @@ -180022,13 +180325,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } if rc == 0 { - *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*8)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*8)) } else { - *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = uintptr(0) } } else { - rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 104 /* &.xShmMap */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 104 /* &.xShmMap */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) } return rc @@ -182977,7 +183280,8 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:210261:26 */ // Forward Declaration +} /* sqlite3.c:210261:26 */ +// Forward Declaration // Perform a reduce action and the shift that must immediately // follow the reduce. @@ -185661,6 +185965,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:213114:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } + func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:213115:13: */ Xsqlite3_free(tls, p) } @@ -188313,6 +188618,7 @@ func fts5ExprFunction(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr, bT func fts5ExprFunctionHr(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:215460:13: */ fts5ExprFunction(tls, pCtx, nArg, apVal, 0) } + func fts5ExprFunctionTcl(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:215467:13: */ fts5ExprFunction(tls, pCtx, nArg, apVal, 1) } @@ -190408,6 +190714,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FbEof } + func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:217680:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -190538,6 +190845,7 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FbEof } + func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:217803:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } @@ -190598,6 +190906,7 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:217867:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FiRowid } + func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:217870:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FiLeafPgno } @@ -195933,6 +196242,7 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:223403:12: */ return fts5InitVtab(tls, 0, db, pAux, argc, argv, ppVtab, pzErr) } + func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:223413:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -202782,6 +203092,7 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:229648:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } + func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:229658:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } diff --git a/lib/sqlite_linux_386.go b/lib/sqlite_linux_386.go index cbccb72..c34c5a4 100644 --- a/lib/sqlite_linux_386.go +++ b/lib/sqlite_linux_386.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -pkgname sqlite3 -o lib/sqlite_linux_386.go -trace-translation-units testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -pkgname sqlite3 -o lib/sqlite_linux_386.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -12,6 +13,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer const ( @@ -10879,6 +10881,7 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:21407:21: *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) + 40 /* &.mxValue */) + uintptr(op)*4)) = *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) /* &.nowValue */) + uintptr(op)*4)) } } + func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:21418:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) /* &.nowValue */) + uintptr(op)*4)) -= (Sqlite3StatValueType(N)) @@ -10919,6 +10922,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex // Prevent warning when SQLITE_THREADSAFE=0 return 0 } + func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:21477:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -13009,6 +13013,7 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:23048:21: */ (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = uintptr(0) } } + func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:23054:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13020,6 +13025,7 @@ func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I return (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 8 /* &.xRead */))))(tls, id, pBuf, amt, offset) } + func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:23058:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13031,9 +13037,11 @@ func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset return (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 12 /* &.xWrite */))))(tls, id, pBuf, amt, offset) } + func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:23062:20: */ return (*(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 16 /* &.xTruncate */))))(tls, id, size) } + func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:23065:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13048,6 +13056,7 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c } return 0 } + func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:23069:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13059,6 +13068,7 @@ func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sql return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 24 /* &.xFileSize */))))(tls, id, pSize) } + func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:23073:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13070,9 +13080,11 @@ func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 28 /* &.xLock */))))(tls, id, lockType) } + func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:23077:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 32 /* &.xUnlock */))))(tls, id, lockType) } + func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:23080:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13118,6 +13130,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in } return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 40 /* &.xFileControl */))))(tls, id, op, pArg) } + func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:23114:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 40 /* &.xFileControl */))))(tls, id, op, pArg) @@ -13133,18 +13146,23 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:23118: return 4096 }() } + func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:23122:20: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 48 /* &.xDeviceCharacteristics */))))(tls, id) } + func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:23126:20: */ return (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 56 /* &.xShmLock */))))(tls, id, offset, n, flags) } + func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:23129:21: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 60 /* &.xShmBarrier */))))(tls, id) } + func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:23132:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 64 /* &.xShmUnmap */))))(tls, id, deleteFlag) } + func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:23135:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13154,7 +13172,7 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten Xsqlite3_free(tls, pTstAlloc) } - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 52 /* &.xShmMap */))))(tls, id, iPage, pgsz, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 52 /* &.xShmMap */))))(tls, id, iPage, pgsz, bExtend, libc.AtomicLoadUintptr(&pp)) } // The real implementation of xFetch and xUnfetch @@ -13169,6 +13187,7 @@ func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr return (*(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 68 /* &.xFetch */))))(tls, id, iOff, iAmt, pp) } + func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:23153:20: */ return (*(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 72 /* &.xUnfetch */))))(tls, id, iOff, p) } @@ -13193,6 +13212,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f return rc } + func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:23188:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13204,6 +13224,7 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pVfs + 28 /* &.xDelete */))))(tls, pVfs, zPath, dirSync) } + func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:23193:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13215,6 +13236,7 @@ func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, p return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 32 /* &.xAccess */))))(tls, pVfs, zPath, flags, pResOut) } + func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:23202:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13227,18 +13249,23 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut *(*int8)(unsafe.Pointer(zPathOut + uintptr(0))) = int8(0) return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 36 /* &.xFullPathname */))))(tls, pVfs, zPath, nPathOut, zPathOut) } + func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:23213:21: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 40 /* &.xDlOpen */))))(tls, pVfs, zPath) } + func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:23216:21: */ (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pVfs + 44 /* &.xDlError */))))(tls, pVfs, nByte, zBufOut) } + func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:23219:21: */ return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 48 /* &.xDlSym */))))(tls, pVfs, pHdle, zSym) } + func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:23222:21: */ (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pVfs + 52 /* &.xDlClose */))))(tls, pVfs, pHandle) } + func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:23226:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.Xmemset(tls, zBufOut, 0, uint32(nByte)) @@ -13253,15 +13280,18 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint return int32(0) } + func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:23237:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pVfs + 60 /* &.xSleep */))))(tls, pVfs, nMicro) } + func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:23240:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 68 /* &.xGetLastError */))))(tls, pVfs, 0, uintptr(0)) } return 0 } + func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:23243:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13299,6 +13329,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin } return rc } + func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:23283:21: */ Xsqlite3OsClose(tls, pFile) @@ -13490,6 +13521,7 @@ func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23474:21: */ (*(*func(*libc.TLS))(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Hooks)) /* &.xBenignBegin */))))(tls) } } + func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23480:21: */ if sqlite3Hooks.FxBenignEnd != 0 { @@ -13965,25 +13997,31 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:25985:17: */ func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:26048:12: */ return 0 } + func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:26049:12: */ return 0 } + func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26050:22: */ _ = id return uintptr(8) } + func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:26054:13: */ _ = p return } + func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:26055:13: */ _ = p return } + func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:26056:12: */ _ = p return 0 } + func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:26060:13: */ _ = p return @@ -14141,6 +14179,7 @@ func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } return priorLimit } + func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:27437:17: */ if n < 0 { n = 0 @@ -14330,6 +14369,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:27620:17: */ } return Xsqlite3Malloc(tls, uint64(n)) } + func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:27626:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) @@ -14348,12 +14388,14 @@ func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27648:20: return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 12 /* &.xSize */))))(tls, p) } + func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:27652:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return 128 } + func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:27659:20: */ if db != 0 { @@ -14370,6 +14412,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit } return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 12 /* &.xSize */))))(tls, p) } + func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:27688:27: */ if p != 0 { @@ -14429,6 +14472,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:27725 Xsqlite3_free(tls, p) } + func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:27762:21: */ if p != 0 { @@ -14496,6 +14540,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 } // IMP: R-26507-47431 return Xsqlite3Realloc(tls, pOld, uint64(n)) } + func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:27831:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) @@ -14566,6 +14611,7 @@ func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3. return p } + func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:27905:21: */ var pBuf uintptr @@ -14623,6 +14669,7 @@ func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* } return dbReallocFinish(tls, db, p, n) } + func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:27977:29: */ var pNew uintptr = uintptr(0) @@ -14674,6 +14721,7 @@ func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3 } return zNew } + func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:28036:21: */ var zNew uintptr @@ -15035,12 +15083,14 @@ func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:28292:22: } return Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*4))) } + func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:28296:15: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return 0.0 } return Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*4))) } + func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:28300:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) @@ -16528,7 +16578,8 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 815 /* "thstndrd" */)) /* sqlite3.c:28611:29 */ // End of function +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 815 /* "thstndrd" */)) /* sqlite3.c:28611:29 */ +// End of function // Enlarge the memory allocation on a StrAccum object so that it is // able to accept at least N more bytes of text. @@ -16647,6 +16698,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:2915 (*StrAccum)(unsafe.Pointer(p)).FzText = zText return zText } + func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29169:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*int8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = int8(0) @@ -16852,6 +16904,7 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a *(*int8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp /* &acc */)).FnChar))) = int8(0) return zBuf } + func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:29369:17: */ var z uintptr var ap Va_list @@ -17101,12 +17154,14 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:30 // The sqlite3_test_control() interface calls these routines to // control the PRNG. var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:30353:42: */ + func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:30354:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uintptr(unsafe.Pointer(&sqlite3Prng)), uint32(unsafe.Sizeof(sqlite3Prng))) } + func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:30361:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), @@ -18238,6 +18293,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:31417:21: */ } *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) } + func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:31439:21: */ *(*U32)(unsafe.Pointer(p + 4 /* &.flags */)) |= (func() uint32 { @@ -18276,6 +18332,7 @@ func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* s } return Xsqlite3StrICmp(tls, zLeft, zRight) } + func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:31474:20: */ var a uintptr var b uintptr @@ -18301,6 +18358,7 @@ func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sq } return c } + func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:31493:16: */ var a uintptr var b uintptr @@ -19151,6 +19209,7 @@ __3: ; return n } + func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:32123:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p + uintptr(0))) = (uint8(v & uint64(0x7f))) @@ -19412,6 +19471,7 @@ func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:32446:20: */ libc.Xmemcpy(tls, bp /* &x */, p, uint32(4)) return libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(bp /* x */))) } + func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:32464:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -19490,6 +19550,7 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:32548 } return int32(0) } + func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:32565:20: */ var magic U32 magic = (*Sqlite3)(unsafe.Pointer(db)).Fmagic @@ -19510,9 +19571,11 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32585:20: */ return libc.X__builtin_add_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } + func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32605:20: */ return libc.X__builtin_sub_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } + func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32620:20: */ return libc.X__builtin_mul_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } @@ -21724,6 +21787,7 @@ type UnixFile = unixFile /* sqlite3.c:33567:25 */ // method was called. If xOpen() is called from a different process id, // indicating that a fork() has occurred, the PRNG will be reset. var randomnessPid Pid_t = 0 /* sqlite3.c:33628:14 */ + func local_ioerr(tls *libc.TLS) { /* sqlite3.c:33812:13: */ Xsqlite3_io_error_hit++ @@ -21923,7 +21987,8 @@ var aSyscall = [29]unix_syscall{ FzName: ts + 4618, /* "ioctl" */ FpCurrent: uintptr(0), FpDefault: uintptr(0)}, -} /* sqlite3.c:33935:3 */ // End of the overrideable system calls +} /* sqlite3.c:33935:3 */ +// End of the overrideable system calls // On some systems, calls to fchown() will trigger a message in a security // log if they come from non-root processes. So avoid calling fchown() if @@ -22098,10 +22163,12 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3 // OK: enter(pLockInfo) // ERROR: enter(pLockInfo), enter(unixBigLock) var unixBigLock uintptr = uintptr(0) /* sqlite3.c:34284:22 */ + func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:34285:13: */ // Not a recursive mutex Xsqlite3_mutex_enter(tls, unixBigLock) } + func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:34289:13: */ Xsqlite3_mutex_leave(tls, unixBigLock) @@ -22302,7 +22369,8 @@ type unixFileId = struct { // A lists of all unixInodeInfo objects. // // Must hold unixBigLock in order to read or write this variable. -var inodeList uintptr = uintptr(0) /* sqlite3.c:34734:22 */ // All unixInodeInfo objects +var inodeList uintptr = uintptr(0) /* sqlite3.c:34734:22 */ +// All unixInodeInfo objects // // This function - unixLogErrorAtLine(), is only ever called via the macro @@ -22542,7 +22610,7 @@ func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { / var reserved int32 = 0 var pFile uintptr = id - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(14) << 8)) } @@ -23117,7 +23185,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:35634:12: */ if Xsqlite3OSTrace != 0 { Xsqlite3DebugPrintf(tls, ts+5052 /* "CLOSE %-3d\n" */, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).Fh)) } - Xsqlite3_open_file_count = Xsqlite3_open_file_count + (-1) + libc.AtomicAddInt32(&Xsqlite3_open_file_count, int32(-1)) Xsqlite3_free(tls, (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused) libc.Xmemset(tls, pFile, 0, uint32(unsafe.Sizeof(UnixFile{}))) return 0 @@ -23178,11 +23246,13 @@ func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) in *(*int32)(unsafe.Pointer(pResOut)) = 0 return 0 } + func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:35725:12: */ _ = NotUsed _ = NotUsed2 return 0 } + func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:35729:12: */ _ = NotUsed _ = NotUsed2 @@ -23239,7 +23309,7 @@ func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 var reserved int32 = 0 var pFile uintptr = id - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(14) << 8)) } @@ -23470,7 +23540,7 @@ func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, for ok := true; ok; ok = (got > 0) { newOffset = libc.Xlseek(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, offset, 0) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) newOffset = int64(-1) } @@ -23560,7 +23630,7 @@ func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, for ok := true; ok; ok = ((rc < 0) && ((*(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) == 4)) { var iSeek I64 = libc.Xlseek(tls, fd, iOff, 0) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) iSeek = int64(-1) } @@ -23605,7 +23675,7 @@ func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite offset = offset + (Sqlite3_int64(wrote)) pBuf = ((pBuf) + uintptr(wrote)) } - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) wrote = -1 amt = 1 @@ -23796,7 +23866,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:37261 Xsqlite3DebugPrintf(tls, ts+5213 /* "SYNC %-3d\n" */, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).Fh)) } rc = full_fsync(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, isFullsync, isDataOnly) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) rc = 1 } @@ -23833,7 +23903,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:373 var pFile uintptr = id var rc int32 - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(6) << 8)) } @@ -23873,7 +23943,7 @@ func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c // var buf stat at bp, 96 rc = (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(5)*12 + 4 /* &.pCurrent */))))(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, bp /* &buf */) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) rc = 1 } @@ -24669,10 +24739,10 @@ shmpage_out: if !(int32((*UnixShmNode)(unsafe.Pointer(pShmNode)).FnRegion) > iRegion) { goto __25 } - *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(pShmNode)).FapRegion + uintptr(iRegion)*4)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(pShmNode)).FapRegion + uintptr(iRegion)*4)) goto __26 __25: - *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = uintptr(0) __26: ; if !(((*UnixShmNode)(unsafe.Pointer(pShmNode)).FisReadonly != 0) && (rc == 0)) { @@ -25253,7 +25323,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle - Xsqlite3_open_file_count = Xsqlite3_open_file_count + (+1) + libc.AtomicAddInt32(&Xsqlite3_open_file_count, int32(+1)) verifyDbFile(tls, pNew) } return rc @@ -25314,7 +25384,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3 // using the io-error infrastructure to test that SQLite handles this // function failing. *(*int8)(unsafe.Pointer(zBuf + uintptr(0))) = int8(0) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return 10 } @@ -25823,7 +25893,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in var rc int32 = 0 _ = NotUsed - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(10) << 8)) } @@ -25866,7 +25936,7 @@ func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pRes defer tls.Free(96) _ = NotUsed - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(13) << 8)) } @@ -25931,7 +26001,7 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO // using the io-error infrastructure to test that SQLite handles this // function failing. This function could fail if, for example, the // current working directory has been unlinked. - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return 1 } @@ -26061,6 +26131,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { } unixLeaveMutex(tls) } + func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:40000:13: */ // GCC with -pedantic-errors says that C90 does not allow a void* to be // cast into a pointer to a function. And yet the library dlsym() routine @@ -26084,6 +26155,7 @@ func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr }{libc.Xdlsym})) return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(&x)))(tls, p, zSym) } + func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:40023:13: */ _ = NotUsed libc.Xdlclose(tls, pHandle) @@ -26124,7 +26196,8 @@ func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sq // The following variable, if set to a non-zero value, is interpreted as // the number of seconds since 1970 and is used to set the result of // sqlite3OsCurrentTime() during testing. -var Xsqlite3_current_time int32 = 0 /* sqlite3.c:40111:16 */ // Fake system time in seconds since 1970. +var Xsqlite3_current_time int32 = 0 /* sqlite3.c:40111:16 */ +// Fake system time in seconds since 1970. // Find the current time (in Universal Coordinated Time). Write into *piNow // the current time and date as a Julian Day number times 86_400_000. In @@ -26833,6 +26906,7 @@ func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c: func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:48283:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 68 /* &.xGetLastError */))))(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } + func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:48286:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 72 /* &.xCurrentTimeInt64 */))))(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) } @@ -27080,6 +27154,7 @@ func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlit } return int32(0) } + func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:48618:20: */ return (libc.Bool32((p != uintptr(0)) && (Xsqlite3BitvecTestNotNull(tls, p, i) != 0))) } @@ -27587,6 +27662,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:49138:20: */ } return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 100 /* &.pcache2 */ + 8 /* &.xInit */))))(tls, Xsqlite3Config.Fpcache2.FpArg) } + func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:49148:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. @@ -29028,6 +29104,7 @@ func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32 } return uintptr(0) } + func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:50793:15: */ var pCache uintptr = p var pPage uintptr @@ -29038,6 +29115,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) return pPage } + func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:50808:28: */ var pCache uintptr = p @@ -32509,7 +32587,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54657:12: */ libc.Xmemcpy(tls, (pPager + 104 /* &.dbFileVers */), dbFileVers, uint32(unsafe.Sizeof([16]int8{}))) } } - Xsqlite3_pager_readdb_count++ + atomic.AddInt32(&Xsqlite3_pager_readdb_count, 1) (*Pager)(unsafe.Pointer(pPager)).FnRead++ return rc @@ -33226,12 +33304,14 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno } var saved_cnt int32 /* sqlite3.c:55493:12: */ + func Xdisable_simulated_io_errors(tls *libc.TLS) { /* sqlite3.c:55494:6: */ - saved_cnt = Xsqlite3_io_error_pending - Xsqlite3_io_error_pending = -1 + saved_cnt = libc.AtomicLoadInt32(&Xsqlite3_io_error_pending) + libc.AtomicStoreInt32(&Xsqlite3_io_error_pending, int32(-1)) } + func Xenable_simulated_io_errors(tls *libc.TLS) { /* sqlite3.c:55498:6: */ - Xsqlite3_io_error_pending = saved_cnt + libc.AtomicStoreInt32(&Xsqlite3_io_error_pending, int32(saved_cnt)) } // Read the first N bytes from the beginning of the file into memory @@ -33770,7 +33850,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // Update any backup objects copying the contents of this pager. Xsqlite3BackupUpdate(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup, pgno, (*PgHdr)(unsafe.Pointer(pList)).FpData) - Xsqlite3_pager_writedb_count++ + atomic.AddInt32(&Xsqlite3_pager_writedb_count, 1) } else { } @@ -33841,6 +33921,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56159:12: * } return rc } + func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56195:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) @@ -35148,11 +35229,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57391: // Do not use this routine to release the last reference to page1 } + func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57403:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } + func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57406:21: */ var pPager uintptr @@ -35359,7 +35442,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite return rc } - Xsqlite3_pager_writej_count++ + atomic.AddInt32(&Xsqlite3_pager_writej_count, 1) *(*I64)(unsafe.Pointer(pPager + 72 /* &.journalOff */)) += (I64(8 + (*Pager)(unsafe.Pointer(pPager)).FpageSize)) (*Pager)(unsafe.Pointer(pPager)).FnRec++ @@ -36140,6 +36223,7 @@ func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { return rc } + func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:58562:20: */ if (nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint) && ((*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0) { @@ -37498,6 +37582,7 @@ func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintpt return rc } + func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:60010:12: */ if ((*Wal)(unsafe.Pointer(pWal)).FnWiData <= iPage) || ((libc.AssignPtrUintptr(ppPage, *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*4)))) == uintptr(0)) { return walIndexPageRealloc(tls, pWal, iPage, ppPage) @@ -37676,6 +37761,7 @@ func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite return rc } + func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:60272:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return @@ -37684,6 +37770,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: (1 | 4)) } + func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:60278:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { @@ -37694,6 +37781,7 @@ func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 return rc } + func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:60288:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return @@ -37710,6 +37798,7 @@ func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:60301:12: */ return (int32((iPage * U32(383)) & (U32((4096 * 2) - 1)))) } + func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:60306:12: */ return ((iPriorHash + 1) & ((4096 * 2) - 1)) } @@ -41660,11 +41749,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64358:29: */ } (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } + func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64372:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } + func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64375:29: */ var i int32 var p uintptr @@ -41676,6 +41767,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64375:29: */ } } } + func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64384:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) @@ -41690,6 +41782,7 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64384:21: * func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:64470:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } + func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:64474:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -41917,7 +42010,9 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: (*BtLock)(unsafe.Pointer(pLock)).FeLock = U8(1) } } -} // Forward reference +} + +// Forward reference // This routine is used inside of assert() only **** // @@ -42527,6 +42622,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn (*CellInfo)(unsafe.Pointer(pInfo)).FpPayload = uintptr(0) return } + func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:65649:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -42591,6 +42687,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt btreeParseCellAdjustSizeForOverflow(tls, pPage, pCell, pInfo) } } + func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:65717:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -42621,6 +42718,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u btreeParseCellAdjustSizeForOverflow(tls, pPage, pCell, pInfo) } } + func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:65754:13: */ (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((pPage + 80 /* &.xParseCell */))))(tls, pPage, ((*MemPage)(unsafe.Pointer((pPage))).FaData + uintptr((int32((*MemPage)(unsafe.Pointer((pPage))).FmaskPage) & int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(((*MemPage)(unsafe.Pointer((pPage))).FaCellIdx + uintptr((2 * (iCell))))))))))), pInfo) } @@ -42675,6 +42773,7 @@ func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c return U16(nSize) } + func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:65822:12: */ var pIter uintptr = (pCell + uintptr(4)) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -43527,6 +43626,7 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:66624:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } + func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:66627:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) @@ -43612,11 +43712,13 @@ func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66704:13: * Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } + func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66713:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } + func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66716:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -45926,6 +46028,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(1) return 0 } + func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:68920:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -45933,6 +46036,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK Xsqlite3BtreeLeave(tls, p) return rc } + func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:68933:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -46027,6 +46131,7 @@ func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:69070:21 *(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) |= U8((0x40)) } + func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:69074:21: */ *(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) &= libc.Uint8FromInt32((^libc.Int32(0x40))) @@ -46371,6 +46476,7 @@ func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf } return accessPayload(tls, pCur, offset, amt, pBuf, 0) } + func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:69495:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == 0 { @@ -47233,6 +47339,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70198:28: */ } return int32(0) } + func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:70268:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -47326,6 +47433,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70308:28: * } return rc } + func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:70357:20: */ _ = flags // Used in COMDB2 but not native SQLite @@ -48072,6 +48180,7 @@ __18: releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */))) return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } + func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:70851:13: */ if (*(*int32)(unsafe.Pointer(pRC))) == 0 { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) @@ -48654,6 +48763,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:71397 *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer(((*CellArray)(unsafe.Pointer(p)).FpRef + 76 /* &.xCellSize */))))(tls, (*CellArray)(unsafe.Pointer(p)).FpRef, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FapCell + uintptr(N)*4))) return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } + func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:71403:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { @@ -51467,6 +51577,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags *(*Pgno)(unsafe.Pointer(piTable)) = *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)) return 0 } + func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:73729:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -51721,6 +51832,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 } return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } + func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:73941:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -52048,6 +52160,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:74299:1 i = j } } + func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:74309:12: */ var j U32 var i U32 @@ -53518,6 +53631,7 @@ func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqli } } } + func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:75746:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) @@ -54015,6 +54129,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:76417:28: */ Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp /* &value */, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) return *(*I64)(unsafe.Pointer(bp /* value */)) } + func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:76422:20: */ var flags int32 @@ -54045,6 +54160,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:76445:31: Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp /* &val */, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) return *(*float64)(unsafe.Pointer(bp /* val */)) } + func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:76451:23: */ if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & 0x0008) != 0 { @@ -54243,6 +54359,7 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:76652:21 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(0x0001) } } + func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:76659:21: */ Xsqlite3VdbeMemSetNull(tls, p) } @@ -54360,6 +54477,7 @@ func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sq Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } + func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:76833:21: */ if (int32((*Mem)(unsafe.Pointer((pTo))).Fflags) & (0x2000 | 0x0400)) != 0 { @@ -54546,6 +54664,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, } return rc } + func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:77029:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -55347,6 +55466,7 @@ func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:77717: } return 0 } + func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:77720:20: */ var p uintptr = pVal @@ -55511,6 +55631,7 @@ func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) i return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) } + func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:77972:20: */ var i int32 var pOp uintptr @@ -55532,12 +55653,15 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, (*VdbeOp)(unsafe.Pointer(pOp)).FzComment = uintptr(0) return i } + func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:78009:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } + func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:78012:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, 0, 0) } + func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:78015:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } @@ -55790,6 +55914,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(p)).FaLabel + uintptr(j)*4)) = (*Vdbe)(unsafe.Pointer(v)).FnOp } } + func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:78302:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -56058,15 +56183,19 @@ __3: func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:78782:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } + func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78785:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } + func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78788:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } + func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78791:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } + func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:78794:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { @@ -56115,10 +56244,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:78849:29: */ } Xsqlite3DbFreeNN(tls, db, p) } + func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:78853:29: */ freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) Xsqlite3DbFreeNN(tls, db, p) } + func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:78857:13: */ switch p4type { @@ -56263,6 +56394,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-7) } } + func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:79034:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -56348,6 +56480,7 @@ func vdbeVComment(tls *libc.TLS, p uintptr, zFormat uintptr, ap Va_list) { /* sq (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(((*Vdbe)(unsafe.Pointer(p)).FnOp-1))*24)).FzComment = Xsqlite3VMPrintf(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, zFormat, ap) } } + func Xsqlite3VdbeComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79123:21: */ var ap Va_list _ = ap @@ -56357,6 +56490,7 @@ func Xsqlite3VdbeComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) _ = ap } } + func Xsqlite3VdbeNoopComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79131:21: */ var ap Va_list _ = ap @@ -56742,6 +56876,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:79548:29: */ } } } + func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:79562:21: */ if ((*Vdbe)(unsafe.Pointer(p)).FlockMask) == YDbMask(0) { return @@ -57667,6 +57802,7 @@ func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3. } return rc } + func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:80715:20: */ if ((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0) && ((*Vdbe)(unsafe.Pointer(p)).FiStatement != 0) { return vdbeCloseStatement(tls, p, eOp) @@ -58098,7 +58234,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:812 if *(*int32)(unsafe.Pointer(bp /* res */)) != 0 { return Xsqlite3CorruptError(tls, 81251) } - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(0) return 0 @@ -58232,6 +58368,7 @@ func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3. } return U32(0) } + func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:81468:19: */ return sqlite3SmallTypeSizes[serial_type] @@ -58359,6 +58496,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { } return U32(8) } + func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { /* sqlite3.c:81629:20: */ switch serial_type { case U32(10): @@ -58462,6 +58600,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin } var aFlag = [2]U16{(U16(0x0010 | 0x1000)), (U16(0x0002 | 0x1000))} /* sqlite3.c:81711:24 */ + // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if // the first argument is a pointer to KeyInfo structure pKeyInfo. @@ -59057,6 +59196,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } + func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:82413:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -59659,6 +59799,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83026:12: */ } return int32(0) } + func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83034:12: */ if p == uintptr(0) { Xsqlite3_log(tls, 21, ts+7010 /* "API called with ..." */, 0) @@ -59796,21 +59937,27 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:831 } return uintptr(0) } + func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83172:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(1)) } + func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83175:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(2)) } + func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:83178:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } + func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83181:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } + func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:83184:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } + func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:83187:25: */ var pMem uintptr = pVal return func() uint32 { @@ -59820,6 +59967,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 return uint32(0) }() } + func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:83191:17: */ var p uintptr = pVal if ((((int32((*Mem)(unsafe.Pointer(p)).Fflags) & ((0xc1bf | 0x0200) | 0x8000)) == ((0x0001 | 0x0200) | 0x8000)) && @@ -59832,15 +59980,19 @@ func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr } return uintptr(0) } + func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83204:32: */ return Xsqlite3ValueText(tls, pVal, uint8(1)) } + func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83208:23: */ return Xsqlite3ValueText(tls, pVal, uint8(2)) } + func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83211:23: */ return Xsqlite3ValueText(tls, pVal, uint8(3)) } + func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83214:23: */ return Xsqlite3ValueText(tls, pVal, uint8(2)) } @@ -59976,6 +60128,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 Xsqlite3_result_error_toobig(tls, pCtx) } } + func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:83369:12: */ if xDel == uintptr(0) { @@ -59990,10 +60143,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) } return 18 } + func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83385:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(0), xDel) } + func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:83395:17: */ if n > uint64(0x7fffffff) { @@ -60002,32 +60157,39 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui setResultStrOrError(tls, pCtx, z, int32(n), uint8(0), xDel) } } + func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:83409:17: */ Xsqlite3VdbeMemSetDouble(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, rVal) } + func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:83413:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = 1 Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, n, uint8(1), libc.UintptrFromInt32(-1)) } + func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:83419:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = 1 Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, n, uint8(2), libc.UintptrFromInt32(-1)) } + func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:83425:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } + func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:83429:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } + func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:83433:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) } + func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:83437:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut @@ -60035,16 +60197,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(0x0001) Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } + func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:83449:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = (U8(eSubtype & uint32(0xff))) *(*U16)(unsafe.Pointer(pOut + 8 /* &.flags */)) |= U16((0x8000)) } + func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83455:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(1), xDel) } + func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:83464:17: */ if int32(enc) == 4 { @@ -60056,26 +60221,32 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui setResultStrOrError(tls, pCtx, z, int32(n), enc, xDel) } } + func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83481:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(2), xDel) } + func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83490:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(3), xDel) } + func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83499:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(2), xDel) } + func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:83509:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } + func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:83513:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } + func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:83517:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut @@ -60085,6 +60256,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, int32(n)) return 0 } + func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:83526:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { @@ -60689,36 +60861,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84107:16: */ var val int32 = Xsqlite3_value_bytes(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84112:16: */ var val int32 = Xsqlite3_value_bytes16(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:84117:19: */ var val float64 = Xsqlite3_value_double(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84122:16: */ var val int32 = Xsqlite3_value_int(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:84127:25: */ var val Sqlite_int64 = Xsqlite3_value_int64(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84132:32: */ var val uintptr = Xsqlite3_value_text(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84137:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if (int32((*Mem)(unsafe.Pointer(pOut)).Fflags) & 0x0800) != 0 { @@ -60728,11 +60907,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s columnMallocFailure(tls, pStmt) return pOut } + func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84147:23: */ var val uintptr = Xsqlite3_value_text16(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84153:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) @@ -60788,6 +60969,7 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84224:23: */ return columnName(tls, pStmt, N, 0, 0) } + func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84228:23: */ return columnName(tls, pStmt, N, 1, 0) } @@ -60800,6 +60982,7 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84247:23: */ return columnName(tls, pStmt, N, 0, 1) } + func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84251:23: */ return columnName(tls, pStmt, N, 1, 1) } @@ -60810,6 +60993,7 @@ func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84263:23: */ return columnName(tls, pStmt, N, 0, 2) } + func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84267:23: */ return columnName(tls, pStmt, N, 1, 2) } @@ -60820,6 +61004,7 @@ func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uint func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84277:23: */ return columnName(tls, pStmt, N, 0, 3) } + func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84281:23: */ return columnName(tls, pStmt, N, 1, 3) } @@ -60830,6 +61015,7 @@ func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84291:23: */ return columnName(tls, pStmt, N, 0, 4) } + func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84295:23: */ return columnName(tls, pStmt, N, 1, 4) } @@ -60924,6 +61110,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84396:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(0)) } + func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:84408:16: */ if nData > uint64(0x7fffffff) { @@ -60933,6 +61120,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, } return int32(0) } + func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:84422:16: */ var rc int32 var p uintptr = pStmt @@ -60943,9 +61131,11 @@ func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) } return rc } + func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:84432:16: */ return Xsqlite3_bind_int64(tls, p, i, I64(iValue)) } + func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:84435:16: */ var rc int32 var p uintptr = pStmt @@ -60956,6 +61146,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in } return rc } + func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84445:16: */ var rc int32 var p uintptr = pStmt @@ -60965,6 +61156,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite } return rc } + func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:84454:16: */ var rc int32 var p uintptr = pStmt @@ -60977,9 +61169,11 @@ func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, } return rc } + func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84472:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(1)) } + func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:84481:16: */ if nData > uint64(0x7fffffff) { @@ -60992,9 +61186,11 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, } return int32(0) } + func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84498:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(2)) } + func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:84508:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { @@ -61036,6 +61232,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) } return rc } + func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:84539:16: */ var rc int32 var p uintptr = pStmt @@ -61046,6 +61243,7 @@ func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int3 } return rc } + func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:84549:16: */ var rc int32 var p uintptr = pStmt @@ -61092,6 +61290,7 @@ func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName i } return Xsqlite3VListNameToNum(tls, (*Vdbe)(unsafe.Pointer(p)).FpVList, zName, nName) } + func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:84594:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } @@ -61757,6 +61956,7 @@ var Xsqlite3_sort_count int32 = 0 /* sqlite3.c:85308:16 */ // is working correctly. This variable has no function other than to // help verify the correct operation of the library. var Xsqlite3_max_blobsize int32 = 0 /* sqlite3.c:85319:16 */ + func updateMaxBlobsize(tls *libc.TLS, p uintptr) { /* sqlite3.c:85320:13: */ if ((int32((*Mem)(unsafe.Pointer(p)).Fflags) & (0x0002 | 0x0010)) != 0) && ((*Mem)(unsafe.Pointer(p)).Fn > Xsqlite3_max_blobsize) { Xsqlite3_max_blobsize = (*Mem)(unsafe.Pointer(p)).Fn @@ -62059,6 +62259,7 @@ func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(0x0004) return pOut } + func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:85966:12: */ var pOut uintptr @@ -69104,7 +69305,7 @@ __551: ; __535: ; - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) if !(oc >= 24) { goto __552 } @@ -70350,7 +70551,7 @@ __656: __114: // jump __115: // jump Xsqlite3_sort_count++ - Xsqlite3_search_count-- + atomic.AddInt32(&Xsqlite3_search_count, -1) *(*U32)(unsafe.Pointer((p + 156 /* &.aCounter */) + uintptr(2)*4))++ // Fall through into OP_Rewind /* no break */ @@ -70483,7 +70684,7 @@ next_tail: } (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(0) *(*U32)(unsafe.Pointer((p + 156 /* &.aCounter */) + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) goto jump_to_p2_and_check_for_interrupt __661: ; @@ -77218,6 +77419,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. } return 0 } + func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:97606:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) @@ -77376,6 +77578,7 @@ func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return 0 } + func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:97725:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- @@ -77437,6 +77640,7 @@ func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli } return 0 } + func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:97794:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -79722,6 +79926,7 @@ func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, p } return pExpr } + func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:99820:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -80250,6 +80455,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:100 } } } + func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:100413:13: */ if p != 0 { var i int32 @@ -80258,6 +80464,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } } + func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:100421:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { @@ -80639,6 +80846,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 Xsqlite3DbFreeNN(tls, db, p) } } + func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:100855:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) @@ -80899,12 +81107,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) } return 0 } + func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101135:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 24 /* &.u */)) { return 0 } return 1 } + func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:101138:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -80945,6 +81155,7 @@ func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr } return uintptr(0) } + func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:101171:25: */ var pNew uintptr var pItem uintptr @@ -81057,6 +81268,7 @@ func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintp } return pNew } + func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:101263:23: */ var pNew uintptr var i int32 @@ -81085,6 +81297,7 @@ func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } return pNew } + func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:101287:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -81389,6 +81602,7 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:1 } Xsqlite3DbFreeNN(tls, db, pList) } + func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:101584:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) @@ -81593,6 +81807,7 @@ func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / } return int32(0) } + func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:101788:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -86268,6 +86483,7 @@ func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* } return i } + func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:105750:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) @@ -90772,6 +90988,7 @@ __3: ; return 0 } + func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:110000:20: */ for pSelect != 0 { if Xsqlite3FixExprList(tls, pFix, (*Select)(unsafe.Pointer(pSelect)).FpEList) != 0 { @@ -90807,6 +91024,7 @@ func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* } return 0 } + func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:110038:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -90842,6 +91060,7 @@ func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqli } return 0 } + func Xsqlite3FixExprList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:110065:20: */ var i int32 var pItem uintptr @@ -91743,6 +91962,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11105 // Verify that no lookaside memory was used by schema tables } + func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:111108:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { @@ -98911,6 +99131,7 @@ func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } } } + func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:117525:13: */ var z1 uintptr var z2 uintptr @@ -99977,6 +100198,7 @@ func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } } } + func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118598:13: */ var p uintptr var type1 int32 @@ -99999,6 +100221,7 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } } + func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118623:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -100012,6 +100235,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118623:13: */ } } } + func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118636:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -100019,6 +100243,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118636:13: */ Xsqlite3_result_double(tls, context, ((*SumCtx)(unsafe.Pointer(p)).FrSum / float64((*SumCtx)(unsafe.Pointer(p)).Fcnt))) } } + func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118643:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -100053,6 +100278,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // expressed as a 32-bit integer. } + func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118681:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -100063,6 +100289,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118681:13: */ return int64(0) }()) } + func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:118687:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) @@ -100110,6 +100337,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3VdbeMemCopy(tls, pBest, pArg) } } + func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:118743:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) @@ -100122,9 +100350,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } } + func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:118754:13: */ minMaxValueFinalize(tls, context, 1) } + func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118760:13: */ minMaxValueFinalize(tls, context, 0) } @@ -100165,6 +100395,7 @@ func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } } + func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118800:13: */ var n int32 var pAccum uintptr @@ -100193,6 +100424,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } } + func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118831:13: */ var pAccum uintptr pAccum = Xsqlite3_aggregate_context(tls, context, 0) @@ -100207,6 +100439,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118831:1 } } } + func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:118846:13: */ var pAccum uintptr pAccum = Xsqlite3_aggregate_context(tls, context, 0) @@ -102940,6 +103173,7 @@ var autoIncEnd = [5]VdbeOpList{ Fp2: int8(0), Fp3: int8(0)}, } /* sqlite3.c:121025:29 */ + func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:121054:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) @@ -106311,6 +106545,7 @@ func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintpt var azEndings = [1]uintptr{ ts + 17088, /* "so" */ } /* sqlite3.c:124759:21 */ + func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:124882:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -107316,6 +107551,7 @@ var aPragmaName = [66]PragmaName{ FiArg: /* iArg: */ (uint64(0x00000001 | 0x08000000))}, } /* sqlite3.c:125260:25 */ + // Number of pragmas: 67 on by default, 77 total. //************* End of pragma.h ********************************************* @@ -112235,6 +112471,7 @@ end_prepare: Xsqlite3ParserReset(tls, bp+16 /* &sParse */) return rc } + func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129056:12: */ var rc int32 var cnt int32 = 0 @@ -112311,6 +112548,7 @@ func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppS // VERIFY: F13021 return rc } + func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129152:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works @@ -112323,6 +112561,7 @@ func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, return rc } + func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129170:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from @@ -112394,12 +112633,14 @@ func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, p // VERIFY: F13021 return rc } + func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129268:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0x80), ppStmt, pzTail) // VERIFY: F13021 return rc } + func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129280:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, @@ -115996,6 +116237,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite } return pExpr } + func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:132858:13: */ var i int32 if pList == uintptr(0) { @@ -116005,6 +116247,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: (*ExprList_item)(unsafe.Pointer((pList + 4 /* &.a */) + uintptr(i)*20)).FpExpr = substExpr(tls, pSubst, (*ExprList_item)(unsafe.Pointer((pList+4 /* &.a */)+uintptr(i)*20)).FpExpr) } } + func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:132868:13: */ var pSrc uintptr var pItem uintptr @@ -116063,6 +116306,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int *(*Bitmask)(unsafe.Pointer(pItem + 56 /* &.colUsed */)) |= (Xsqlite3ExprColUsed(tls, pExpr)) return 0 } + func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:132912:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -123274,6 +123518,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) return rc } + func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:139232:12: */ var z uintptr var ap Va_list @@ -128250,6 +128495,7 @@ __3: } return 0 } + func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:144979:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing @@ -128792,12 +129038,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas } return mask } + func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:145532:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } + func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:145535:24: */ var i int32 var mask Bitmask = uint64(0) @@ -134769,6 +135017,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151322:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { @@ -134800,6 +135049,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151354:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -134885,6 +135135,7 @@ error_out: Xsqlite3_result_error(tls, pCtx, ts+23754 /* "second argument ..." */, -1) } + func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151416:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -134907,6 +135158,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151444:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) @@ -134933,6 +135185,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = nArg _ = apArg } + func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151478:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -134955,6 +135208,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr (*CallCount)(unsafe.Pointer(p)).FnTotal++ } } + func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151506:13: */ var p uintptr _ = nArg @@ -134962,6 +135216,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) (*CallCount)(unsafe.Pointer(p)).FnStep++ } + func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151517:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -134989,6 +135244,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnTotal++ } } + func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151551:13: */ var p uintptr _ = nArg @@ -134996,6 +135252,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) (*CallCount)(unsafe.Pointer(p)).FnStep++ } + func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151562:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -135031,6 +135288,7 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } + func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151607:13: */ var p uintptr _ = nArg @@ -135038,6 +135296,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } + func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151618:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -135080,6 +135339,7 @@ func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) } } } + func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151671:13: */ var p uintptr _ = nArg @@ -135093,6 +135353,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } } + func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151688:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -135100,6 +135361,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151688:13: Xsqlite3_result_value(tls, pCtx, (*LastValueCtx)(unsafe.Pointer(p)).FpVal) } } + func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151695:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -135140,7 +135402,9 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 _ = n //NO_TEST _ = a //NO_TEST //NO_TEST -} //NO_TEST +} + +//NO_TEST func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:151744:13: */ _ = p /*no-op*/ } @@ -135548,6 +135812,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return 0 } + func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:151994:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24 /* &.u */)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect @@ -139871,7 +140136,8 @@ var yyRuleInfoNRhs = [385]int8{ int8(-4), // (382) anylist ::= anylist LP anylist RP int8(-2), // (383) anylist ::= anylist ANY int8(0), // (384) with ::= -} /* sqlite3.c:157063:26 */ // Forward Declaration +} /* sqlite3.c:157063:26 */ +// Forward Declaration // Perform a reduce action and the shift that must immediately // follow the reduce. @@ -142135,6 +142401,7 @@ var aKWCode = [145]uint8{ uint8(132), uint8(142), uint8(78), uint8(79), uint8(161), uint8(61), uint8(34), uint8(64), uint8(133), uint8(120), } /* sqlite3.c:159536:28 */ + // Hash table decoded: // 0: INSERT // 1: IS @@ -142441,6 +142708,7 @@ func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sq } return n } + func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:159871:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -142449,6 +142717,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c keywordCode(tls, z, n, bp /* &id */) return *(*int32)(unsafe.Pointer(bp /* id */)) } + func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:159877:16: */ if (i < 0) || (i >= 145) { return 1 @@ -142457,9 +142726,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt *(*int32)(unsafe.Pointer(pnName)) = int32(aKWLen[i]) return 0 } + func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:159883:16: */ return 145 } + func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:159884:16: */ return (libc.Bool32(59 != Xsqlite3KeywordCode(tls, zName, nName))) } @@ -142555,6 +142826,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:159987: } return 161 } + func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:159995:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -142568,6 +142840,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq } return 59 } + func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:160002:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -144372,6 +144645,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:162252:16: */ return sqlite3Close(tls, db, 0) } + func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:162253:16: */ return sqlite3Close(tls, db, 1) } @@ -145144,10 +145418,12 @@ func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int return createFunctionApi(tls, db, zFunc, nArg, enc, p, xSFunc, xStep, xFinal, uintptr(0), uintptr(0), uintptr(0)) } + func Xsqlite3_create_function_v2(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xDestroy uintptr) int32 { /* sqlite3.c:162955:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, xSFunc, xStep, xFinal, uintptr(0), uintptr(0), xDestroy) } + func Xsqlite3_create_window_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:162969:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) @@ -145569,6 +145845,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163559:16: } return ((*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask) } + func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163568:16: */ if (db != 0) && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { return Xsqlite3MisuseError(tls, 163570) @@ -145578,6 +145855,7 @@ func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1 } return (*Sqlite3)(unsafe.Pointer(db)).FerrCode } + func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163577:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno @@ -146459,6 +146737,7 @@ func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sq return openDatabase(tls, zFilename, ppDb, (uint32(0x00000002 | 0x00000004)), uintptr(0)) } + func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:164393:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } @@ -146582,14 +146861,17 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) libc.VaList(bp, zType, lineno, (uintptr(20)+Xsqlite3_sourceid(tls)))) return iErr } + func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164593:20: */ return Xsqlite3ReportError(tls, 11, lineno, ts+27702 /* "database corrupt..." */) } + func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164597:20: */ return Xsqlite3ReportError(tls, 21, lineno, ts+27722 /* "misuse" */) } + func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164601:20: */ return Xsqlite3ReportError(tls, 14, lineno, ts+27729 /* "cannot open file" */) @@ -147003,7 +147285,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit { var x int32 = 0 - rc = x + rc = libc.AtomicLoadInt32(&x) break } @@ -147362,6 +147644,7 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165356:23: */ return databaseName(tls, zFilename) } + func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165359:23: */ zFilename = databaseName(tls, zFilename) zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1)) @@ -147371,6 +147654,7 @@ func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sq } return (zFilename + uintptr(1)) } + func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165368:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1)) @@ -150495,6 +150779,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq jsonAppendValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*4))) } } + func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:187331:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) @@ -150524,9 +150809,11 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: } Xsqlite3_result_subtype(tls, ctx, uint32(74)) } + func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187353:13: */ jsonArrayCompute(tls, ctx, 0) } + func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187356:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -150597,6 +150884,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s jsonAppendValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*4))) } } + func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:187439:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) @@ -150625,9 +150913,11 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c } Xsqlite3_result_subtype(tls, ctx, uint32(74)) } + func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187460:13: */ jsonObjectCompute(tls, ctx, 0) } + func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187463:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -151556,10 +151846,12 @@ type RtreeValue = float32 /* sqlite3.c:188256:17 */ func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:188535:12: */ return ((int32(*(*U8)(unsafe.Pointer(p + uintptr(0)))) << 8) + int32(*(*U8)(unsafe.Pointer(p + uintptr(1))))) } + func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:188538:13: */ // p is always 4-byte aligned (*(*U32)(unsafe.Pointer(pCoord /* .Fu */))) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(p))) } + func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:188555:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -151577,6 +151869,7 @@ func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:188587:13: */ *(*U8)(unsafe.Pointer(p + uintptr(0))) = (U8((i >> 8) & 0xFF)) *(*U8)(unsafe.Pointer(p + uintptr(1))) = (U8((i >> 0) & 0xFF)) } + func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:188591:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -151589,6 +151882,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 libc.Xmemcpy(tls, p, bp /* &i */, uint32(4)) return 4 } + func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:188614:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -154228,6 +154522,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:191175:1 } return f } + func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:191183:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) @@ -156517,6 +156812,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } } + func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:193173:13: */ var p uintptr var pBBox uintptr @@ -162304,7 +162600,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:199480:16: (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 52 /* &.xShmMap */))))(tls, pDb, 0, (32 * 1024), 0, bp+16 /* &ptr */) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - *(*U32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 16 /* ptr */))) + uintptr(24)*4)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame + *(*U32)(unsafe.Pointer((libc.AtomicLoadPUintptr(bp + 16 /* ptr */)) + uintptr(24)*4)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame } } @@ -163455,13 +163751,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } if rc == 0 { - *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*4)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*4)) } else { - *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = uintptr(0) } } else { - rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 52 /* &.xShmMap */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 52 /* &.xShmMap */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) } return rc @@ -166390,7 +166686,8 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:210261:26 */ // Forward Declaration +} /* sqlite3.c:210261:26 */ +// Forward Declaration // Perform a reduce action and the shift that must immediately // follow the reduce. @@ -169091,6 +169388,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:213114:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } + func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:213115:13: */ Xsqlite3_free(tls, p) } @@ -171742,6 +172040,7 @@ func fts5ExprFunction(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr, bT func fts5ExprFunctionHr(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:215460:13: */ fts5ExprFunction(tls, pCtx, nArg, apVal, 0) } + func fts5ExprFunctionTcl(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:215467:13: */ fts5ExprFunction(tls, pCtx, nArg, apVal, 1) } @@ -173833,6 +174132,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*28)).FbEof } + func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:217680:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -173963,6 +174263,7 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*28)).FbEof } + func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:217803:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } @@ -174023,6 +174324,7 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:217867:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*28)).FiRowid } + func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:217870:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*28)).FiLeafPgno } @@ -179354,6 +179656,7 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:223403:12: */ return fts5InitVtab(tls, 0, db, pAux, argc, argv, ppVtab, pzErr) } + func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:223413:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -186196,6 +186499,7 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:229648:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } + func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:229658:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } diff --git a/lib/sqlite_linux_amd64.go b/lib/sqlite_linux_amd64.go index 6f173e0..ccac16a 100644 --- a/lib/sqlite_linux_amd64.go +++ b/lib/sqlite_linux_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -pkgname sqlite3 -o lib/sqlite_linux_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -pkgname sqlite3 -o lib/sqlite_linux_amd64.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 @@ -22707,7 +22707,7 @@ func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { / var reserved int32 = 0 var pFile uintptr = id - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(14) << 8)) } @@ -23282,7 +23282,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:35634:12: */ if Xsqlite3OSTrace != 0 { Xsqlite3DebugPrintf(tls, ts+5052 /* "CLOSE %-3d\n" */, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).Fh)) } - Xsqlite3_open_file_count = Xsqlite3_open_file_count + (-1) + libc.AtomicAddInt32(&Xsqlite3_open_file_count, int32(-1)) Xsqlite3_free(tls, (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused) libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(UnixFile{}))) return 0 @@ -23406,7 +23406,7 @@ func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 var reserved int32 = 0 var pFile uintptr = id - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(14) << 8)) } @@ -23637,7 +23637,7 @@ func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, for ok := true; ok; ok = (got > 0) { newOffset = I64(libc.Xlseek(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, int64(offset), 0)) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) newOffset = int64(-1) } @@ -23727,7 +23727,7 @@ func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, for ok := true; ok; ok = ((rc < 0) && ((*(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) == 4)) { var iSeek I64 = I64(libc.Xlseek(tls, fd, int64(iOff), 0)) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) iSeek = int64(-1) } @@ -23772,7 +23772,7 @@ func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite offset = offset + (Sqlite3_int64(wrote)) pBuf = ((pBuf) + uintptr(wrote)) } - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) wrote = -1 amt = 1 @@ -23963,7 +23963,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:37261 Xsqlite3DebugPrintf(tls, ts+5213 /* "SYNC %-3d\n" */, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).Fh)) } rc = full_fsync(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, isFullsync, isDataOnly) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) rc = 1 } @@ -24000,7 +24000,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:373 var pFile uintptr = id var rc int32 - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(6) << 8)) } @@ -24040,7 +24040,7 @@ func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c // var buf stat at bp, 144 rc = (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(5)*24 + 8 /* &.pCurrent */))))(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, bp /* &buf */) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) rc = 1 } @@ -25420,7 +25420,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle - Xsqlite3_open_file_count = Xsqlite3_open_file_count + (+1) + libc.AtomicAddInt32(&Xsqlite3_open_file_count, int32(+1)) verifyDbFile(tls, pNew) } return rc @@ -25481,7 +25481,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3 // using the io-error infrastructure to test that SQLite handles this // function failing. *(*int8)(unsafe.Pointer(zBuf + uintptr(0))) = int8(0) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return 10 } @@ -25990,7 +25990,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in var rc int32 = 0 _ = NotUsed - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(10) << 8)) } @@ -26033,7 +26033,7 @@ func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pRes defer tls.Free(144) _ = NotUsed - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(13) << 8)) } @@ -26098,7 +26098,7 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO // using the io-error infrastructure to test that SQLite handles this // function failing. This function could fail if, for example, the // current working directory has been unlinked. - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return 1 } @@ -32689,7 +32689,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54657:12: */ libc.Xmemcpy(tls, (pPager + 136 /* &.dbFileVers */), dbFileVers, uint64(unsafe.Sizeof([16]int8{}))) } } - Xsqlite3_pager_readdb_count++ + atomic.AddInt32(&Xsqlite3_pager_readdb_count, 1) (*Pager)(unsafe.Pointer(pPager)).FnRead++ return rc @@ -33408,12 +33408,12 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno var saved_cnt int32 /* sqlite3.c:55493:12: */ func Xdisable_simulated_io_errors(tls *libc.TLS) { /* sqlite3.c:55494:6: */ - saved_cnt = Xsqlite3_io_error_pending - Xsqlite3_io_error_pending = -1 + saved_cnt = libc.AtomicLoadInt32(&Xsqlite3_io_error_pending) + libc.AtomicStoreInt32(&Xsqlite3_io_error_pending, int32(-1)) } func Xenable_simulated_io_errors(tls *libc.TLS) { /* sqlite3.c:55498:6: */ - Xsqlite3_io_error_pending = saved_cnt + libc.AtomicStoreInt32(&Xsqlite3_io_error_pending, int32(saved_cnt)) } // Read the first N bytes from the beginning of the file into memory @@ -33952,7 +33952,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // Update any backup objects copying the contents of this pager. Xsqlite3BackupUpdate(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup, pgno, (*PgHdr)(unsafe.Pointer(pList)).FpData) - Xsqlite3_pager_writedb_count++ + atomic.AddInt32(&Xsqlite3_pager_writedb_count, 1) } else { } @@ -35544,7 +35544,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite return rc } - Xsqlite3_pager_writej_count++ + atomic.AddInt32(&Xsqlite3_pager_writej_count, 1) *(*I64)(unsafe.Pointer(pPager + 96 /* &.journalOff */)) += (I64(8 + (*Pager)(unsafe.Pointer(pPager)).FpageSize)) (*Pager)(unsafe.Pointer(pPager)).FnRec++ @@ -58343,7 +58343,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:812 if *(*int32)(unsafe.Pointer(bp /* res */)) != 0 { return Xsqlite3CorruptError(tls, 81251) } - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(0) return 0 @@ -69414,7 +69414,7 @@ __551: ; __535: ; - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) if !(oc >= 24) { goto __552 } @@ -70660,7 +70660,7 @@ __656: __114: // jump __115: // jump Xsqlite3_sort_count++ - Xsqlite3_search_count-- + atomic.AddInt32(&Xsqlite3_search_count, -1) *(*U32)(unsafe.Pointer((p + 212 /* &.aCounter */) + uintptr(2)*4))++ // Fall through into OP_Rewind /* no break */ @@ -70793,7 +70793,7 @@ next_tail: } (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(0) *(*U32)(unsafe.Pointer((p + 212 /* &.aCounter */) + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) goto jump_to_p2_and_check_for_interrupt __661: ; @@ -160330,7 +160330,6 @@ __15: goto __14 goto __16 __16: - } // This is a helper function for rbuObjIterCacheTableInfo(). It populates diff --git a/lib/sqlite_linux_arm.go b/lib/sqlite_linux_arm.go index f0e2734..9cf1075 100644 --- a/lib/sqlite_linux_arm.go +++ b/lib/sqlite_linux_arm.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -pkgname sqlite3 -o lib/sqlite_linux_arm.go -trace-translation-units testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -pkgname sqlite3 -o lib/sqlite_linux_arm.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -12,6 +13,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer const ( @@ -10887,6 +10889,7 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:21407:21: *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) + 40 /* &.mxValue */) + uintptr(op)*4)) = *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) /* &.nowValue */) + uintptr(op)*4)) } } + func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:21418:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) /* &.nowValue */) + uintptr(op)*4)) -= (Sqlite3StatValueType(N)) @@ -10927,6 +10930,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex // Prevent warning when SQLITE_THREADSAFE=0 return 0 } + func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:21477:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -13017,6 +13021,7 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:23048:21: */ (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = uintptr(0) } } + func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:23054:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13028,6 +13033,7 @@ func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I return (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 8 /* &.xRead */))))(tls, id, pBuf, amt, offset) } + func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:23058:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13039,9 +13045,11 @@ func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset return (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 12 /* &.xWrite */))))(tls, id, pBuf, amt, offset) } + func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:23062:20: */ return (*(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 16 /* &.xTruncate */))))(tls, id, size) } + func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:23065:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13056,6 +13064,7 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c } return 0 } + func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:23069:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13067,6 +13076,7 @@ func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sql return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 24 /* &.xFileSize */))))(tls, id, pSize) } + func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:23073:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13078,9 +13088,11 @@ func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 28 /* &.xLock */))))(tls, id, lockType) } + func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:23077:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 32 /* &.xUnlock */))))(tls, id, lockType) } + func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:23080:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13126,6 +13138,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in } return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 40 /* &.xFileControl */))))(tls, id, op, pArg) } + func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:23114:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 40 /* &.xFileControl */))))(tls, id, op, pArg) @@ -13141,18 +13154,23 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:23118: return 4096 }() } + func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:23122:20: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 48 /* &.xDeviceCharacteristics */))))(tls, id) } + func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:23126:20: */ return (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 56 /* &.xShmLock */))))(tls, id, offset, n, flags) } + func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:23129:21: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 60 /* &.xShmBarrier */))))(tls, id) } + func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:23132:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 64 /* &.xShmUnmap */))))(tls, id, deleteFlag) } + func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:23135:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13162,7 +13180,7 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten Xsqlite3_free(tls, pTstAlloc) } - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 52 /* &.xShmMap */))))(tls, id, iPage, pgsz, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 52 /* &.xShmMap */))))(tls, id, iPage, pgsz, bExtend, libc.AtomicLoadUintptr(&pp)) } // The real implementation of xFetch and xUnfetch @@ -13177,6 +13195,7 @@ func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr return (*(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 68 /* &.xFetch */))))(tls, id, iOff, iAmt, pp) } + func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:23153:20: */ return (*(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 72 /* &.xUnfetch */))))(tls, id, iOff, p) } @@ -13201,6 +13220,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f return rc } + func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:23188:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13212,6 +13232,7 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pVfs + 28 /* &.xDelete */))))(tls, pVfs, zPath, dirSync) } + func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:23193:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13223,6 +13244,7 @@ func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, p return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 32 /* &.xAccess */))))(tls, pVfs, zPath, flags, pResOut) } + func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:23202:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13235,18 +13257,23 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut *(*int8)(unsafe.Pointer(zPathOut + uintptr(0))) = int8(0) return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 36 /* &.xFullPathname */))))(tls, pVfs, zPath, nPathOut, zPathOut) } + func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:23213:21: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 40 /* &.xDlOpen */))))(tls, pVfs, zPath) } + func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:23216:21: */ (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pVfs + 44 /* &.xDlError */))))(tls, pVfs, nByte, zBufOut) } + func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:23219:21: */ return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 48 /* &.xDlSym */))))(tls, pVfs, pHdle, zSym) } + func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:23222:21: */ (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pVfs + 52 /* &.xDlClose */))))(tls, pVfs, pHandle) } + func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:23226:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.Xmemset(tls, zBufOut, 0, uint32(nByte)) @@ -13261,15 +13288,18 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint return int32(0) } + func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:23237:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pVfs + 60 /* &.xSleep */))))(tls, pVfs, nMicro) } + func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:23240:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 68 /* &.xGetLastError */))))(tls, pVfs, 0, uintptr(0)) } return 0 } + func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:23243:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13307,6 +13337,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin } return rc } + func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:23283:21: */ Xsqlite3OsClose(tls, pFile) @@ -13498,6 +13529,7 @@ func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23474:21: */ (*(*func(*libc.TLS))(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Hooks)) /* &.xBenignBegin */))))(tls) } } + func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23480:21: */ if sqlite3Hooks.FxBenignEnd != 0 { @@ -13973,25 +14005,31 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:25985:17: */ func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:26048:12: */ return 0 } + func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:26049:12: */ return 0 } + func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26050:22: */ _ = id return uintptr(8) } + func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:26054:13: */ _ = p return } + func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:26055:13: */ _ = p return } + func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:26056:12: */ _ = p return 0 } + func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:26060:13: */ _ = p return @@ -14151,6 +14189,7 @@ func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } return priorLimit } + func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:27437:17: */ if n < 0 { n = 0 @@ -14340,6 +14379,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:27620:17: */ } return Xsqlite3Malloc(tls, uint64(n)) } + func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:27626:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) @@ -14358,12 +14398,14 @@ func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27648:20: return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 12 /* &.xSize */))))(tls, p) } + func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:27652:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return 128 } + func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:27659:20: */ if db != 0 { @@ -14380,6 +14422,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit } return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 12 /* &.xSize */))))(tls, p) } + func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:27688:27: */ if p != 0 { @@ -14439,6 +14482,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:27725 Xsqlite3_free(tls, p) } + func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:27762:21: */ if p != 0 { @@ -14506,6 +14550,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 } // IMP: R-26507-47431 return Xsqlite3Realloc(tls, pOld, uint64(n)) } + func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:27831:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) @@ -14576,6 +14621,7 @@ func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3. return p } + func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:27905:21: */ var pBuf uintptr @@ -14633,6 +14679,7 @@ func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* } return dbReallocFinish(tls, db, p, n) } + func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:27977:29: */ var pNew uintptr = uintptr(0) @@ -14684,6 +14731,7 @@ func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3 } return zNew } + func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:28036:21: */ var zNew uintptr @@ -15045,12 +15093,14 @@ func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:28292:22: } return Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*4))) } + func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:28296:15: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return 0.0 } return Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*4))) } + func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:28300:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) @@ -16538,7 +16588,8 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 815 /* "thstndrd" */)) /* sqlite3.c:28611:29 */ // End of function +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 815 /* "thstndrd" */)) /* sqlite3.c:28611:29 */ +// End of function // Enlarge the memory allocation on a StrAccum object so that it is // able to accept at least N more bytes of text. @@ -16657,6 +16708,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:2915 (*StrAccum)(unsafe.Pointer(p)).FzText = zText return zText } + func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29169:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*int8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = int8(0) @@ -16862,6 +16914,7 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a *(*int8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp /* &acc */)).FnChar))) = int8(0) return zBuf } + func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:29369:17: */ var z uintptr var ap Va_list @@ -17111,12 +17164,14 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:30 // The sqlite3_test_control() interface calls these routines to // control the PRNG. var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:30353:42: */ + func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:30354:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uintptr(unsafe.Pointer(&sqlite3Prng)), uint32(unsafe.Sizeof(sqlite3Prng))) } + func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:30361:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), @@ -18351,6 +18406,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:31417:21: */ } *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) } + func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:31439:21: */ *(*U32)(unsafe.Pointer(p + 4 /* &.flags */)) |= (func() uint32 { @@ -18389,6 +18445,7 @@ func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* s } return Xsqlite3StrICmp(tls, zLeft, zRight) } + func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:31474:20: */ var a uintptr var b uintptr @@ -18414,6 +18471,7 @@ func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sq } return c } + func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:31493:16: */ var a uintptr var b uintptr @@ -19264,6 +19322,7 @@ __3: ; return n } + func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:32123:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p + uintptr(0))) = (uint8(v & uint64(0x7f))) @@ -19525,6 +19584,7 @@ func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:32446:20: */ libc.Xmemcpy(tls, bp /* &x */, p, uint32(4)) return libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(bp /* x */))) } + func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:32464:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -19603,6 +19663,7 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:32548 } return int32(0) } + func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:32565:20: */ var magic U32 magic = (*Sqlite3)(unsafe.Pointer(db)).Fmagic @@ -19623,9 +19684,11 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32585:20: */ return libc.X__builtin_add_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } + func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32605:20: */ return libc.X__builtin_sub_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } + func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32620:20: */ return libc.X__builtin_mul_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } @@ -21854,6 +21917,7 @@ type UnixFile = unixFile /* sqlite3.c:33567:25 */ // method was called. If xOpen() is called from a different process id, // indicating that a fork() has occurred, the PRNG will be reset. var randomnessPid Pid_t = 0 /* sqlite3.c:33628:14 */ + func local_ioerr(tls *libc.TLS) { /* sqlite3.c:33812:13: */ Xsqlite3_io_error_hit++ @@ -22053,7 +22117,8 @@ var aSyscall = [29]unix_syscall{ FzName: ts + 4618, /* "ioctl" */ FpCurrent: uintptr(0), FpDefault: uintptr(0)}, -} /* sqlite3.c:33935:3 */ // End of the overrideable system calls +} /* sqlite3.c:33935:3 */ +// End of the overrideable system calls // On some systems, calls to fchown() will trigger a message in a security // log if they come from non-root processes. So avoid calling fchown() if @@ -22228,10 +22293,12 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3 // OK: enter(pLockInfo) // ERROR: enter(pLockInfo), enter(unixBigLock) var unixBigLock uintptr = uintptr(0) /* sqlite3.c:34284:22 */ + func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:34285:13: */ // Not a recursive mutex Xsqlite3_mutex_enter(tls, unixBigLock) } + func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:34289:13: */ Xsqlite3_mutex_leave(tls, unixBigLock) @@ -22432,7 +22499,8 @@ type unixFileId = struct { // A lists of all unixInodeInfo objects. // // Must hold unixBigLock in order to read or write this variable. -var inodeList uintptr = uintptr(0) /* sqlite3.c:34734:22 */ // All unixInodeInfo objects +var inodeList uintptr = uintptr(0) /* sqlite3.c:34734:22 */ +// All unixInodeInfo objects // // This function - unixLogErrorAtLine(), is only ever called via the macro @@ -22672,7 +22740,7 @@ func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { / var reserved int32 = 0 var pFile uintptr = id - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(14) << 8)) } @@ -23247,7 +23315,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:35634:12: */ if Xsqlite3OSTrace != 0 { Xsqlite3DebugPrintf(tls, ts+5052 /* "CLOSE %-3d\n" */, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).Fh)) } - Xsqlite3_open_file_count = Xsqlite3_open_file_count + (-1) + libc.AtomicAddInt32(&Xsqlite3_open_file_count, int32(-1)) Xsqlite3_free(tls, (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused) libc.Xmemset(tls, pFile, 0, uint32(unsafe.Sizeof(UnixFile{}))) return 0 @@ -23308,11 +23376,13 @@ func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) in *(*int32)(unsafe.Pointer(pResOut)) = 0 return 0 } + func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:35725:12: */ _ = NotUsed _ = NotUsed2 return 0 } + func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:35729:12: */ _ = NotUsed _ = NotUsed2 @@ -23369,7 +23439,7 @@ func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 var reserved int32 = 0 var pFile uintptr = id - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(14) << 8)) } @@ -23600,7 +23670,7 @@ func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, for ok := true; ok; ok = (got > 0) { newOffset = libc.Xlseek(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, offset, 0) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) newOffset = int64(-1) } @@ -23690,7 +23760,7 @@ func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, for ok := true; ok; ok = ((rc < 0) && ((*(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) == 4)) { var iSeek I64 = libc.Xlseek(tls, fd, iOff, 0) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) iSeek = int64(-1) } @@ -23735,7 +23805,7 @@ func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite offset = offset + (Sqlite3_int64(wrote)) pBuf = ((pBuf) + uintptr(wrote)) } - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) wrote = -1 amt = 1 @@ -23926,7 +23996,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:37261 Xsqlite3DebugPrintf(tls, ts+5213 /* "SYNC %-3d\n" */, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).Fh)) } rc = full_fsync(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, isFullsync, isDataOnly) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) rc = 1 } @@ -23963,7 +24033,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:373 var pFile uintptr = id var rc int32 - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(6) << 8)) } @@ -24003,7 +24073,7 @@ func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c // var buf stat at bp, 104 rc = (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(5)*12 + 4 /* &.pCurrent */))))(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, bp /* &buf */) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) rc = 1 } @@ -24799,10 +24869,10 @@ shmpage_out: if !(int32((*UnixShmNode)(unsafe.Pointer(pShmNode)).FnRegion) > iRegion) { goto __25 } - *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(pShmNode)).FapRegion + uintptr(iRegion)*4)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(pShmNode)).FapRegion + uintptr(iRegion)*4)) goto __26 __25: - *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = uintptr(0) __26: ; if !(((*UnixShmNode)(unsafe.Pointer(pShmNode)).FisReadonly != 0) && (rc == 0)) { @@ -25383,7 +25453,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle - Xsqlite3_open_file_count = Xsqlite3_open_file_count + (+1) + libc.AtomicAddInt32(&Xsqlite3_open_file_count, int32(+1)) verifyDbFile(tls, pNew) } return rc @@ -25444,7 +25514,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3 // using the io-error infrastructure to test that SQLite handles this // function failing. *(*int8)(unsafe.Pointer(zBuf + uintptr(0))) = int8(0) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return 10 } @@ -25953,7 +26023,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in var rc int32 = 0 _ = NotUsed - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(10) << 8)) } @@ -25996,7 +26066,7 @@ func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pRes defer tls.Free(104) _ = NotUsed - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(13) << 8)) } @@ -26061,7 +26131,7 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO // using the io-error infrastructure to test that SQLite handles this // function failing. This function could fail if, for example, the // current working directory has been unlinked. - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return 1 } @@ -26191,6 +26261,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { } unixLeaveMutex(tls) } + func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:40000:13: */ // GCC with -pedantic-errors says that C90 does not allow a void* to be // cast into a pointer to a function. And yet the library dlsym() routine @@ -26214,6 +26285,7 @@ func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr }{libc.Xdlsym})) return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(&x)))(tls, p, zSym) } + func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:40023:13: */ _ = NotUsed libc.Xdlclose(tls, pHandle) @@ -26254,7 +26326,8 @@ func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sq // The following variable, if set to a non-zero value, is interpreted as // the number of seconds since 1970 and is used to set the result of // sqlite3OsCurrentTime() during testing. -var Xsqlite3_current_time int32 = 0 /* sqlite3.c:40111:16 */ // Fake system time in seconds since 1970. +var Xsqlite3_current_time int32 = 0 /* sqlite3.c:40111:16 */ +// Fake system time in seconds since 1970. // Find the current time (in Universal Coordinated Time). Write into *piNow // the current time and date as a Julian Day number times 86_400_000. In @@ -26964,6 +27037,7 @@ func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c: func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:48283:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 68 /* &.xGetLastError */))))(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } + func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:48286:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 72 /* &.xCurrentTimeInt64 */))))(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) } @@ -27211,6 +27285,7 @@ func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlit } return int32(0) } + func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:48618:20: */ return (libc.Bool32((p != uintptr(0)) && (Xsqlite3BitvecTestNotNull(tls, p, i) != 0))) } @@ -27718,6 +27793,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:49138:20: */ } return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 100 /* &.pcache2 */ + 8 /* &.xInit */))))(tls, Xsqlite3Config.Fpcache2.FpArg) } + func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:49148:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. @@ -29159,6 +29235,7 @@ func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32 } return uintptr(0) } + func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:50793:15: */ var pCache uintptr = p var pPage uintptr @@ -29169,6 +29246,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) return pPage } + func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:50808:28: */ var pCache uintptr = p @@ -32642,7 +32720,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54657:12: */ libc.Xmemcpy(tls, (pPager + 104 /* &.dbFileVers */), dbFileVers, uint32(unsafe.Sizeof([16]int8{}))) } } - Xsqlite3_pager_readdb_count++ + atomic.AddInt32(&Xsqlite3_pager_readdb_count, 1) (*Pager)(unsafe.Pointer(pPager)).FnRead++ return rc @@ -33359,12 +33437,14 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno } var saved_cnt int32 /* sqlite3.c:55493:12: */ + func Xdisable_simulated_io_errors(tls *libc.TLS) { /* sqlite3.c:55494:6: */ - saved_cnt = Xsqlite3_io_error_pending - Xsqlite3_io_error_pending = -1 + saved_cnt = libc.AtomicLoadInt32(&Xsqlite3_io_error_pending) + libc.AtomicStoreInt32(&Xsqlite3_io_error_pending, int32(-1)) } + func Xenable_simulated_io_errors(tls *libc.TLS) { /* sqlite3.c:55498:6: */ - Xsqlite3_io_error_pending = saved_cnt + libc.AtomicStoreInt32(&Xsqlite3_io_error_pending, int32(saved_cnt)) } // Read the first N bytes from the beginning of the file into memory @@ -33903,7 +33983,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // Update any backup objects copying the contents of this pager. Xsqlite3BackupUpdate(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup, pgno, (*PgHdr)(unsafe.Pointer(pList)).FpData) - Xsqlite3_pager_writedb_count++ + atomic.AddInt32(&Xsqlite3_pager_writedb_count, 1) } else { } @@ -33974,6 +34054,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56159:12: * } return rc } + func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56195:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) @@ -35281,11 +35362,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57391: // Do not use this routine to release the last reference to page1 } + func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57403:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } + func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57406:21: */ var pPager uintptr @@ -35492,7 +35575,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite return rc } - Xsqlite3_pager_writej_count++ + atomic.AddInt32(&Xsqlite3_pager_writej_count, 1) *(*I64)(unsafe.Pointer(pPager + 72 /* &.journalOff */)) += (I64(8 + (*Pager)(unsafe.Pointer(pPager)).FpageSize)) (*Pager)(unsafe.Pointer(pPager)).FnRec++ @@ -36273,6 +36356,7 @@ func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { return rc } + func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:58562:20: */ if (nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint) && ((*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0) { @@ -37631,6 +37715,7 @@ func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintpt return rc } + func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:60010:12: */ if ((*Wal)(unsafe.Pointer(pWal)).FnWiData <= iPage) || ((libc.AssignPtrUintptr(ppPage, *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*4)))) == uintptr(0)) { return walIndexPageRealloc(tls, pWal, iPage, ppPage) @@ -37809,6 +37894,7 @@ func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite return rc } + func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:60272:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return @@ -37817,6 +37903,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: (1 | 4)) } + func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:60278:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { @@ -37827,6 +37914,7 @@ func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 return rc } + func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:60288:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return @@ -37843,6 +37931,7 @@ func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:60301:12: */ return (int32((iPage * U32(383)) & (U32((4096 * 2) - 1)))) } + func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:60306:12: */ return ((iPriorHash + 1) & ((4096 * 2) - 1)) } @@ -41794,11 +41883,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64358:29: */ } (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } + func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64372:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } + func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64375:29: */ var i int32 var p uintptr @@ -41810,6 +41901,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64375:29: */ } } } + func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64384:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) @@ -41824,6 +41916,7 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64384:21: * func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:64470:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } + func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:64474:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -42051,7 +42144,9 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: (*BtLock)(unsafe.Pointer(pLock)).FeLock = U8(1) } } -} // Forward reference +} + +// Forward reference // This routine is used inside of assert() only **** // @@ -42661,6 +42756,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn (*CellInfo)(unsafe.Pointer(pInfo)).FpPayload = uintptr(0) return } + func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:65649:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -42725,6 +42821,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt btreeParseCellAdjustSizeForOverflow(tls, pPage, pCell, pInfo) } } + func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:65717:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -42755,6 +42852,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u btreeParseCellAdjustSizeForOverflow(tls, pPage, pCell, pInfo) } } + func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:65754:13: */ (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((pPage + 80 /* &.xParseCell */))))(tls, pPage, ((*MemPage)(unsafe.Pointer((pPage))).FaData + uintptr((int32((*MemPage)(unsafe.Pointer((pPage))).FmaskPage) & int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(((*MemPage)(unsafe.Pointer((pPage))).FaCellIdx + uintptr((2 * (iCell))))))))))), pInfo) } @@ -42809,6 +42907,7 @@ func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c return U16(nSize) } + func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:65822:12: */ var pIter uintptr = (pCell + uintptr(4)) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -43661,6 +43760,7 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:66624:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } + func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:66627:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) @@ -43746,11 +43846,13 @@ func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66704:13: * Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } + func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66713:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } + func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66716:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -46060,6 +46162,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(1) return 0 } + func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:68920:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -46067,6 +46170,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK Xsqlite3BtreeLeave(tls, p) return rc } + func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:68933:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -46161,6 +46265,7 @@ func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:69070:21 *(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) |= U8((0x40)) } + func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:69074:21: */ *(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) &= libc.Uint8FromInt32((^libc.Int32(0x40))) @@ -46505,6 +46610,7 @@ func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf } return accessPayload(tls, pCur, offset, amt, pBuf, 0) } + func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:69495:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == 0 { @@ -47367,6 +47473,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70198:28: */ } return int32(0) } + func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:70268:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -47460,6 +47567,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70308:28: * } return rc } + func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:70357:20: */ _ = flags // Used in COMDB2 but not native SQLite @@ -48206,6 +48314,7 @@ __18: releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */))) return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } + func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:70851:13: */ if (*(*int32)(unsafe.Pointer(pRC))) == 0 { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) @@ -48788,6 +48897,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:71397 *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer(((*CellArray)(unsafe.Pointer(p)).FpRef + 76 /* &.xCellSize */))))(tls, (*CellArray)(unsafe.Pointer(p)).FpRef, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FapCell + uintptr(N)*4))) return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } + func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:71403:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { @@ -51601,6 +51711,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags *(*Pgno)(unsafe.Pointer(piTable)) = *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)) return 0 } + func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:73729:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -51855,6 +51966,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 } return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } + func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:73941:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -52182,6 +52294,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:74299:1 i = j } } + func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:74309:12: */ var j U32 var i U32 @@ -53652,6 +53765,7 @@ func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqli } } } + func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:75746:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) @@ -54149,6 +54263,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:76417:28: */ Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp /* &value */, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) return *(*I64)(unsafe.Pointer(bp /* value */)) } + func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:76422:20: */ var flags int32 @@ -54179,6 +54294,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:76445:31: Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp /* &val */, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) return *(*float64)(unsafe.Pointer(bp /* val */)) } + func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:76451:23: */ if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & 0x0008) != 0 { @@ -54377,6 +54493,7 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:76652:21 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(0x0001) } } + func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:76659:21: */ Xsqlite3VdbeMemSetNull(tls, p) } @@ -54494,6 +54611,7 @@ func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sq Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } + func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:76833:21: */ if (int32((*Mem)(unsafe.Pointer((pTo))).Fflags) & (0x2000 | 0x0400)) != 0 { @@ -54680,6 +54798,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, } return rc } + func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:77029:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -55481,6 +55600,7 @@ func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:77717: } return 0 } + func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:77720:20: */ var p uintptr = pVal @@ -55645,6 +55765,7 @@ func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) i return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) } + func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:77972:20: */ var i int32 var pOp uintptr @@ -55666,12 +55787,15 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, (*VdbeOp)(unsafe.Pointer(pOp)).FzComment = uintptr(0) return i } + func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:78009:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } + func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:78012:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, 0, 0) } + func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:78015:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } @@ -55924,6 +56048,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(p)).FaLabel + uintptr(j)*4)) = (*Vdbe)(unsafe.Pointer(v)).FnOp } } + func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:78302:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -56192,15 +56317,19 @@ __3: func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:78782:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } + func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78785:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } + func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78788:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } + func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78791:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } + func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:78794:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { @@ -56249,10 +56378,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:78849:29: */ } Xsqlite3DbFreeNN(tls, db, p) } + func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:78853:29: */ freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) Xsqlite3DbFreeNN(tls, db, p) } + func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:78857:13: */ switch p4type { @@ -56397,6 +56528,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-7) } } + func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:79034:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -56482,6 +56614,7 @@ func vdbeVComment(tls *libc.TLS, p uintptr, zFormat uintptr, ap Va_list) { /* sq (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(((*Vdbe)(unsafe.Pointer(p)).FnOp-1))*24)).FzComment = Xsqlite3VMPrintf(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, zFormat, ap) } } + func Xsqlite3VdbeComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79123:21: */ var ap Va_list _ = ap @@ -56491,6 +56624,7 @@ func Xsqlite3VdbeComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) _ = ap } } + func Xsqlite3VdbeNoopComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79131:21: */ var ap Va_list _ = ap @@ -56876,6 +57010,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:79548:29: */ } } } + func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:79562:21: */ if ((*Vdbe)(unsafe.Pointer(p)).FlockMask) == YDbMask(0) { return @@ -57802,6 +57937,7 @@ func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3. } return rc } + func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:80715:20: */ if ((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0) && ((*Vdbe)(unsafe.Pointer(p)).FiStatement != 0) { return vdbeCloseStatement(tls, p, eOp) @@ -58233,7 +58369,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:812 if *(*int32)(unsafe.Pointer(bp /* res */)) != 0 { return Xsqlite3CorruptError(tls, 81251) } - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(0) return 0 @@ -58367,6 +58503,7 @@ func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3. } return U32(0) } + func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:81468:19: */ return sqlite3SmallTypeSizes[serial_type] @@ -58494,6 +58631,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { } return U32(8) } + func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { /* sqlite3.c:81629:20: */ switch serial_type { case U32(10): @@ -58597,6 +58735,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin } var aFlag = [2]U16{(U16(0x0010 | 0x1000)), (U16(0x0002 | 0x1000))} /* sqlite3.c:81711:24 */ + // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if // the first argument is a pointer to KeyInfo structure pKeyInfo. @@ -59192,6 +59331,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } + func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:82413:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -59794,6 +59934,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83026:12: */ } return int32(0) } + func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83034:12: */ if p == uintptr(0) { Xsqlite3_log(tls, 21, ts+7010 /* "API called with ..." */, 0) @@ -59931,21 +60072,27 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:831 } return uintptr(0) } + func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83172:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(1)) } + func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83175:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(2)) } + func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:83178:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } + func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83181:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } + func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:83184:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } + func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:83187:25: */ var pMem uintptr = pVal return func() uint32 { @@ -59955,6 +60102,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 return uint32(0) }() } + func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:83191:17: */ var p uintptr = pVal if ((((int32((*Mem)(unsafe.Pointer(p)).Fflags) & ((0xc1bf | 0x0200) | 0x8000)) == ((0x0001 | 0x0200) | 0x8000)) && @@ -59967,15 +60115,19 @@ func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr } return uintptr(0) } + func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83204:32: */ return Xsqlite3ValueText(tls, pVal, uint8(1)) } + func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83208:23: */ return Xsqlite3ValueText(tls, pVal, uint8(2)) } + func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83211:23: */ return Xsqlite3ValueText(tls, pVal, uint8(3)) } + func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83214:23: */ return Xsqlite3ValueText(tls, pVal, uint8(2)) } @@ -60111,6 +60263,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 Xsqlite3_result_error_toobig(tls, pCtx) } } + func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:83369:12: */ if xDel == uintptr(0) { @@ -60125,10 +60278,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) } return 18 } + func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83385:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(0), xDel) } + func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:83395:17: */ if n > uint64(0x7fffffff) { @@ -60137,32 +60292,39 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui setResultStrOrError(tls, pCtx, z, int32(n), uint8(0), xDel) } } + func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:83409:17: */ Xsqlite3VdbeMemSetDouble(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, rVal) } + func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:83413:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = 1 Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, n, uint8(1), libc.UintptrFromInt32(-1)) } + func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:83419:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = 1 Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, n, uint8(2), libc.UintptrFromInt32(-1)) } + func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:83425:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } + func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:83429:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } + func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:83433:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) } + func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:83437:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut @@ -60170,16 +60332,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(0x0001) Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } + func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:83449:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = (U8(eSubtype & uint32(0xff))) *(*U16)(unsafe.Pointer(pOut + 8 /* &.flags */)) |= U16((0x8000)) } + func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83455:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(1), xDel) } + func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:83464:17: */ if int32(enc) == 4 { @@ -60191,26 +60356,32 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui setResultStrOrError(tls, pCtx, z, int32(n), enc, xDel) } } + func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83481:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(2), xDel) } + func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83490:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(3), xDel) } + func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83499:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(2), xDel) } + func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:83509:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } + func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:83513:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } + func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:83517:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut @@ -60220,6 +60391,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, int32(n)) return 0 } + func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:83526:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { @@ -60824,36 +60996,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84107:16: */ var val int32 = Xsqlite3_value_bytes(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84112:16: */ var val int32 = Xsqlite3_value_bytes16(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:84117:19: */ var val float64 = Xsqlite3_value_double(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84122:16: */ var val int32 = Xsqlite3_value_int(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:84127:25: */ var val Sqlite_int64 = Xsqlite3_value_int64(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84132:32: */ var val uintptr = Xsqlite3_value_text(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84137:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if (int32((*Mem)(unsafe.Pointer(pOut)).Fflags) & 0x0800) != 0 { @@ -60863,11 +61042,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s columnMallocFailure(tls, pStmt) return pOut } + func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84147:23: */ var val uintptr = Xsqlite3_value_text16(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84153:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) @@ -60923,6 +61104,7 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84224:23: */ return columnName(tls, pStmt, N, 0, 0) } + func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84228:23: */ return columnName(tls, pStmt, N, 1, 0) } @@ -60935,6 +61117,7 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84247:23: */ return columnName(tls, pStmt, N, 0, 1) } + func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84251:23: */ return columnName(tls, pStmt, N, 1, 1) } @@ -60945,6 +61128,7 @@ func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84263:23: */ return columnName(tls, pStmt, N, 0, 2) } + func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84267:23: */ return columnName(tls, pStmt, N, 1, 2) } @@ -60955,6 +61139,7 @@ func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uint func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84277:23: */ return columnName(tls, pStmt, N, 0, 3) } + func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84281:23: */ return columnName(tls, pStmt, N, 1, 3) } @@ -60965,6 +61150,7 @@ func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84291:23: */ return columnName(tls, pStmt, N, 0, 4) } + func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84295:23: */ return columnName(tls, pStmt, N, 1, 4) } @@ -61059,6 +61245,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84396:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(0)) } + func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:84408:16: */ if nData > uint64(0x7fffffff) { @@ -61068,6 +61255,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, } return int32(0) } + func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:84422:16: */ var rc int32 var p uintptr = pStmt @@ -61078,9 +61266,11 @@ func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) } return rc } + func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:84432:16: */ return Xsqlite3_bind_int64(tls, p, i, I64(iValue)) } + func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:84435:16: */ var rc int32 var p uintptr = pStmt @@ -61091,6 +61281,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in } return rc } + func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84445:16: */ var rc int32 var p uintptr = pStmt @@ -61100,6 +61291,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite } return rc } + func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:84454:16: */ var rc int32 var p uintptr = pStmt @@ -61112,9 +61304,11 @@ func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, } return rc } + func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84472:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(1)) } + func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:84481:16: */ if nData > uint64(0x7fffffff) { @@ -61127,9 +61321,11 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, } return int32(0) } + func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84498:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(2)) } + func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:84508:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { @@ -61171,6 +61367,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) } return rc } + func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:84539:16: */ var rc int32 var p uintptr = pStmt @@ -61181,6 +61378,7 @@ func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int3 } return rc } + func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:84549:16: */ var rc int32 var p uintptr = pStmt @@ -61227,6 +61425,7 @@ func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName i } return Xsqlite3VListNameToNum(tls, (*Vdbe)(unsafe.Pointer(p)).FpVList, zName, nName) } + func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:84594:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } @@ -61892,6 +62091,7 @@ var Xsqlite3_sort_count int32 = 0 /* sqlite3.c:85308:16 */ // is working correctly. This variable has no function other than to // help verify the correct operation of the library. var Xsqlite3_max_blobsize int32 = 0 /* sqlite3.c:85319:16 */ + func updateMaxBlobsize(tls *libc.TLS, p uintptr) { /* sqlite3.c:85320:13: */ if ((int32((*Mem)(unsafe.Pointer(p)).Fflags) & (0x0002 | 0x0010)) != 0) && ((*Mem)(unsafe.Pointer(p)).Fn > Xsqlite3_max_blobsize) { Xsqlite3_max_blobsize = (*Mem)(unsafe.Pointer(p)).Fn @@ -62194,6 +62394,7 @@ func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(0x0004) return pOut } + func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:85966:12: */ var pOut uintptr @@ -69239,7 +69440,7 @@ __551: ; __535: ; - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) if !(oc >= 24) { goto __552 } @@ -70485,7 +70686,7 @@ __656: __114: // jump __115: // jump Xsqlite3_sort_count++ - Xsqlite3_search_count-- + atomic.AddInt32(&Xsqlite3_search_count, -1) *(*U32)(unsafe.Pointer((p + 164 /* &.aCounter */) + uintptr(2)*4))++ // Fall through into OP_Rewind /* no break */ @@ -70618,7 +70819,7 @@ next_tail: } (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(0) *(*U32)(unsafe.Pointer((p + 164 /* &.aCounter */) + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) goto jump_to_p2_and_check_for_interrupt __661: ; @@ -77363,6 +77564,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. } return 0 } + func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:97606:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) @@ -77521,6 +77723,7 @@ func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return 0 } + func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:97725:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- @@ -77582,6 +77785,7 @@ func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli } return 0 } + func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:97794:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -79867,6 +80071,7 @@ func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, p } return pExpr } + func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:99820:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -80395,6 +80600,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:100 } } } + func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:100413:13: */ if p != 0 { var i int32 @@ -80403,6 +80609,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } } + func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:100421:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { @@ -80784,6 +80991,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 Xsqlite3DbFreeNN(tls, db, p) } } + func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:100855:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) @@ -81044,12 +81252,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) } return 0 } + func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101135:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 24 /* &.u */)) { return 0 } return 1 } + func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:101138:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -81090,6 +81300,7 @@ func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr } return uintptr(0) } + func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:101171:25: */ var pNew uintptr var pItem uintptr @@ -81202,6 +81413,7 @@ func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintp } return pNew } + func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:101263:23: */ var pNew uintptr var i int32 @@ -81230,6 +81442,7 @@ func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } return pNew } + func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:101287:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -81534,6 +81747,7 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:1 } Xsqlite3DbFreeNN(tls, db, pList) } + func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:101584:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) @@ -81738,6 +81952,7 @@ func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / } return int32(0) } + func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:101788:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -86413,6 +86628,7 @@ func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* } return i } + func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:105750:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) @@ -90919,6 +91135,7 @@ __3: ; return 0 } + func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:110000:20: */ for pSelect != 0 { if Xsqlite3FixExprList(tls, pFix, (*Select)(unsafe.Pointer(pSelect)).FpEList) != 0 { @@ -90954,6 +91171,7 @@ func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* } return 0 } + func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:110038:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -90989,6 +91207,7 @@ func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqli } return 0 } + func Xsqlite3FixExprList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:110065:20: */ var i int32 var pItem uintptr @@ -91890,6 +92109,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11105 // Verify that no lookaside memory was used by schema tables } + func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:111108:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { @@ -99058,6 +99278,7 @@ func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } } } + func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:117525:13: */ var z1 uintptr var z2 uintptr @@ -100124,6 +100345,7 @@ func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } } } + func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118598:13: */ var p uintptr var type1 int32 @@ -100146,6 +100368,7 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } } + func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118623:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -100159,6 +100382,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118623:13: */ } } } + func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118636:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -100166,6 +100390,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118636:13: */ Xsqlite3_result_double(tls, context, ((*SumCtx)(unsafe.Pointer(p)).FrSum / float64((*SumCtx)(unsafe.Pointer(p)).Fcnt))) } } + func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118643:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -100200,6 +100425,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // expressed as a 32-bit integer. } + func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118681:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -100210,6 +100436,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118681:13: */ return int64(0) }()) } + func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:118687:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) @@ -100257,6 +100484,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3VdbeMemCopy(tls, pBest, pArg) } } + func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:118743:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) @@ -100269,9 +100497,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } } + func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:118754:13: */ minMaxValueFinalize(tls, context, 1) } + func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118760:13: */ minMaxValueFinalize(tls, context, 0) } @@ -100312,6 +100542,7 @@ func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } } + func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118800:13: */ var n int32 var pAccum uintptr @@ -100340,6 +100571,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } } + func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118831:13: */ var pAccum uintptr pAccum = Xsqlite3_aggregate_context(tls, context, 0) @@ -100354,6 +100586,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118831:1 } } } + func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:118846:13: */ var pAccum uintptr pAccum = Xsqlite3_aggregate_context(tls, context, 0) @@ -103087,6 +103320,7 @@ var autoIncEnd = [5]VdbeOpList{ Fp2: int8(0), Fp3: int8(0)}, } /* sqlite3.c:121025:29 */ + func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:121054:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) @@ -106458,6 +106692,7 @@ func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintpt var azEndings = [1]uintptr{ ts + 17088, /* "so" */ } /* sqlite3.c:124759:21 */ + func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:124882:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -107463,6 +107698,7 @@ var aPragmaName = [66]PragmaName{ FiArg: /* iArg: */ (uint64(0x00000001 | 0x08000000))}, } /* sqlite3.c:125260:25 */ + // Number of pragmas: 67 on by default, 77 total. //************* End of pragma.h ********************************************* @@ -112382,6 +112618,7 @@ end_prepare: Xsqlite3ParserReset(tls, bp+16 /* &sParse */) return rc } + func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129056:12: */ var rc int32 var cnt int32 = 0 @@ -112458,6 +112695,7 @@ func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppS // VERIFY: F13021 return rc } + func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129152:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works @@ -112470,6 +112708,7 @@ func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, return rc } + func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129170:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from @@ -112541,12 +112780,14 @@ func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, p // VERIFY: F13021 return rc } + func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129268:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0x80), ppStmt, pzTail) // VERIFY: F13021 return rc } + func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129280:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, @@ -116143,6 +116384,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite } return pExpr } + func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:132858:13: */ var i int32 if pList == uintptr(0) { @@ -116152,6 +116394,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: (*ExprList_item)(unsafe.Pointer((pList + 4 /* &.a */) + uintptr(i)*20)).FpExpr = substExpr(tls, pSubst, (*ExprList_item)(unsafe.Pointer((pList+4 /* &.a */)+uintptr(i)*20)).FpExpr) } } + func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:132868:13: */ var pSrc uintptr var pItem uintptr @@ -116210,6 +116453,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int *(*Bitmask)(unsafe.Pointer(pItem + 56 /* &.colUsed */)) |= (Xsqlite3ExprColUsed(tls, pExpr)) return 0 } + func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:132912:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -123421,6 +123665,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) return rc } + func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:139232:12: */ var z uintptr var ap Va_list @@ -128401,6 +128646,7 @@ __3: } return 0 } + func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:144979:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing @@ -128943,12 +129189,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas } return mask } + func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:145532:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } + func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:145535:24: */ var i int32 var mask Bitmask = uint64(0) @@ -134920,6 +135168,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151322:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { @@ -134951,6 +135200,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151354:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -135037,6 +135287,7 @@ error_out: Xsqlite3_result_error(tls, pCtx, ts+23754 /* "second argument ..." */, -1) } + func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151416:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -135059,6 +135310,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151444:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) @@ -135085,6 +135337,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = nArg _ = apArg } + func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151478:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -135107,6 +135360,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr (*CallCount)(unsafe.Pointer(p)).FnTotal++ } } + func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151506:13: */ var p uintptr _ = nArg @@ -135114,6 +135368,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) (*CallCount)(unsafe.Pointer(p)).FnStep++ } + func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151517:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -135141,6 +135396,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnTotal++ } } + func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151551:13: */ var p uintptr _ = nArg @@ -135148,6 +135404,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) (*CallCount)(unsafe.Pointer(p)).FnStep++ } + func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151562:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -135183,6 +135440,7 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } + func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151607:13: */ var p uintptr _ = nArg @@ -135190,6 +135448,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } + func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151618:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -135232,6 +135491,7 @@ func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) } } } + func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151671:13: */ var p uintptr _ = nArg @@ -135245,6 +135505,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } } + func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151688:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -135252,6 +135513,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151688:13: Xsqlite3_result_value(tls, pCtx, (*LastValueCtx)(unsafe.Pointer(p)).FpVal) } } + func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151695:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -135292,7 +135554,9 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 _ = n //NO_TEST _ = a //NO_TEST //NO_TEST -} //NO_TEST +} + +//NO_TEST func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:151744:13: */ _ = p /*no-op*/ } @@ -135700,6 +135964,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return 0 } + func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:151994:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24 /* &.u */)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect @@ -140023,7 +140288,8 @@ var yyRuleInfoNRhs = [385]int8{ int8(-4), // (382) anylist ::= anylist LP anylist RP int8(-2), // (383) anylist ::= anylist ANY int8(0), // (384) with ::= -} /* sqlite3.c:157063:26 */ // Forward Declaration +} /* sqlite3.c:157063:26 */ +// Forward Declaration // Perform a reduce action and the shift that must immediately // follow the reduce. @@ -142287,6 +142553,7 @@ var aKWCode = [145]uint8{ uint8(132), uint8(142), uint8(78), uint8(79), uint8(161), uint8(61), uint8(34), uint8(64), uint8(133), uint8(120), } /* sqlite3.c:159536:28 */ + // Hash table decoded: // 0: INSERT // 1: IS @@ -142593,6 +142860,7 @@ func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sq } return n } + func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:159871:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -142601,6 +142869,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c keywordCode(tls, z, n, bp /* &id */) return *(*int32)(unsafe.Pointer(bp /* id */)) } + func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:159877:16: */ if (i < 0) || (i >= 145) { return 1 @@ -142609,9 +142878,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt *(*int32)(unsafe.Pointer(pnName)) = int32(aKWLen[i]) return 0 } + func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:159883:16: */ return 145 } + func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:159884:16: */ return (libc.Bool32(59 != Xsqlite3KeywordCode(tls, zName, nName))) } @@ -142707,6 +142978,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:159987: } return 161 } + func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:159995:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -142720,6 +142992,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq } return 59 } + func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:160002:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -144524,6 +144797,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:162252:16: */ return sqlite3Close(tls, db, 0) } + func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:162253:16: */ return sqlite3Close(tls, db, 1) } @@ -145296,10 +145570,12 @@ func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int return createFunctionApi(tls, db, zFunc, nArg, enc, p, xSFunc, xStep, xFinal, uintptr(0), uintptr(0), uintptr(0)) } + func Xsqlite3_create_function_v2(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xDestroy uintptr) int32 { /* sqlite3.c:162955:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, xSFunc, xStep, xFinal, uintptr(0), uintptr(0), xDestroy) } + func Xsqlite3_create_window_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:162969:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) @@ -145721,6 +145997,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163559:16: } return ((*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask) } + func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163568:16: */ if (db != 0) && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { return Xsqlite3MisuseError(tls, 163570) @@ -145730,6 +146007,7 @@ func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1 } return (*Sqlite3)(unsafe.Pointer(db)).FerrCode } + func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163577:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno @@ -146611,6 +146889,7 @@ func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sq return openDatabase(tls, zFilename, ppDb, (uint32(0x00000002 | 0x00000004)), uintptr(0)) } + func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:164393:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } @@ -146734,14 +147013,17 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) libc.VaList(bp, zType, lineno, (uintptr(20)+Xsqlite3_sourceid(tls)))) return iErr } + func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164593:20: */ return Xsqlite3ReportError(tls, 11, lineno, ts+27702 /* "database corrupt..." */) } + func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164597:20: */ return Xsqlite3ReportError(tls, 21, lineno, ts+27722 /* "misuse" */) } + func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164601:20: */ return Xsqlite3ReportError(tls, 14, lineno, ts+27729 /* "cannot open file" */) @@ -147155,7 +147437,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit { var x int32 = 0 - rc = x + rc = libc.AtomicLoadInt32(&x) break } @@ -147514,6 +147796,7 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165356:23: */ return databaseName(tls, zFilename) } + func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165359:23: */ zFilename = databaseName(tls, zFilename) zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1)) @@ -147523,6 +147806,7 @@ func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sq } return (zFilename + uintptr(1)) } + func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165368:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1)) @@ -150647,6 +150931,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq jsonAppendValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*4))) } } + func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:187331:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) @@ -150676,9 +150961,11 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: } Xsqlite3_result_subtype(tls, ctx, uint32(74)) } + func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187353:13: */ jsonArrayCompute(tls, ctx, 0) } + func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187356:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -150749,6 +151036,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s jsonAppendValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*4))) } } + func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:187439:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) @@ -150777,9 +151065,11 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c } Xsqlite3_result_subtype(tls, ctx, uint32(74)) } + func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187460:13: */ jsonObjectCompute(tls, ctx, 0) } + func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187463:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -151712,10 +152002,12 @@ type RtreeValue = float32 /* sqlite3.c:188256:17 */ func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:188535:12: */ return ((int32(*(*U8)(unsafe.Pointer(p + uintptr(0)))) << 8) + int32(*(*U8)(unsafe.Pointer(p + uintptr(1))))) } + func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:188538:13: */ // p is always 4-byte aligned (*(*U32)(unsafe.Pointer(pCoord /* .Fu */))) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(p))) } + func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:188555:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -151733,6 +152025,7 @@ func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:188587:13: */ *(*U8)(unsafe.Pointer(p + uintptr(0))) = (U8((i >> 8) & 0xFF)) *(*U8)(unsafe.Pointer(p + uintptr(1))) = (U8((i >> 0) & 0xFF)) } + func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:188591:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -151745,6 +152038,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 libc.Xmemcpy(tls, p, bp /* &i */, uint32(4)) return 4 } + func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:188614:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -154384,6 +154678,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:191175:1 } return f } + func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:191183:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) @@ -156673,6 +156968,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } } + func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:193173:13: */ var p uintptr var pBBox uintptr @@ -162464,7 +162760,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:199480:16: (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 52 /* &.xShmMap */))))(tls, pDb, 0, (32 * 1024), 0, bp+16 /* &ptr */) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - *(*U32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 16 /* ptr */))) + uintptr(24)*4)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame + *(*U32)(unsafe.Pointer((libc.AtomicLoadPUintptr(bp + 16 /* ptr */)) + uintptr(24)*4)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame } } @@ -163615,13 +163911,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } if rc == 0 { - *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*4)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*4)) } else { - *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = uintptr(0) } } else { - rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 52 /* &.xShmMap */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 52 /* &.xShmMap */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) } return rc @@ -166555,7 +166851,8 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:210261:26 */ // Forward Declaration +} /* sqlite3.c:210261:26 */ +// Forward Declaration // Perform a reduce action and the shift that must immediately // follow the reduce. @@ -169257,6 +169554,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:213114:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } + func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:213115:13: */ Xsqlite3_free(tls, p) } @@ -171910,6 +172208,7 @@ func fts5ExprFunction(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr, bT func fts5ExprFunctionHr(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:215460:13: */ fts5ExprFunction(tls, pCtx, nArg, apVal, 0) } + func fts5ExprFunctionTcl(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:215467:13: */ fts5ExprFunction(tls, pCtx, nArg, apVal, 1) } @@ -174009,6 +174308,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FbEof } + func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:217680:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -174139,6 +174439,7 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FbEof } + func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:217803:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } @@ -174199,6 +174500,7 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:217867:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FiRowid } + func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:217870:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FiLeafPgno } @@ -179534,6 +179836,7 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:223403:12: */ return fts5InitVtab(tls, 0, db, pAux, argc, argv, ppVtab, pzErr) } + func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:223413:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -186378,6 +186681,7 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:229648:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } + func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:229658:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } diff --git a/lib/sqlite_linux_arm64.go b/lib/sqlite_linux_arm64.go index 94f8c74..0f8109a 100644 --- a/lib/sqlite_linux_arm64.go +++ b/lib/sqlite_linux_arm64.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -pkgname sqlite3 -o lib/sqlite_linux_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -pkgname sqlite3 -o lib/sqlite_linux_arm64.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -12,6 +13,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer const ( @@ -3633,8 +3635,14 @@ type Size_t = uint64 /* :9:23 */ type Wchar_t = uint32 /* :15:24 */ -type X__int128_t = [2]int64 /* :21:24 */ //TODO -type X__uint128_t = [2]uint64 /* :22:25 */ //TODO +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 type X__builtin_va_list = uintptr /* :47:14 */ type X__float128 = float64 /* :48:21 */ @@ -11008,6 +11016,7 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:21407:21: *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 /* &.mxValue */) + uintptr(op)*8)) = *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) /* &.nowValue */) + uintptr(op)*8)) } } + func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:21418:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) /* &.nowValue */) + uintptr(op)*8)) -= (Sqlite3StatValueType(N)) @@ -11048,6 +11057,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex // Prevent warning when SQLITE_THREADSAFE=0 return 0 } + func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:21477:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -13142,6 +13152,7 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:23048:21: */ (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = uintptr(0) } } + func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:23054:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13153,6 +13164,7 @@ func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I return (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 16 /* &.xRead */))))(tls, id, pBuf, amt, offset) } + func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:23058:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13164,9 +13176,11 @@ func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset return (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 24 /* &.xWrite */))))(tls, id, pBuf, amt, offset) } + func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:23062:20: */ return (*(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 32 /* &.xTruncate */))))(tls, id, size) } + func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:23065:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13181,6 +13195,7 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c } return 0 } + func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:23069:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13192,6 +13207,7 @@ func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sql return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 48 /* &.xFileSize */))))(tls, id, pSize) } + func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:23073:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13203,9 +13219,11 @@ func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 56 /* &.xLock */))))(tls, id, lockType) } + func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:23077:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 64 /* &.xUnlock */))))(tls, id, lockType) } + func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:23080:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13251,6 +13269,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in } return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 80 /* &.xFileControl */))))(tls, id, op, pArg) } + func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:23114:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 80 /* &.xFileControl */))))(tls, id, op, pArg) @@ -13266,18 +13285,23 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:23118: return 4096 }() } + func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:23122:20: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 96 /* &.xDeviceCharacteristics */))))(tls, id) } + func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:23126:20: */ return (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 112 /* &.xShmLock */))))(tls, id, offset, n, flags) } + func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:23129:21: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 120 /* &.xShmBarrier */))))(tls, id) } + func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:23132:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 128 /* &.xShmUnmap */))))(tls, id, deleteFlag) } + func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:23135:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13287,7 +13311,7 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten Xsqlite3_free(tls, pTstAlloc) } - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 104 /* &.xShmMap */))))(tls, id, iPage, pgsz, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 104 /* &.xShmMap */))))(tls, id, iPage, pgsz, bExtend, libc.AtomicLoadUintptr(&pp)) } // The real implementation of xFetch and xUnfetch @@ -13302,6 +13326,7 @@ func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr return (*(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 136 /* &.xFetch */))))(tls, id, iOff, iAmt, pp) } + func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:23153:20: */ return (*(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 144 /* &.xUnfetch */))))(tls, id, iOff, p) } @@ -13326,6 +13351,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f return rc } + func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:23188:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13337,6 +13363,7 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pVfs + 48 /* &.xDelete */))))(tls, pVfs, zPath, dirSync) } + func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:23193:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13348,6 +13375,7 @@ func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, p return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 56 /* &.xAccess */))))(tls, pVfs, zPath, flags, pResOut) } + func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:23202:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -13360,18 +13388,23 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut *(*int8)(unsafe.Pointer(zPathOut + uintptr(0))) = int8(0) return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 64 /* &.xFullPathname */))))(tls, pVfs, zPath, nPathOut, zPathOut) } + func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:23213:21: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 72 /* &.xDlOpen */))))(tls, pVfs, zPath) } + func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:23216:21: */ (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pVfs + 80 /* &.xDlError */))))(tls, pVfs, nByte, zBufOut) } + func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:23219:21: */ return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 88 /* &.xDlSym */))))(tls, pVfs, pHdle, zSym) } + func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:23222:21: */ (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pVfs + 96 /* &.xDlClose */))))(tls, pVfs, pHandle) } + func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:23226:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.Xmemset(tls, zBufOut, 0, uint64(nByte)) @@ -13386,15 +13419,18 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint return int32(0) } + func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:23237:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pVfs + 112 /* &.xSleep */))))(tls, pVfs, nMicro) } + func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:23240:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 128 /* &.xGetLastError */))))(tls, pVfs, 0, uintptr(0)) } return 0 } + func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:23243:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13432,6 +13468,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin } return rc } + func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:23283:21: */ Xsqlite3OsClose(tls, pFile) @@ -13623,6 +13660,7 @@ func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23474:21: */ (*(*func(*libc.TLS))(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Hooks)) /* &.xBenignBegin */))))(tls) } } + func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23480:21: */ if sqlite3Hooks.FxBenignEnd != 0 { @@ -14098,25 +14136,31 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:25985:17: */ func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:26048:12: */ return 0 } + func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:26049:12: */ return 0 } + func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26050:22: */ _ = id return uintptr(8) } + func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:26054:13: */ _ = p return } + func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:26055:13: */ _ = p return } + func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:26056:12: */ _ = p return 0 } + func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:26060:13: */ _ = p return @@ -14275,6 +14319,7 @@ func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } return priorLimit } + func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:27437:17: */ if n < 0 { n = 0 @@ -14464,6 +14509,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:27620:17: */ } return Xsqlite3Malloc(tls, uint64(n)) } + func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:27626:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) @@ -14482,12 +14528,14 @@ func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27648:20: return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 24 /* &.xSize */))))(tls, p) } + func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:27652:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return 128 } + func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:27659:20: */ if db != 0 { @@ -14504,6 +14552,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit } return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 24 /* &.xSize */))))(tls, p) } + func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:27688:27: */ if p != 0 { @@ -14563,6 +14612,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:27725 Xsqlite3_free(tls, p) } + func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:27762:21: */ if p != 0 { @@ -14630,6 +14680,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 } // IMP: R-26507-47431 return Xsqlite3Realloc(tls, pOld, uint64(n)) } + func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:27831:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) @@ -14700,6 +14751,7 @@ func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3. return p } + func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:27905:21: */ var pBuf uintptr @@ -14757,6 +14809,7 @@ func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* } return dbReallocFinish(tls, db, p, n) } + func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:27977:29: */ var pNew uintptr = uintptr(0) @@ -14808,6 +14861,7 @@ func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3 } return zNew } + func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:28036:21: */ var zNew uintptr @@ -15169,12 +15223,14 @@ func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:28292:22: } return Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*8))) } + func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:28296:15: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return 0.0 } return Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*8))) } + func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:28300:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) @@ -16662,7 +16718,8 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 815 /* "thstndrd" */)) /* sqlite3.c:28611:29 */ // End of function +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 815 /* "thstndrd" */)) /* sqlite3.c:28611:29 */ +// End of function // Enlarge the memory allocation on a StrAccum object so that it is // able to accept at least N more bytes of text. @@ -16781,6 +16838,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:2915 (*StrAccum)(unsafe.Pointer(p)).FzText = zText return zText } + func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29169:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*int8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = int8(0) @@ -16986,6 +17044,7 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a *(*int8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp /* &acc */)).FnChar))) = int8(0) return zBuf } + func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:29369:17: */ var z uintptr var ap Va_list @@ -17235,12 +17294,14 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:30 // The sqlite3_test_control() interface calls these routines to // control the PRNG. var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:30353:42: */ + func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:30354:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uintptr(unsafe.Pointer(&sqlite3Prng)), uint64(unsafe.Sizeof(sqlite3Prng))) } + func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:30361:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), @@ -18433,6 +18494,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:31417:21: */ } *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) } + func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:31439:21: */ *(*U32)(unsafe.Pointer(p + 4 /* &.flags */)) |= (func() uint32 { @@ -18471,6 +18533,7 @@ func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* s } return Xsqlite3StrICmp(tls, zLeft, zRight) } + func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:31474:20: */ var a uintptr var b uintptr @@ -18496,6 +18559,7 @@ func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sq } return c } + func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:31493:16: */ var a uintptr var b uintptr @@ -19346,6 +19410,7 @@ __3: ; return n } + func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:32123:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p + uintptr(0))) = (uint8(v & uint64(0x7f))) @@ -19607,6 +19672,7 @@ func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:32446:20: */ libc.Xmemcpy(tls, bp /* &x */, p, uint64(4)) return libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(bp /* x */))) } + func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:32464:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -19685,6 +19751,7 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:32548 } return int32(0) } + func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:32565:20: */ var magic U32 magic = (*Sqlite3)(unsafe.Pointer(db)).Fmagic @@ -19705,9 +19772,11 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32585:20: */ return libc.X__builtin_add_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } + func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32605:20: */ return libc.X__builtin_sub_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } + func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32620:20: */ return libc.X__builtin_mul_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } @@ -21973,6 +22042,7 @@ type UnixFile = unixFile /* sqlite3.c:33567:25 */ // method was called. If xOpen() is called from a different process id, // indicating that a fork() has occurred, the PRNG will be reset. var randomnessPid Pid_t = 0 /* sqlite3.c:33628:14 */ + func local_ioerr(tls *libc.TLS) { /* sqlite3.c:33812:13: */ Xsqlite3_io_error_hit++ @@ -22172,7 +22242,8 @@ var aSyscall = [29]unix_syscall{ FzName: ts + 4618, /* "ioctl" */ FpCurrent: uintptr(0), FpDefault: uintptr(0)}, -} /* sqlite3.c:33935:3 */ // End of the overrideable system calls +} /* sqlite3.c:33935:3 */ +// End of the overrideable system calls // On some systems, calls to fchown() will trigger a message in a security // log if they come from non-root processes. So avoid calling fchown() if @@ -22347,10 +22418,12 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3 // OK: enter(pLockInfo) // ERROR: enter(pLockInfo), enter(unixBigLock) var unixBigLock uintptr = uintptr(0) /* sqlite3.c:34284:22 */ + func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:34285:13: */ // Not a recursive mutex Xsqlite3_mutex_enter(tls, unixBigLock) } + func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:34289:13: */ Xsqlite3_mutex_leave(tls, unixBigLock) @@ -22551,7 +22624,8 @@ type unixFileId = struct { // A lists of all unixInodeInfo objects. // // Must hold unixBigLock in order to read or write this variable. -var inodeList uintptr = uintptr(0) /* sqlite3.c:34734:22 */ // All unixInodeInfo objects +var inodeList uintptr = uintptr(0) /* sqlite3.c:34734:22 */ +// All unixInodeInfo objects // // This function - unixLogErrorAtLine(), is only ever called via the macro @@ -22791,7 +22865,7 @@ func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { / var reserved int32 = 0 var pFile uintptr = id - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(14) << 8)) } @@ -23366,7 +23440,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:35634:12: */ if Xsqlite3OSTrace != 0 { Xsqlite3DebugPrintf(tls, ts+5052 /* "CLOSE %-3d\n" */, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).Fh)) } - Xsqlite3_open_file_count = Xsqlite3_open_file_count + (-1) + libc.AtomicAddInt32(&Xsqlite3_open_file_count, int32(-1)) Xsqlite3_free(tls, (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused) libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(UnixFile{}))) return 0 @@ -23427,11 +23501,13 @@ func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) in *(*int32)(unsafe.Pointer(pResOut)) = 0 return 0 } + func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:35725:12: */ _ = NotUsed _ = NotUsed2 return 0 } + func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:35729:12: */ _ = NotUsed _ = NotUsed2 @@ -23488,7 +23564,7 @@ func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 var reserved int32 = 0 var pFile uintptr = id - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(14) << 8)) } @@ -23719,7 +23795,7 @@ func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, for ok := true; ok; ok = (got > 0) { newOffset = I64(libc.Xlseek(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, int64(offset), 0)) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) newOffset = int64(-1) } @@ -23809,7 +23885,7 @@ func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, for ok := true; ok; ok = ((rc < 0) && ((*(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) == 4)) { var iSeek I64 = I64(libc.Xlseek(tls, fd, int64(iOff), 0)) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) iSeek = int64(-1) } @@ -23854,7 +23930,7 @@ func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite offset = offset + (Sqlite3_int64(wrote)) pBuf = ((pBuf) + uintptr(wrote)) } - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) wrote = -1 amt = 1 @@ -24045,7 +24121,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:37261 Xsqlite3DebugPrintf(tls, ts+5213 /* "SYNC %-3d\n" */, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).Fh)) } rc = full_fsync(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, isFullsync, isDataOnly) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) rc = 1 } @@ -24082,7 +24158,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:373 var pFile uintptr = id var rc int32 - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(6) << 8)) } @@ -24122,7 +24198,7 @@ func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c // var buf stat at bp, 128 rc = (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(5)*24 + 8 /* &.pCurrent */))))(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, bp /* &buf */) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) rc = 1 } @@ -24918,10 +24994,10 @@ shmpage_out: if !(int32((*UnixShmNode)(unsafe.Pointer(pShmNode)).FnRegion) > iRegion) { goto __25 } - *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(pShmNode)).FapRegion + uintptr(iRegion)*8)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(pShmNode)).FapRegion + uintptr(iRegion)*8)) goto __26 __25: - *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = uintptr(0) __26: ; if !(((*UnixShmNode)(unsafe.Pointer(pShmNode)).FisReadonly != 0) && (rc == 0)) { @@ -25502,7 +25578,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle - Xsqlite3_open_file_count = Xsqlite3_open_file_count + (+1) + libc.AtomicAddInt32(&Xsqlite3_open_file_count, int32(+1)) verifyDbFile(tls, pNew) } return rc @@ -25563,7 +25639,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3 // using the io-error infrastructure to test that SQLite handles this // function failing. *(*int8)(unsafe.Pointer(zBuf + uintptr(0))) = int8(0) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return 10 } @@ -26072,7 +26148,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in var rc int32 = 0 _ = NotUsed - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(10) << 8)) } @@ -26115,7 +26191,7 @@ func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pRes defer tls.Free(128) _ = NotUsed - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(13) << 8)) } @@ -26180,7 +26256,7 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO // using the io-error infrastructure to test that SQLite handles this // function failing. This function could fail if, for example, the // current working directory has been unlinked. - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return 1 } @@ -26312,6 +26388,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { } unixLeaveMutex(tls) } + func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:40000:13: */ // GCC with -pedantic-errors says that C90 does not allow a void* to be // cast into a pointer to a function. And yet the library dlsym() routine @@ -26335,6 +26412,7 @@ func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr }{libc.Xdlsym})) return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(&x)))(tls, p, zSym) } + func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:40023:13: */ _ = NotUsed libc.Xdlclose(tls, pHandle) @@ -26375,7 +26453,8 @@ func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sq // The following variable, if set to a non-zero value, is interpreted as // the number of seconds since 1970 and is used to set the result of // sqlite3OsCurrentTime() during testing. -var Xsqlite3_current_time int32 = 0 /* sqlite3.c:40111:16 */ // Fake system time in seconds since 1970. +var Xsqlite3_current_time int32 = 0 /* sqlite3.c:40111:16 */ +// Fake system time in seconds since 1970. // Find the current time (in Universal Coordinated Time). Write into *piNow // the current time and date as a Julian Day number times 86_400_000. In @@ -27085,6 +27164,7 @@ func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c: func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:48283:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 128 /* &.xGetLastError */))))(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } + func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:48286:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 136 /* &.xCurrentTimeInt64 */))))(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) } @@ -27332,6 +27412,7 @@ func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlit } return int32(0) } + func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:48618:20: */ return (libc.Bool32((p != uintptr(0)) && (Xsqlite3BitvecTestNotNull(tls, p, i) != 0))) } @@ -27839,6 +27920,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:49138:20: */ } return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 16 /* &.xInit */))))(tls, Xsqlite3Config.Fpcache2.FpArg) } + func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:49148:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. @@ -29280,6 +29362,7 @@ func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32 } return uintptr(0) } + func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:50793:15: */ var pCache uintptr = p var pPage uintptr @@ -29290,6 +29373,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) return pPage } + func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:50808:28: */ var pCache uintptr = p @@ -32763,7 +32847,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54657:12: */ libc.Xmemcpy(tls, (pPager + 136 /* &.dbFileVers */), dbFileVers, uint64(unsafe.Sizeof([16]int8{}))) } } - Xsqlite3_pager_readdb_count++ + atomic.AddInt32(&Xsqlite3_pager_readdb_count, 1) (*Pager)(unsafe.Pointer(pPager)).FnRead++ return rc @@ -33480,12 +33564,14 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno } var saved_cnt int32 /* sqlite3.c:55493:12: */ + func Xdisable_simulated_io_errors(tls *libc.TLS) { /* sqlite3.c:55494:6: */ - saved_cnt = Xsqlite3_io_error_pending - Xsqlite3_io_error_pending = -1 + saved_cnt = libc.AtomicLoadInt32(&Xsqlite3_io_error_pending) + libc.AtomicStoreInt32(&Xsqlite3_io_error_pending, int32(-1)) } + func Xenable_simulated_io_errors(tls *libc.TLS) { /* sqlite3.c:55498:6: */ - Xsqlite3_io_error_pending = saved_cnt + libc.AtomicStoreInt32(&Xsqlite3_io_error_pending, int32(saved_cnt)) } // Read the first N bytes from the beginning of the file into memory @@ -34024,7 +34110,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // Update any backup objects copying the contents of this pager. Xsqlite3BackupUpdate(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup, pgno, (*PgHdr)(unsafe.Pointer(pList)).FpData) - Xsqlite3_pager_writedb_count++ + atomic.AddInt32(&Xsqlite3_pager_writedb_count, 1) } else { } @@ -34095,6 +34181,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56159:12: * } return rc } + func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56195:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) @@ -35402,11 +35489,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57391: // Do not use this routine to release the last reference to page1 } + func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57403:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } + func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57406:21: */ var pPager uintptr @@ -35613,7 +35702,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite return rc } - Xsqlite3_pager_writej_count++ + atomic.AddInt32(&Xsqlite3_pager_writej_count, 1) *(*I64)(unsafe.Pointer(pPager + 96 /* &.journalOff */)) += (I64(8 + (*Pager)(unsafe.Pointer(pPager)).FpageSize)) (*Pager)(unsafe.Pointer(pPager)).FnRec++ @@ -36394,6 +36483,7 @@ func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { return rc } + func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:58562:20: */ if (nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint) && ((*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0) { @@ -37754,6 +37844,7 @@ func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintpt return rc } + func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:60010:12: */ if ((*Wal)(unsafe.Pointer(pWal)).FnWiData <= iPage) || ((libc.AssignPtrUintptr(ppPage, *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*8)))) == uintptr(0)) { return walIndexPageRealloc(tls, pWal, iPage, ppPage) @@ -37932,6 +38023,7 @@ func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite return rc } + func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:60272:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return @@ -37940,6 +38032,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: (1 | 4)) } + func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:60278:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { @@ -37950,6 +38043,7 @@ func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 return rc } + func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:60288:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return @@ -37966,6 +38060,7 @@ func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:60301:12: */ return (int32((iPage * U32(383)) & (U32((4096 * 2) - 1)))) } + func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:60306:12: */ return ((iPriorHash + 1) & ((4096 * 2) - 1)) } @@ -41919,11 +42014,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64358:29: */ } (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } + func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64372:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } + func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64375:29: */ var i int32 var p uintptr @@ -41935,6 +42032,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64375:29: */ } } } + func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64384:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) @@ -41949,6 +42047,7 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64384:21: * func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:64470:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } + func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:64474:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -42176,7 +42275,9 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: (*BtLock)(unsafe.Pointer(pLock)).FeLock = U8(1) } } -} // Forward reference +} + +// Forward reference // This routine is used inside of assert() only **** // @@ -42786,6 +42887,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn (*CellInfo)(unsafe.Pointer(pInfo)).FpPayload = uintptr(0) return } + func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:65649:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -42850,6 +42952,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt btreeParseCellAdjustSizeForOverflow(tls, pPage, pCell, pInfo) } } + func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:65717:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -42880,6 +42983,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u btreeParseCellAdjustSizeForOverflow(tls, pPage, pCell, pInfo) } } + func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:65754:13: */ (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((pPage + 128 /* &.xParseCell */))))(tls, pPage, ((*MemPage)(unsafe.Pointer((pPage))).FaData + uintptr((int32((*MemPage)(unsafe.Pointer((pPage))).FmaskPage) & int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(((*MemPage)(unsafe.Pointer((pPage))).FaCellIdx + uintptr((2 * (iCell))))))))))), pInfo) } @@ -42934,6 +43038,7 @@ func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c return U16(nSize) } + func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:65822:12: */ var pIter uintptr = (pCell + uintptr(4)) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -43786,6 +43891,7 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:66624:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } + func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:66627:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) @@ -43871,11 +43977,13 @@ func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66704:13: * Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } + func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66713:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } + func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66716:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -46185,6 +46293,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(1) return 0 } + func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:68920:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -46192,6 +46301,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK Xsqlite3BtreeLeave(tls, p) return rc } + func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:68933:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -46286,6 +46396,7 @@ func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:69070:21 *(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) |= U8((0x40)) } + func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:69074:21: */ *(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) &= libc.Uint8FromInt32((^libc.Int32(0x40))) @@ -46630,6 +46741,7 @@ func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf } return accessPayload(tls, pCur, offset, amt, pBuf, 0) } + func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:69495:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == 0 { @@ -47492,6 +47604,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70198:28: */ } return int32(0) } + func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:70268:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -47585,6 +47698,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70308:28: * } return rc } + func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:70357:20: */ _ = flags // Used in COMDB2 but not native SQLite @@ -48331,6 +48445,7 @@ __18: releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pTrunk */))) return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } + func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:70851:13: */ if (*(*int32)(unsafe.Pointer(pRC))) == 0 { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) @@ -48914,6 +49029,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:71397 *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer(((*CellArray)(unsafe.Pointer(p)).FpRef + 120 /* &.xCellSize */))))(tls, (*CellArray)(unsafe.Pointer(p)).FpRef, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FapCell + uintptr(N)*8))) return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } + func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:71403:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { @@ -51727,6 +51843,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags *(*Pgno)(unsafe.Pointer(piTable)) = *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)) return 0 } + func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:73729:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -51981,6 +52098,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 } return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) } + func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:73941:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -52308,6 +52426,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:74299:1 i = j } } + func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:74309:12: */ var j U32 var i U32 @@ -53778,6 +53897,7 @@ func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqli } } } + func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:75746:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) @@ -54275,6 +54395,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:76417:28: */ Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp /* &value */, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) return *(*I64)(unsafe.Pointer(bp /* value */)) } + func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:76422:20: */ var flags int32 @@ -54305,6 +54426,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:76445:31: Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp /* &val */, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) return *(*float64)(unsafe.Pointer(bp /* val */)) } + func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:76451:23: */ if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & 0x0008) != 0 { @@ -54503,6 +54625,7 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:76652:21 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(0x0001) } } + func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:76659:21: */ Xsqlite3VdbeMemSetNull(tls, p) } @@ -54620,6 +54743,7 @@ func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sq Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } + func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:76833:21: */ if (int32((*Mem)(unsafe.Pointer((pTo))).Fflags) & (0x2000 | 0x0400)) != 0 { @@ -54806,6 +54930,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, } return rc } + func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:77029:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -55608,6 +55733,7 @@ func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:77717: } return 0 } + func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:77720:20: */ var p uintptr = pVal @@ -55772,6 +55898,7 @@ func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) i return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) } + func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:77972:20: */ var i int32 var pOp uintptr @@ -55793,12 +55920,15 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, (*VdbeOp)(unsafe.Pointer(pOp)).FzComment = uintptr(0) return i } + func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:78009:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } + func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:78012:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, 0, 0) } + func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:78015:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } @@ -56051,6 +56181,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(p)).FaLabel + uintptr(j)*4)) = (*Vdbe)(unsafe.Pointer(v)).FnOp } } + func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:78302:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -56319,15 +56450,19 @@ __3: func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:78782:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } + func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78785:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } + func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78788:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } + func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78791:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } + func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:78794:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { @@ -56376,10 +56511,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:78849:29: */ } Xsqlite3DbFreeNN(tls, db, p) } + func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:78853:29: */ freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) Xsqlite3DbFreeNN(tls, db, p) } + func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:78857:13: */ switch p4type { @@ -56524,6 +56661,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-7) } } + func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:79034:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56609,6 +56747,7 @@ func vdbeVComment(tls *libc.TLS, p uintptr, zFormat uintptr, ap Va_list) { /* sq (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(((*Vdbe)(unsafe.Pointer(p)).FnOp-1))*32)).FzComment = Xsqlite3VMPrintf(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, zFormat, ap) } } + func Xsqlite3VdbeComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79123:21: */ var ap Va_list _ = ap @@ -56618,6 +56757,7 @@ func Xsqlite3VdbeComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) _ = ap } } + func Xsqlite3VdbeNoopComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79131:21: */ var ap Va_list _ = ap @@ -57003,6 +57143,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:79548:29: */ } } } + func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:79562:21: */ if ((*Vdbe)(unsafe.Pointer(p)).FlockMask) == YDbMask(0) { return @@ -57928,6 +58069,7 @@ func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3. } return rc } + func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:80715:20: */ if ((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0) && ((*Vdbe)(unsafe.Pointer(p)).FiStatement != 0) { return vdbeCloseStatement(tls, p, eOp) @@ -58359,7 +58501,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:812 if *(*int32)(unsafe.Pointer(bp /* res */)) != 0 { return Xsqlite3CorruptError(tls, 81251) } - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(0) return 0 @@ -58493,6 +58635,7 @@ func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3. } return U32(0) } + func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:81468:19: */ return sqlite3SmallTypeSizes[serial_type] @@ -58620,6 +58763,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { } return U32(8) } + func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { /* sqlite3.c:81629:20: */ switch serial_type { case U32(10): @@ -58723,6 +58867,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin } var aFlag = [2]U16{(U16(0x0010 | 0x1000)), (U16(0x0002 | 0x1000))} /* sqlite3.c:81711:24 */ + // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if // the first argument is a pointer to KeyInfo structure pKeyInfo. @@ -59318,6 +59463,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } + func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:82413:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -59920,6 +60066,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83026:12: */ } return int32(0) } + func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83034:12: */ if p == uintptr(0) { Xsqlite3_log(tls, 21, ts+7010 /* "API called with ..." */, 0) @@ -60057,21 +60204,27 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:831 } return uintptr(0) } + func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83172:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(1)) } + func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83175:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(2)) } + func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:83178:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } + func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83181:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } + func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:83184:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } + func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:83187:25: */ var pMem uintptr = pVal return func() uint32 { @@ -60081,6 +60234,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 return uint32(0) }() } + func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:83191:17: */ var p uintptr = pVal if ((((int32((*Mem)(unsafe.Pointer(p)).Fflags) & ((0xc1bf | 0x0200) | 0x8000)) == ((0x0001 | 0x0200) | 0x8000)) && @@ -60093,15 +60247,19 @@ func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr } return uintptr(0) } + func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83204:32: */ return Xsqlite3ValueText(tls, pVal, uint8(1)) } + func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83208:23: */ return Xsqlite3ValueText(tls, pVal, uint8(2)) } + func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83211:23: */ return Xsqlite3ValueText(tls, pVal, uint8(3)) } + func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83214:23: */ return Xsqlite3ValueText(tls, pVal, uint8(2)) } @@ -60237,6 +60395,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 Xsqlite3_result_error_toobig(tls, pCtx) } } + func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:83369:12: */ if xDel == uintptr(0) { @@ -60251,10 +60410,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) } return 18 } + func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83385:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(0), xDel) } + func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:83395:17: */ if n > uint64(0x7fffffff) { @@ -60263,32 +60424,39 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui setResultStrOrError(tls, pCtx, z, int32(n), uint8(0), xDel) } } + func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:83409:17: */ Xsqlite3VdbeMemSetDouble(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, rVal) } + func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:83413:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = 1 Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, n, uint8(1), libc.UintptrFromInt32(-1)) } + func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:83419:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = 1 Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, n, uint8(2), libc.UintptrFromInt32(-1)) } + func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:83425:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } + func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:83429:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } + func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:83433:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) } + func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:83437:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut @@ -60296,16 +60464,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(0x0001) Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } + func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:83449:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = (U8(eSubtype & uint32(0xff))) *(*U16)(unsafe.Pointer(pOut + 8 /* &.flags */)) |= U16((0x8000)) } + func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83455:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(1), xDel) } + func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:83464:17: */ if int32(enc) == 4 { @@ -60317,26 +60488,32 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui setResultStrOrError(tls, pCtx, z, int32(n), enc, xDel) } } + func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83481:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(2), xDel) } + func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83490:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(3), xDel) } + func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83499:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(2), xDel) } + func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:83509:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } + func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:83513:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } + func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:83517:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut @@ -60346,6 +60523,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, int32(n)) return 0 } + func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:83526:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { @@ -60950,36 +61128,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84107:16: */ var val int32 = Xsqlite3_value_bytes(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84112:16: */ var val int32 = Xsqlite3_value_bytes16(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:84117:19: */ var val float64 = Xsqlite3_value_double(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84122:16: */ var val int32 = Xsqlite3_value_int(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:84127:25: */ var val Sqlite_int64 = Xsqlite3_value_int64(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84132:32: */ var val uintptr = Xsqlite3_value_text(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84137:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if (int32((*Mem)(unsafe.Pointer(pOut)).Fflags) & 0x0800) != 0 { @@ -60989,11 +61174,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s columnMallocFailure(tls, pStmt) return pOut } + func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84147:23: */ var val uintptr = Xsqlite3_value_text16(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84153:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) @@ -61049,6 +61236,7 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84224:23: */ return columnName(tls, pStmt, N, 0, 0) } + func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84228:23: */ return columnName(tls, pStmt, N, 1, 0) } @@ -61061,6 +61249,7 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84247:23: */ return columnName(tls, pStmt, N, 0, 1) } + func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84251:23: */ return columnName(tls, pStmt, N, 1, 1) } @@ -61071,6 +61260,7 @@ func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84263:23: */ return columnName(tls, pStmt, N, 0, 2) } + func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84267:23: */ return columnName(tls, pStmt, N, 1, 2) } @@ -61081,6 +61271,7 @@ func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uint func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84277:23: */ return columnName(tls, pStmt, N, 0, 3) } + func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84281:23: */ return columnName(tls, pStmt, N, 1, 3) } @@ -61091,6 +61282,7 @@ func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84291:23: */ return columnName(tls, pStmt, N, 0, 4) } + func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84295:23: */ return columnName(tls, pStmt, N, 1, 4) } @@ -61185,6 +61377,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84396:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(0)) } + func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:84408:16: */ if nData > uint64(0x7fffffff) { @@ -61194,6 +61387,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, } return int32(0) } + func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:84422:16: */ var rc int32 var p uintptr = pStmt @@ -61204,9 +61398,11 @@ func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) } return rc } + func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:84432:16: */ return Xsqlite3_bind_int64(tls, p, i, I64(iValue)) } + func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:84435:16: */ var rc int32 var p uintptr = pStmt @@ -61217,6 +61413,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in } return rc } + func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84445:16: */ var rc int32 var p uintptr = pStmt @@ -61226,6 +61423,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite } return rc } + func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:84454:16: */ var rc int32 var p uintptr = pStmt @@ -61238,9 +61436,11 @@ func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, } return rc } + func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84472:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(1)) } + func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:84481:16: */ if nData > uint64(0x7fffffff) { @@ -61253,9 +61453,11 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, } return int32(0) } + func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84498:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(2)) } + func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:84508:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { @@ -61297,6 +61499,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) } return rc } + func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:84539:16: */ var rc int32 var p uintptr = pStmt @@ -61307,6 +61510,7 @@ func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int3 } return rc } + func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:84549:16: */ var rc int32 var p uintptr = pStmt @@ -61353,6 +61557,7 @@ func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName i } return Xsqlite3VListNameToNum(tls, (*Vdbe)(unsafe.Pointer(p)).FpVList, zName, nName) } + func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:84594:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } @@ -62018,6 +62223,7 @@ var Xsqlite3_sort_count int32 = 0 /* sqlite3.c:85308:16 */ // is working correctly. This variable has no function other than to // help verify the correct operation of the library. var Xsqlite3_max_blobsize int32 = 0 /* sqlite3.c:85319:16 */ + func updateMaxBlobsize(tls *libc.TLS, p uintptr) { /* sqlite3.c:85320:13: */ if ((int32((*Mem)(unsafe.Pointer(p)).Fflags) & (0x0002 | 0x0010)) != 0) && ((*Mem)(unsafe.Pointer(p)).Fn > Xsqlite3_max_blobsize) { Xsqlite3_max_blobsize = (*Mem)(unsafe.Pointer(p)).Fn @@ -62320,6 +62526,7 @@ func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(0x0004) return pOut } + func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:85966:12: */ var pOut uintptr @@ -69365,7 +69572,7 @@ __551: ; __535: ; - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) if !(oc >= 24) { goto __552 } @@ -70611,7 +70818,7 @@ __656: __114: // jump __115: // jump Xsqlite3_sort_count++ - Xsqlite3_search_count-- + atomic.AddInt32(&Xsqlite3_search_count, -1) *(*U32)(unsafe.Pointer((p + 212 /* &.aCounter */) + uintptr(2)*4))++ // Fall through into OP_Rewind /* no break */ @@ -70744,7 +70951,7 @@ next_tail: } (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(0) *(*U32)(unsafe.Pointer((p + 212 /* &.aCounter */) + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) goto jump_to_p2_and_check_for_interrupt __661: ; @@ -77491,6 +77698,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. } return 0 } + func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:97606:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) @@ -77649,6 +77857,7 @@ func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return 0 } + func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:97725:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- @@ -77710,6 +77919,7 @@ func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli } return 0 } + func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:97794:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -79995,6 +80205,7 @@ func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, p } return pExpr } + func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:99820:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -80523,6 +80734,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:100 } } } + func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:100413:13: */ if p != 0 { var i int32 @@ -80531,6 +80743,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } } + func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:100421:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { @@ -80912,6 +81125,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 Xsqlite3DbFreeNN(tls, db, p) } } + func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:100855:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) @@ -81172,12 +81386,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) } return 0 } + func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101135:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */)) { return 0 } return 1 } + func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:101138:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -81218,6 +81434,7 @@ func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr } return uintptr(0) } + func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:101171:25: */ var pNew uintptr var pItem uintptr @@ -81330,6 +81547,7 @@ func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintp } return pNew } + func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:101263:23: */ var pNew uintptr var i int32 @@ -81358,6 +81576,7 @@ func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } return pNew } + func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:101287:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -81662,6 +81881,7 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:1 } Xsqlite3DbFreeNN(tls, db, pList) } + func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:101584:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) @@ -81866,6 +82086,7 @@ func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / } return int32(0) } + func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:101788:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -86541,6 +86762,7 @@ func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* } return i } + func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:105750:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) @@ -91046,6 +91268,7 @@ __3: ; return 0 } + func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:110000:20: */ for pSelect != 0 { if Xsqlite3FixExprList(tls, pFix, (*Select)(unsafe.Pointer(pSelect)).FpEList) != 0 { @@ -91081,6 +91304,7 @@ func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* } return 0 } + func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:110038:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -91116,6 +91340,7 @@ func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqli } return 0 } + func Xsqlite3FixExprList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:110065:20: */ var i int32 var pItem uintptr @@ -92017,6 +92242,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11105 // Verify that no lookaside memory was used by schema tables } + func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:111108:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { @@ -99185,6 +99411,7 @@ func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } } } + func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:117525:13: */ var z1 uintptr var z2 uintptr @@ -100251,6 +100478,7 @@ func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } } } + func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118598:13: */ var p uintptr var type1 int32 @@ -100273,6 +100501,7 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } } + func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118623:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -100286,6 +100515,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118623:13: */ } } } + func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118636:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -100293,6 +100523,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118636:13: */ Xsqlite3_result_double(tls, context, ((*SumCtx)(unsafe.Pointer(p)).FrSum / float64((*SumCtx)(unsafe.Pointer(p)).Fcnt))) } } + func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118643:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -100327,6 +100558,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // expressed as a 32-bit integer. } + func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118681:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -100337,6 +100569,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118681:13: */ return int64(0) }()) } + func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:118687:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) @@ -100384,6 +100617,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3VdbeMemCopy(tls, pBest, pArg) } } + func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:118743:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) @@ -100396,9 +100630,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } } + func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:118754:13: */ minMaxValueFinalize(tls, context, 1) } + func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118760:13: */ minMaxValueFinalize(tls, context, 0) } @@ -100439,6 +100675,7 @@ func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } } + func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118800:13: */ var n int32 var pAccum uintptr @@ -100467,6 +100704,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } } + func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118831:13: */ var pAccum uintptr pAccum = Xsqlite3_aggregate_context(tls, context, 0) @@ -100481,6 +100719,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118831:1 } } } + func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:118846:13: */ var pAccum uintptr pAccum = Xsqlite3_aggregate_context(tls, context, 0) @@ -103214,6 +103453,7 @@ var autoIncEnd = [5]VdbeOpList{ Fp2: int8(0), Fp3: int8(0)}, } /* sqlite3.c:121025:29 */ + func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:121054:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) @@ -106585,6 +106825,7 @@ func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintpt var azEndings = [1]uintptr{ ts + 17088, /* "so" */ } /* sqlite3.c:124759:21 */ + func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:124882:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -107592,6 +107833,7 @@ var aPragmaName = [66]PragmaName{ FiArg: /* iArg: */ (uint64(0x00000001 | 0x08000000))}, } /* sqlite3.c:125260:25 */ + // Number of pragmas: 67 on by default, 77 total. //************* End of pragma.h ********************************************* @@ -112511,6 +112753,7 @@ end_prepare: Xsqlite3ParserReset(tls, bp+16 /* &sParse */) return rc } + func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129056:12: */ var rc int32 var cnt int32 = 0 @@ -112587,6 +112830,7 @@ func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppS // VERIFY: F13021 return rc } + func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129152:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works @@ -112599,6 +112843,7 @@ func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, return rc } + func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129170:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from @@ -112670,12 +112915,14 @@ func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, p // VERIFY: F13021 return rc } + func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129268:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0x80), ppStmt, pzTail) // VERIFY: F13021 return rc } + func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129280:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, @@ -116273,6 +116520,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite } return pExpr } + func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:132858:13: */ var i int32 if pList == uintptr(0) { @@ -116282,6 +116530,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: (*ExprList_item)(unsafe.Pointer((pList + 8 /* &.a */) + uintptr(i)*32)).FpExpr = substExpr(tls, pSubst, (*ExprList_item)(unsafe.Pointer((pList+8 /* &.a */)+uintptr(i)*32)).FpExpr) } } + func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:132868:13: */ var pSrc uintptr var pItem uintptr @@ -116340,6 +116589,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int *(*Bitmask)(unsafe.Pointer(pItem + 88 /* &.colUsed */)) |= (Xsqlite3ExprColUsed(tls, pExpr)) return 0 } + func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:132912:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -123552,6 +123802,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) return rc } + func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:139232:12: */ var z uintptr var ap Va_list @@ -128537,6 +128788,7 @@ __3: } return 0 } + func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:144979:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing @@ -129079,12 +129331,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas } return mask } + func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:145532:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } + func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:145535:24: */ var i int32 var mask Bitmask = uint64(0) @@ -135056,6 +135310,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151322:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { @@ -135087,6 +135342,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151354:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -135172,6 +135428,7 @@ error_out: Xsqlite3_result_error(tls, pCtx, ts+23754 /* "second argument ..." */, -1) } + func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151416:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -135194,6 +135451,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151444:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) @@ -135220,6 +135478,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = nArg _ = apArg } + func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151478:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -135242,6 +135501,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr (*CallCount)(unsafe.Pointer(p)).FnTotal++ } } + func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151506:13: */ var p uintptr _ = nArg @@ -135249,6 +135509,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) (*CallCount)(unsafe.Pointer(p)).FnStep++ } + func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151517:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -135276,6 +135537,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnTotal++ } } + func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151551:13: */ var p uintptr _ = nArg @@ -135283,6 +135545,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) (*CallCount)(unsafe.Pointer(p)).FnStep++ } + func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151562:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -135318,6 +135581,7 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } + func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151607:13: */ var p uintptr _ = nArg @@ -135325,6 +135589,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } + func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151618:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -135368,6 +135633,7 @@ func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) } } } + func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151671:13: */ var p uintptr _ = nArg @@ -135381,6 +135647,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } } + func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151688:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -135388,6 +135655,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151688:13: Xsqlite3_result_value(tls, pCtx, (*LastValueCtx)(unsafe.Pointer(p)).FpVal) } } + func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151695:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -135428,7 +135696,9 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 _ = n //NO_TEST _ = a //NO_TEST //NO_TEST -} //NO_TEST +} + +//NO_TEST func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:151744:13: */ _ = p /*no-op*/ } @@ -135837,6 +136107,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return 0 } + func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:151994:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect @@ -140164,7 +140435,8 @@ var yyRuleInfoNRhs = [385]int8{ int8(-4), // (382) anylist ::= anylist LP anylist RP int8(-2), // (383) anylist ::= anylist ANY int8(0), // (384) with ::= -} /* sqlite3.c:157063:26 */ // Forward Declaration +} /* sqlite3.c:157063:26 */ +// Forward Declaration // Perform a reduce action and the shift that must immediately // follow the reduce. @@ -142428,6 +142700,7 @@ var aKWCode = [145]uint8{ uint8(132), uint8(142), uint8(78), uint8(79), uint8(161), uint8(61), uint8(34), uint8(64), uint8(133), uint8(120), } /* sqlite3.c:159536:28 */ + // Hash table decoded: // 0: INSERT // 1: IS @@ -142734,6 +143007,7 @@ func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sq } return n } + func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:159871:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -142742,6 +143016,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c keywordCode(tls, z, n, bp /* &id */) return *(*int32)(unsafe.Pointer(bp /* id */)) } + func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:159877:16: */ if (i < 0) || (i >= 145) { return 1 @@ -142750,9 +143025,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt *(*int32)(unsafe.Pointer(pnName)) = int32(aKWLen[i]) return 0 } + func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:159883:16: */ return 145 } + func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:159884:16: */ return (libc.Bool32(59 != Xsqlite3KeywordCode(tls, zName, nName))) } @@ -142848,6 +143125,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:159987: } return 161 } + func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:159995:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -142861,6 +143139,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq } return 59 } + func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:160002:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -144665,6 +144944,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:162252:16: */ return sqlite3Close(tls, db, 0) } + func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:162253:16: */ return sqlite3Close(tls, db, 1) } @@ -145437,10 +145717,12 @@ func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int return createFunctionApi(tls, db, zFunc, nArg, enc, p, xSFunc, xStep, xFinal, uintptr(0), uintptr(0), uintptr(0)) } + func Xsqlite3_create_function_v2(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xDestroy uintptr) int32 { /* sqlite3.c:162955:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, xSFunc, xStep, xFinal, uintptr(0), uintptr(0), xDestroy) } + func Xsqlite3_create_window_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:162969:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) @@ -145862,6 +146144,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163559:16: } return ((*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask) } + func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163568:16: */ if (db != 0) && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { return Xsqlite3MisuseError(tls, 163570) @@ -145871,6 +146154,7 @@ func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1 } return (*Sqlite3)(unsafe.Pointer(db)).FerrCode } + func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163577:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno @@ -146753,6 +147037,7 @@ func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sq return openDatabase(tls, zFilename, ppDb, (uint32(0x00000002 | 0x00000004)), uintptr(0)) } + func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:164393:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } @@ -146876,14 +147161,17 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) libc.VaList(bp, zType, lineno, (uintptr(20)+Xsqlite3_sourceid(tls)))) return iErr } + func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164593:20: */ return Xsqlite3ReportError(tls, 11, lineno, ts+27702 /* "database corrupt..." */) } + func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164597:20: */ return Xsqlite3ReportError(tls, 21, lineno, ts+27722 /* "misuse" */) } + func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164601:20: */ return Xsqlite3ReportError(tls, 14, lineno, ts+27729 /* "cannot open file" */) @@ -147297,7 +147585,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit { var x int32 = 0 - rc = x + rc = libc.AtomicLoadInt32(&x) break } @@ -147656,6 +147944,7 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165356:23: */ return databaseName(tls, zFilename) } + func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165359:23: */ zFilename = databaseName(tls, zFilename) zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1)) @@ -147665,6 +147954,7 @@ func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sq } return (zFilename + uintptr(1)) } + func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165368:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1)) @@ -150790,6 +151080,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq jsonAppendValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) } } + func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:187331:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) @@ -150819,9 +151110,11 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: } Xsqlite3_result_subtype(tls, ctx, uint32(74)) } + func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187353:13: */ jsonArrayCompute(tls, ctx, 0) } + func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187356:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -150892,6 +151185,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s jsonAppendValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) } } + func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:187439:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) @@ -150920,9 +151214,11 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c } Xsqlite3_result_subtype(tls, ctx, uint32(74)) } + func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187460:13: */ jsonObjectCompute(tls, ctx, 0) } + func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187463:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -151860,10 +152156,12 @@ type RtreeValue = float32 /* sqlite3.c:188256:17 */ func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:188535:12: */ return ((int32(*(*U8)(unsafe.Pointer(p + uintptr(0)))) << 8) + int32(*(*U8)(unsafe.Pointer(p + uintptr(1))))) } + func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:188538:13: */ // p is always 4-byte aligned (*(*U32)(unsafe.Pointer(pCoord /* .Fu */))) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(p))) } + func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:188555:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -151881,6 +152179,7 @@ func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:188587:13: */ *(*U8)(unsafe.Pointer(p + uintptr(0))) = (U8((i >> 8) & 0xFF)) *(*U8)(unsafe.Pointer(p + uintptr(1))) = (U8((i >> 0) & 0xFF)) } + func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:188591:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -151893,6 +152192,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 libc.Xmemcpy(tls, p, bp /* &i */, uint64(4)) return 4 } + func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:188614:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -154532,6 +154832,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:191175:1 } return f } + func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:191183:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) @@ -156824,6 +157125,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } } + func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:193173:13: */ var p uintptr var pBBox uintptr @@ -162625,7 +162927,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:199480:16: (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 104 /* &.xShmMap */))))(tls, pDb, 0, (32 * 1024), 0, bp+16 /* &ptr */) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - *(*U32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 16 /* ptr */))) + uintptr(24)*4)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame + *(*U32)(unsafe.Pointer((libc.AtomicLoadPUintptr(bp + 16 /* ptr */)) + uintptr(24)*4)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame } } @@ -163776,13 +164078,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } if rc == 0 { - *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*8)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*8)) } else { - *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = uintptr(0) } } else { - rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 104 /* &.xShmMap */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 104 /* &.xShmMap */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) } return rc @@ -166733,7 +167035,8 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:210261:26 */ // Forward Declaration +} /* sqlite3.c:210261:26 */ +// Forward Declaration // Perform a reduce action and the shift that must immediately // follow the reduce. @@ -169439,6 +169742,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:213114:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } + func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:213115:13: */ Xsqlite3_free(tls, p) } @@ -172091,6 +172395,7 @@ func fts5ExprFunction(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr, bT func fts5ExprFunctionHr(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:215460:13: */ fts5ExprFunction(tls, pCtx, nArg, apVal, 0) } + func fts5ExprFunctionTcl(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:215467:13: */ fts5ExprFunction(tls, pCtx, nArg, apVal, 1) } @@ -174186,6 +174491,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FbEof } + func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:217680:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -174316,6 +174622,7 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FbEof } + func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:217803:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } @@ -174376,6 +174683,7 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:217867:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FiRowid } + func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:217870:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FiLeafPgno } @@ -179711,6 +180019,7 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:223403:12: */ return fts5InitVtab(tls, 0, db, pAux, argc, argv, ppVtab, pzErr) } + func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:223413:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -186560,6 +186869,7 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:229648:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } + func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:229658:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } diff --git a/lib/sqlite_windows_386.go b/lib/sqlite_windows_386.go index b3fbc94..d5b441a 100644 --- a/lib/sqlite_windows_386.go +++ b/lib/sqlite_windows_386.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -pkgname sqlite3 -o lib/sqlite_windows_386.go -trace-translation-units testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -pkgname sqlite3 -o lib/sqlite_windows_386.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. package sqlite3 import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -12,6 +13,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer const ( @@ -25761,6 +25763,7 @@ type Off64_t = int64 /* _mingw_off_t.h:15:39 */ type Off_t = Off64_t /* _mingw_off_t.h:24:17 */ // A pointer to an array of FILE type Fpos_t = int64 /* stdio.h:104:37 */ + func vsnwprintf(tls *libc.TLS, s uintptr, n Size_t, format uintptr, arg Va_list) int32 { /* stdio.h:1213:15: */ return libc.X_vsnwprintf(tls, s, n, format, arg) @@ -28411,6 +28414,7 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:21407:21: *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) + 40 /* &.mxValue */) + uintptr(op)*4)) = *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) /* &.nowValue */) + uintptr(op)*4)) } } + func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:21418:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) /* &.nowValue */) + uintptr(op)*4)) -= (Sqlite3StatValueType(N)) @@ -28451,6 +28455,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex // Prevent warning when SQLITE_THREADSAFE=0 return 0 } + func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:21477:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -30335,6 +30340,7 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:23048:21: */ (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = uintptr(0) } } + func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:23054:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30346,6 +30352,7 @@ func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I return (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 8 /* &.xRead */))))(tls, id, pBuf, amt, offset) } + func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:23058:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30357,9 +30364,11 @@ func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset return (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 12 /* &.xWrite */))))(tls, id, pBuf, amt, offset) } + func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:23062:20: */ return (*(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 16 /* &.xTruncate */))))(tls, id, size) } + func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:23065:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30374,6 +30383,7 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c } return 0 } + func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:23069:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30385,6 +30395,7 @@ func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sql return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 24 /* &.xFileSize */))))(tls, id, pSize) } + func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:23073:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30396,9 +30407,11 @@ func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 28 /* &.xLock */))))(tls, id, lockType) } + func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:23077:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 32 /* &.xUnlock */))))(tls, id, lockType) } + func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:23080:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30444,6 +30457,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in } return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 40 /* &.xFileControl */))))(tls, id, op, pArg) } + func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:23114:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 40 /* &.xFileControl */))))(tls, id, op, pArg) @@ -30459,18 +30473,23 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:23118: return 4096 }() } + func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:23122:20: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 48 /* &.xDeviceCharacteristics */))))(tls, id) } + func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:23126:20: */ return (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 56 /* &.xShmLock */))))(tls, id, offset, n, flags) } + func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:23129:21: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 60 /* &.xShmBarrier */))))(tls, id) } + func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:23132:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 64 /* &.xShmUnmap */))))(tls, id, deleteFlag) } + func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:23135:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30480,7 +30499,7 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten Xsqlite3_free(tls, pTstAlloc) } - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 52 /* &.xShmMap */))))(tls, id, iPage, pgsz, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 52 /* &.xShmMap */))))(tls, id, iPage, pgsz, bExtend, libc.AtomicLoadUintptr(&pp)) } // The real implementation of xFetch and xUnfetch @@ -30495,6 +30514,7 @@ func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr return (*(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 68 /* &.xFetch */))))(tls, id, iOff, iAmt, pp) } + func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:23153:20: */ return (*(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 72 /* &.xUnfetch */))))(tls, id, iOff, p) } @@ -30519,6 +30539,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f return rc } + func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:23188:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30530,6 +30551,7 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pVfs + 28 /* &.xDelete */))))(tls, pVfs, zPath, dirSync) } + func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:23193:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30541,6 +30563,7 @@ func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, p return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 32 /* &.xAccess */))))(tls, pVfs, zPath, flags, pResOut) } + func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:23202:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30553,18 +30576,23 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut *(*int8)(unsafe.Pointer(zPathOut + uintptr(0))) = int8(0) return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 36 /* &.xFullPathname */))))(tls, pVfs, zPath, nPathOut, zPathOut) } + func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:23213:21: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 40 /* &.xDlOpen */))))(tls, pVfs, zPath) } + func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:23216:21: */ (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pVfs + 44 /* &.xDlError */))))(tls, pVfs, nByte, zBufOut) } + func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:23219:21: */ return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 48 /* &.xDlSym */))))(tls, pVfs, pHdle, zSym) } + func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:23222:21: */ (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pVfs + 52 /* &.xDlClose */))))(tls, pVfs, pHandle) } + func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:23226:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.Xmemset(tls, zBufOut, 0, uint32(nByte)) @@ -30579,15 +30607,18 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint return int32(0) } + func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:23237:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pVfs + 60 /* &.xSleep */))))(tls, pVfs, nMicro) } + func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:23240:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 68 /* &.xGetLastError */))))(tls, pVfs, 0, uintptr(0)) } return 0 } + func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:23243:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -30625,6 +30656,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin } return rc } + func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:23283:21: */ Xsqlite3OsClose(tls, pFile) @@ -30816,6 +30848,7 @@ func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23474:21: */ (*(*func(*libc.TLS))(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Hooks)) /* &.xBenignBegin */))))(tls) } } + func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23480:21: */ if sqlite3Hooks.FxBenignEnd != 0 { @@ -31279,25 +31312,31 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:25985:17: */ func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:26048:12: */ return 0 } + func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:26049:12: */ return 0 } + func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26050:22: */ _ = id return uintptr(8) } + func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:26054:13: */ _ = p return } + func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:26055:13: */ _ = p return } + func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:26056:12: */ _ = p return 0 } + func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:26060:13: */ _ = p return @@ -31325,6 +31364,7 @@ var sMutex = Sqlite3_mutex_methods{ func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:26221:44: */ return Xsqlite3NoopMutex(tls) } + func local_ioerr(tls *libc.TLS) { /* sqlite3.c:26808:13: */ Xsqlite3_io_error_hit++ @@ -60993,6 +61033,7 @@ func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } return priorLimit } + func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:27437:17: */ if n < 0 { n = 0 @@ -61182,6 +61223,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:27620:17: */ } return Xsqlite3Malloc(tls, uint64(n)) } + func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:27626:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) @@ -61200,12 +61242,14 @@ func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27648:20: return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 12 /* &.xSize */))))(tls, p) } + func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:27652:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return 128 } + func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:27659:20: */ if db != 0 { @@ -61222,6 +61266,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit } return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 12 /* &.xSize */))))(tls, p) } + func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:27688:27: */ if p != 0 { @@ -61281,6 +61326,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:27725 Xsqlite3_free(tls, p) } + func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:27762:21: */ if p != 0 { @@ -61348,6 +61394,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 } // IMP: R-26507-47431 return Xsqlite3Realloc(tls, pOld, uint64(n)) } + func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:27831:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) @@ -61418,6 +61465,7 @@ func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3. return p } + func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:27905:21: */ var pBuf uintptr @@ -61475,6 +61523,7 @@ func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* } return dbReallocFinish(tls, db, p, n) } + func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:27977:29: */ var pNew uintptr = uintptr(0) @@ -61526,6 +61575,7 @@ func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3 } return zNew } + func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:28036:21: */ var zNew uintptr @@ -61887,12 +61937,14 @@ func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:28292:22: } return Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*4))) } + func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:28296:15: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return 0.0 } return Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*4))) } + func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:28300:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) @@ -63380,7 +63432,8 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 815 /* "thstndrd" */)) /* sqlite3.c:28611:29 */ // End of function +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 815 /* "thstndrd" */)) /* sqlite3.c:28611:29 */ +// End of function // Enlarge the memory allocation on a StrAccum object so that it is // able to accept at least N more bytes of text. @@ -63499,6 +63552,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:2915 (*StrAccum)(unsafe.Pointer(p)).FzText = zText return zText } + func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29169:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*int8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = int8(0) @@ -63704,6 +63758,7 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a *(*int8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp /* &acc */)).FnChar))) = int8(0) return zBuf } + func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:29369:17: */ var z uintptr var ap Va_list @@ -63953,12 +64008,14 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:30 // The sqlite3_test_control() interface calls these routines to // control the PRNG. var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:30353:42: */ + func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:30354:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uintptr(unsafe.Pointer(&sqlite3Prng)), uint32(unsafe.Sizeof(sqlite3Prng))) } + func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:30361:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), @@ -64051,7 +64108,9 @@ func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn ui } *(*uintptr)(unsafe.Pointer(ppThread)) = p return 0 -} // os_win.c +} + +// os_win.c // Get the results of the thread func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:30555:20: */ @@ -64985,6 +65044,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:31417:21: */ } *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) } + func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:31439:21: */ *(*U32)(unsafe.Pointer(p + 4 /* &.flags */)) |= (func() uint32 { @@ -65023,6 +65083,7 @@ func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* s } return Xsqlite3StrICmp(tls, zLeft, zRight) } + func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:31474:20: */ var a uintptr var b uintptr @@ -65048,6 +65109,7 @@ func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sq } return c } + func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:31493:16: */ var a uintptr var b uintptr @@ -65920,6 +65982,7 @@ __3: ; return n } + func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:32123:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p + uintptr(0))) = (uint8(v & uint64(0x7f))) @@ -66181,6 +66244,7 @@ func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:32446:20: */ libc.Xmemcpy(tls, bp /* &x */, p, uint32(4)) return libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(bp /* x */))) } + func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:32464:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -66259,6 +66323,7 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:32548 } return int32(0) } + func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:32565:20: */ var magic U32 magic = (*Sqlite3)(unsafe.Pointer(db)).Fmagic @@ -66279,9 +66344,11 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32585:20: */ return libc.X__builtin_add_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } + func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32605:20: */ return libc.X__builtin_sub_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } + func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32620:20: */ return libc.X__builtin_mul_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } @@ -67779,7 +67846,8 @@ var aSyscall = [80]win_syscall{ FzName: ts + 5640, /* "FlushViewOfFile" */ FpCurrent: 0, FpDefault: uintptr(0)}, -} /* sqlite3.c:42194:3 */ // End of the overrideable system calls +} /* sqlite3.c:42194:3 */ +// End of the overrideable system calls // This is the xSetSystemCall() method of sqlite3_vfs for all of the // "win32" VFSes. Return SQLITE_OK opon successfully updating the @@ -68456,7 +68524,7 @@ func winClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:44342:12: */ if rc != 0 { (*WinFile)(unsafe.Pointer(pFile)).Fh = uintptr(0) } - Xsqlite3_open_file_count = Xsqlite3_open_file_count + (-1) + libc.AtomicAddInt32(&Xsqlite3_open_file_count, int32(-1)) if Xsqlite3OSTrace != 0 { Xsqlite3DebugPrintf(tls, ts+5894 /* "CLOSE pid=%lu, p..." */, libc.VaList(bp+32, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(17)*12 + 4 /* &.pCurrent */))))(tls), pFile, (*WinFile)(unsafe.Pointer(pFile)).Fh, func() uintptr { if rc != 0 { @@ -68485,7 +68553,7 @@ func winRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_ // Number of bytes actually read from file *(*int32)(unsafe.Pointer(bp + 216 /* nRetry */)) = 0 // Number of retrys - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(1) << 8)) } @@ -68553,7 +68621,7 @@ func winWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3 var pFile uintptr = id // File handle *(*int32)(unsafe.Pointer(bp + 184 /* nRetry */)) = 0 // Number of retries - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(3) << 8)) } @@ -68661,7 +68729,7 @@ func winTruncate(tls *libc.TLS, id uintptr, nByte Sqlite3_int64) int32 { /* sqli return 0 } - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(6) << 8)) } @@ -68763,7 +68831,7 @@ func winSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:44676: } } rc = (*(*func(*libc.TLS, HANDLE) WINBOOL)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(13)*12 + 4 /* &.pCurrent */))))(tls, (*WinFile)(unsafe.Pointer(pFile)).Fh) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) rc = 0 } @@ -68791,7 +68859,7 @@ func winFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c: var pFile uintptr = id var rc int32 = 0 - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(7) << 8)) } @@ -69057,7 +69125,7 @@ func winCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* var res int32 var pFile uintptr = id - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(14) << 8)) } @@ -69407,9 +69475,11 @@ var winSysInfo SYSTEM_INFO /* sqlite3.c:45351:20: */ // assert( winShmMutexHeld() ); // winShmLeaveMutex() var winBigLock uintptr = uintptr(0) /* sqlite3.c:45368:22 */ + func winShmEnterMutex(tls *libc.TLS) { /* sqlite3.c:45369:13: */ Xsqlite3_mutex_enter(tls, winBigLock) } + func winShmLeaveMutex(tls *libc.TLS) { /* sqlite3.c:45372:13: */ Xsqlite3_mutex_leave(tls, winBigLock) } @@ -70097,10 +70167,10 @@ shmpage_out: iOffset1 = (iRegion * szRegion) iOffsetShift1 = (int32(DWORD(iOffset1) % winSysInfo.FdwAllocationGranularity)) p = (*ShmRegion)(unsafe.Pointer((*WinShmNode)(unsafe.Pointer(pShmNode)).FaRegion + uintptr(iRegion)*8)).FpMap - *(*uintptr)(unsafe.Pointer(pp)) = (p + uintptr(iOffsetShift1)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = (p + uintptr(iOffsetShift1)) goto __20 __19: - *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = uintptr(0) __20: ; if !(((*WinShmNode)(unsafe.Pointer(pShmNode)).FisReadonly != 0) && (rc == 0)) { @@ -70484,7 +70554,7 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { /* sqlit // It's odd to simulate an io-error here, but really this is just // using the io-error infrastructure to test that SQLite handles this // function failing. - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return 10 } @@ -70914,7 +70984,7 @@ func winOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, id uintptr, flags int32 (*WinFile)(unsafe.Pointer(pFile)).FmmapSize = int64(0) (*WinFile)(unsafe.Pointer(pFile)).FmmapSizeMax = Xsqlite3Config.FszMmap - Xsqlite3_open_file_count = Xsqlite3_open_file_count + (+1) + libc.AtomicAddInt32(&Xsqlite3_open_file_count, int32(+1)) return rc } @@ -70940,7 +71010,7 @@ func winDelete(tls *libc.TLS, pVfs uintptr, zFilename uintptr, syncDir int32) in _ = pVfs _ = syncDir - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(10) << 8)) } @@ -71032,7 +71102,7 @@ func winAccess(tls *libc.TLS, pVfs uintptr, zFilename uintptr, flags int32, pRes var zConverted uintptr _ = pVfs - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(13) << 8)) } @@ -71161,7 +71231,7 @@ func winFullPathname(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFull int32 // using the io-error infrastructure to test that SQLite handles this // function failing. This function could fail if, for example, the // current working directory has been unlinked. - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return 1 } @@ -71270,10 +71340,12 @@ func winDlOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr) uintptr { /* sqli Xsqlite3_free(tls, zConverted) return h } + func winDlError(tls *libc.TLS, pVfs uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:47461:13: */ _ = pVfs winGetLastErrorMsg(tls, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(26)*12 + 4 /* &.pCurrent */))))(tls), nBuf, zBufOut) } + func winDlSym(tls *libc.TLS, pVfs uintptr, pH uintptr, zSym uintptr) uintptr { /* sqlite3.c:47465:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -71286,6 +71358,7 @@ func winDlSym(tls *libc.TLS, pVfs uintptr, pH uintptr, zSym uintptr) uintptr { / } return proc } + func winDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:47473:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -71325,7 +71398,8 @@ func winSleep(tls *libc.TLS, pVfs uintptr, microsec int32) int32 { /* sqlite3.c: // The following variable, if set to a non-zero value, is interpreted as // the number of seconds since 1970 and is used to set the result of // sqlite3OsCurrentTime() during testing. -var Xsqlite3_current_time int32 = 0 /* sqlite3.c:47579:16 */ // Fake system time in seconds since 1970. +var Xsqlite3_current_time int32 = 0 /* sqlite3.c:47579:16 */ +// Fake system time in seconds since 1970. // Find the current time (in Universal Coordinated Time). Write into *piNow // the current time and date as a Julian Day number times 86_400_000. In @@ -71969,6 +72043,7 @@ func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c: func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:48283:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 68 /* &.xGetLastError */))))(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } + func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:48286:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 72 /* &.xCurrentTimeInt64 */))))(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) } @@ -72216,6 +72291,7 @@ func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlit } return int32(0) } + func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:48618:20: */ return (libc.Bool32((p != uintptr(0)) && (Xsqlite3BitvecTestNotNull(tls, p, i) != 0))) } @@ -72723,6 +72799,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:49138:20: */ } return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 100 /* &.pcache2 */ + 8 /* &.xInit */))))(tls, Xsqlite3Config.Fpcache2.FpArg) } + func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:49148:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. @@ -74164,6 +74241,7 @@ func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32 } return uintptr(0) } + func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:50793:15: */ var pCache uintptr = p var pPage uintptr @@ -74174,6 +74252,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) return pPage } + func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:50808:28: */ var pCache uintptr = p @@ -77647,7 +77726,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54657:12: */ libc.Xmemcpy(tls, (pPager + 104 /* &.dbFileVers */), dbFileVers, uint32(unsafe.Sizeof([16]int8{}))) } } - Xsqlite3_pager_readdb_count++ + atomic.AddInt32(&Xsqlite3_pager_readdb_count, 1) (*Pager)(unsafe.Pointer(pPager)).FnRead++ return rc @@ -78364,12 +78443,14 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno } var saved_cnt int32 /* sqlite3.c:55493:12: */ + func Xdisable_simulated_io_errors(tls *libc.TLS) { /* sqlite3.c:55494:6: */ - saved_cnt = Xsqlite3_io_error_pending - Xsqlite3_io_error_pending = -1 + saved_cnt = libc.AtomicLoadInt32(&Xsqlite3_io_error_pending) + libc.AtomicStoreInt32(&Xsqlite3_io_error_pending, int32(-1)) } + func Xenable_simulated_io_errors(tls *libc.TLS) { /* sqlite3.c:55498:6: */ - Xsqlite3_io_error_pending = saved_cnt + libc.AtomicStoreInt32(&Xsqlite3_io_error_pending, int32(saved_cnt)) } // Read the first N bytes from the beginning of the file into memory @@ -78908,7 +78989,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // Update any backup objects copying the contents of this pager. Xsqlite3BackupUpdate(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup, pgno, (*PgHdr)(unsafe.Pointer(pList)).FpData) - Xsqlite3_pager_writedb_count++ + atomic.AddInt32(&Xsqlite3_pager_writedb_count, 1) } else { } @@ -78979,6 +79060,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56159:12: * } return rc } + func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56195:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) @@ -80286,11 +80368,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57391: // Do not use this routine to release the last reference to page1 } + func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57403:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } + func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57406:21: */ var pPager uintptr @@ -80497,7 +80581,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite return rc } - Xsqlite3_pager_writej_count++ + atomic.AddInt32(&Xsqlite3_pager_writej_count, 1) *(*I64)(unsafe.Pointer(pPager + 72 /* &.journalOff */)) += (I64(8 + (*Pager)(unsafe.Pointer(pPager)).FpageSize)) (*Pager)(unsafe.Pointer(pPager)).FnRec++ @@ -81278,6 +81362,7 @@ func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { return rc } + func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:58562:20: */ if (nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint) && ((*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0) { @@ -82636,6 +82721,7 @@ func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintpt return rc } + func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:60010:12: */ if ((*Wal)(unsafe.Pointer(pWal)).FnWiData <= iPage) || ((libc.AssignPtrUintptr(ppPage, *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*4)))) == uintptr(0)) { return walIndexPageRealloc(tls, pWal, iPage, ppPage) @@ -82814,6 +82900,7 @@ func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite return rc } + func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:60272:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return @@ -82822,6 +82909,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: (1 | 4)) } + func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:60278:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { @@ -82832,6 +82920,7 @@ func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 return rc } + func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:60288:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return @@ -82848,6 +82937,7 @@ func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:60301:12: */ return (int32((iPage * U32(383)) & (U32((4096 * 2) - 1)))) } + func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:60306:12: */ return ((iPriorHash + 1) & ((4096 * 2) - 1)) } @@ -86799,11 +86889,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64358:29: */ } (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } + func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64372:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } + func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64375:29: */ var i int32 var p uintptr @@ -86815,6 +86907,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64375:29: */ } } } + func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64384:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) @@ -86829,6 +86922,7 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64384:21: * func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:64470:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } + func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:64474:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -87056,7 +87150,9 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: (*BtLock)(unsafe.Pointer(pLock)).FeLock = U8(1) } } -} // Forward reference +} + +// Forward reference // This routine is used inside of assert() only **** // @@ -87666,6 +87762,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn (*CellInfo)(unsafe.Pointer(pInfo)).FpPayload = uintptr(0) return } + func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:65649:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -87730,6 +87827,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt btreeParseCellAdjustSizeForOverflow(tls, pPage, pCell, pInfo) } } + func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:65717:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -87760,6 +87858,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u btreeParseCellAdjustSizeForOverflow(tls, pPage, pCell, pInfo) } } + func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:65754:13: */ (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((pPage + 80 /* &.xParseCell */))))(tls, pPage, ((*MemPage)(unsafe.Pointer((pPage))).FaData + uintptr((int32((*MemPage)(unsafe.Pointer((pPage))).FmaskPage) & int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(((*MemPage)(unsafe.Pointer((pPage))).FaCellIdx + uintptr((2 * (iCell))))))))))), pInfo) } @@ -87814,6 +87913,7 @@ func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c return U16(nSize) } + func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:65822:12: */ var pIter uintptr = (pCell + uintptr(4)) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -88666,6 +88766,7 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:66624:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } + func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:66627:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) @@ -88751,11 +88852,13 @@ func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66704:13: * Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } + func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66713:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } + func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66716:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -91065,6 +91168,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(1) return 0 } + func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:68920:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -91072,6 +91176,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK Xsqlite3BtreeLeave(tls, p) return rc } + func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:68933:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -91166,6 +91271,7 @@ func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:69070:21 *(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) |= U8((0x40)) } + func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:69074:21: */ *(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) &= libc.Uint8FromInt32((^libc.Int32(0x40))) @@ -91510,6 +91616,7 @@ func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf } return accessPayload(tls, pCur, offset, amt, pBuf, 0) } + func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:69495:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == 0 { @@ -92372,6 +92479,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70198:28: */ } return int32(0) } + func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:70268:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -92465,6 +92573,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70308:28: * } return rc } + func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:70357:20: */ _ = flags // Used in COMDB2 but not native SQLite @@ -93211,6 +93320,7 @@ __18: releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */))) return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } + func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:70851:13: */ if (*(*int32)(unsafe.Pointer(pRC))) == 0 { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) @@ -93793,6 +93903,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:71397 *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer(((*CellArray)(unsafe.Pointer(p)).FpRef + 76 /* &.xCellSize */))))(tls, (*CellArray)(unsafe.Pointer(p)).FpRef, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FapCell + uintptr(N)*4))) return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } + func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:71403:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { @@ -96606,6 +96717,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags *(*Pgno)(unsafe.Pointer(piTable)) = *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)) return 0 } + func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:73729:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -96860,6 +96972,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 } return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } + func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:73941:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -97187,6 +97300,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:74299:1 i = j } } + func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:74309:12: */ var j U32 var i U32 @@ -98657,6 +98771,7 @@ func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqli } } } + func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:75746:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) @@ -99154,6 +99269,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:76417:28: */ Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp /* &value */, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) return *(*I64)(unsafe.Pointer(bp /* value */)) } + func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:76422:20: */ var flags int32 @@ -99184,6 +99300,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:76445:31: Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp /* &val */, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) return *(*float64)(unsafe.Pointer(bp /* val */)) } + func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:76451:23: */ if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & 0x0008) != 0 { @@ -99382,6 +99499,7 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:76652:21 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(0x0001) } } + func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:76659:21: */ Xsqlite3VdbeMemSetNull(tls, p) } @@ -99499,6 +99617,7 @@ func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sq Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } + func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:76833:21: */ if (int32((*Mem)(unsafe.Pointer((pTo))).Fflags) & (0x2000 | 0x0400)) != 0 { @@ -99685,6 +99804,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, } return rc } + func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:77029:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -100486,6 +100606,7 @@ func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:77717: } return 0 } + func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:77720:20: */ var p uintptr = pVal @@ -100650,6 +100771,7 @@ func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) i return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) } + func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:77972:20: */ var i int32 var pOp uintptr @@ -100671,12 +100793,15 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, (*VdbeOp)(unsafe.Pointer(pOp)).FzComment = uintptr(0) return i } + func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:78009:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } + func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:78012:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, 0, 0) } + func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:78015:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } @@ -100929,6 +101054,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(p)).FaLabel + uintptr(j)*4)) = (*Vdbe)(unsafe.Pointer(v)).FnOp } } + func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:78302:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -101197,15 +101323,19 @@ __3: func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:78782:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } + func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78785:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } + func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78788:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } + func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78791:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } + func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:78794:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { @@ -101254,10 +101384,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:78849:29: */ } Xsqlite3DbFreeNN(tls, db, p) } + func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:78853:29: */ freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) Xsqlite3DbFreeNN(tls, db, p) } + func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:78857:13: */ switch p4type { @@ -101402,6 +101534,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-7) } } + func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:79034:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -101487,6 +101620,7 @@ func vdbeVComment(tls *libc.TLS, p uintptr, zFormat uintptr, ap Va_list) { /* sq (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(((*Vdbe)(unsafe.Pointer(p)).FnOp-1))*24)).FzComment = Xsqlite3VMPrintf(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, zFormat, ap) } } + func Xsqlite3VdbeComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79123:21: */ var ap Va_list _ = ap @@ -101496,6 +101630,7 @@ func Xsqlite3VdbeComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) _ = ap } } + func Xsqlite3VdbeNoopComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79131:21: */ var ap Va_list _ = ap @@ -101881,6 +102016,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:79548:29: */ } } } + func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:79562:21: */ if ((*Vdbe)(unsafe.Pointer(p)).FlockMask) == YDbMask(0) { return @@ -102807,6 +102943,7 @@ func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3. } return rc } + func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:80715:20: */ if ((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0) && ((*Vdbe)(unsafe.Pointer(p)).FiStatement != 0) { return vdbeCloseStatement(tls, p, eOp) @@ -103238,7 +103375,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:812 if *(*int32)(unsafe.Pointer(bp /* res */)) != 0 { return Xsqlite3CorruptError(tls, 81251) } - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(0) return 0 @@ -103372,6 +103509,7 @@ func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3. } return U32(0) } + func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:81468:19: */ return sqlite3SmallTypeSizes[serial_type] @@ -103499,6 +103637,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { } return U32(8) } + func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { /* sqlite3.c:81629:20: */ switch serial_type { case U32(10): @@ -103602,6 +103741,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin } var aFlag = [2]U16{(U16(0x0010 | 0x1000)), (U16(0x0002 | 0x1000))} /* sqlite3.c:81711:24 */ + // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if // the first argument is a pointer to KeyInfo structure pKeyInfo. @@ -104197,6 +104337,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } + func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:82413:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -104799,6 +104940,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83026:12: */ } return int32(0) } + func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83034:12: */ if p == uintptr(0) { Xsqlite3_log(tls, 21, ts+11577 /* "API called with ..." */, 0) @@ -104936,21 +105078,27 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:831 } return uintptr(0) } + func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83172:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(1)) } + func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83175:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(2)) } + func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:83178:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } + func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83181:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } + func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:83184:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } + func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:83187:25: */ var pMem uintptr = pVal return func() uint32 { @@ -104960,6 +105108,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 return uint32(0) }() } + func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:83191:17: */ var p uintptr = pVal if ((((int32((*Mem)(unsafe.Pointer(p)).Fflags) & ((0xc1bf | 0x0200) | 0x8000)) == ((0x0001 | 0x0200) | 0x8000)) && @@ -104972,15 +105121,19 @@ func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr } return uintptr(0) } + func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83204:32: */ return Xsqlite3ValueText(tls, pVal, uint8(1)) } + func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83208:23: */ return Xsqlite3ValueText(tls, pVal, uint8(2)) } + func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83211:23: */ return Xsqlite3ValueText(tls, pVal, uint8(3)) } + func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83214:23: */ return Xsqlite3ValueText(tls, pVal, uint8(2)) } @@ -105116,6 +105269,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 Xsqlite3_result_error_toobig(tls, pCtx) } } + func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:83369:12: */ if xDel == uintptr(0) { @@ -105130,10 +105284,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) } return 18 } + func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83385:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(0), xDel) } + func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:83395:17: */ if n > uint64(0x7fffffff) { @@ -105142,32 +105298,39 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui setResultStrOrError(tls, pCtx, z, int32(n), uint8(0), xDel) } } + func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:83409:17: */ Xsqlite3VdbeMemSetDouble(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, rVal) } + func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:83413:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = 1 Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, n, uint8(1), libc.UintptrFromInt32(-1)) } + func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:83419:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = 1 Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, n, uint8(2), libc.UintptrFromInt32(-1)) } + func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:83425:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } + func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:83429:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } + func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:83433:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) } + func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:83437:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut @@ -105175,16 +105338,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(0x0001) Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } + func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:83449:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = (U8(eSubtype & uint32(0xff))) *(*U16)(unsafe.Pointer(pOut + 8 /* &.flags */)) |= U16((0x8000)) } + func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83455:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(1), xDel) } + func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:83464:17: */ if int32(enc) == 4 { @@ -105196,26 +105362,32 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui setResultStrOrError(tls, pCtx, z, int32(n), enc, xDel) } } + func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83481:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(2), xDel) } + func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83490:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(3), xDel) } + func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83499:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(2), xDel) } + func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:83509:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } + func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:83513:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } + func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:83517:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut @@ -105225,6 +105397,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, int32(n)) return 0 } + func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:83526:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { @@ -105829,36 +106002,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84107:16: */ var val int32 = Xsqlite3_value_bytes(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84112:16: */ var val int32 = Xsqlite3_value_bytes16(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:84117:19: */ var val float64 = Xsqlite3_value_double(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84122:16: */ var val int32 = Xsqlite3_value_int(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:84127:25: */ var val Sqlite_int64 = Xsqlite3_value_int64(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84132:32: */ var val uintptr = Xsqlite3_value_text(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84137:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if (int32((*Mem)(unsafe.Pointer(pOut)).Fflags) & 0x0800) != 0 { @@ -105868,11 +106048,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s columnMallocFailure(tls, pStmt) return pOut } + func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84147:23: */ var val uintptr = Xsqlite3_value_text16(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84153:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) @@ -105928,6 +106110,7 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84224:23: */ return columnName(tls, pStmt, N, 0, 0) } + func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84228:23: */ return columnName(tls, pStmt, N, 1, 0) } @@ -105940,6 +106123,7 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84247:23: */ return columnName(tls, pStmt, N, 0, 1) } + func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84251:23: */ return columnName(tls, pStmt, N, 1, 1) } @@ -105950,6 +106134,7 @@ func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84263:23: */ return columnName(tls, pStmt, N, 0, 2) } + func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84267:23: */ return columnName(tls, pStmt, N, 1, 2) } @@ -105960,6 +106145,7 @@ func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uint func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84277:23: */ return columnName(tls, pStmt, N, 0, 3) } + func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84281:23: */ return columnName(tls, pStmt, N, 1, 3) } @@ -105970,6 +106156,7 @@ func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84291:23: */ return columnName(tls, pStmt, N, 0, 4) } + func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84295:23: */ return columnName(tls, pStmt, N, 1, 4) } @@ -106064,6 +106251,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84396:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(0)) } + func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:84408:16: */ if nData > uint64(0x7fffffff) { @@ -106073,6 +106261,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, } return int32(0) } + func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:84422:16: */ var rc int32 var p uintptr = pStmt @@ -106083,9 +106272,11 @@ func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) } return rc } + func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:84432:16: */ return Xsqlite3_bind_int64(tls, p, i, I64(iValue)) } + func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:84435:16: */ var rc int32 var p uintptr = pStmt @@ -106096,6 +106287,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in } return rc } + func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84445:16: */ var rc int32 var p uintptr = pStmt @@ -106105,6 +106297,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite } return rc } + func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:84454:16: */ var rc int32 var p uintptr = pStmt @@ -106117,9 +106310,11 @@ func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, } return rc } + func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84472:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(1)) } + func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:84481:16: */ if nData > uint64(0x7fffffff) { @@ -106132,9 +106327,11 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, } return int32(0) } + func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84498:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(2)) } + func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:84508:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { @@ -106176,6 +106373,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) } return rc } + func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:84539:16: */ var rc int32 var p uintptr = pStmt @@ -106186,6 +106384,7 @@ func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int3 } return rc } + func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:84549:16: */ var rc int32 var p uintptr = pStmt @@ -106232,6 +106431,7 @@ func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName i } return Xsqlite3VListNameToNum(tls, (*Vdbe)(unsafe.Pointer(p)).FpVList, zName, nName) } + func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:84594:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } @@ -106897,6 +107097,7 @@ var Xsqlite3_sort_count int32 = 0 /* sqlite3.c:85308:16 */ // is working correctly. This variable has no function other than to // help verify the correct operation of the library. var Xsqlite3_max_blobsize int32 = 0 /* sqlite3.c:85319:16 */ + func updateMaxBlobsize(tls *libc.TLS, p uintptr) { /* sqlite3.c:85320:13: */ if ((int32((*Mem)(unsafe.Pointer(p)).Fflags) & (0x0002 | 0x0010)) != 0) && ((*Mem)(unsafe.Pointer(p)).Fn > Xsqlite3_max_blobsize) { Xsqlite3_max_blobsize = (*Mem)(unsafe.Pointer(p)).Fn @@ -107199,6 +107400,7 @@ func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(0x0004) return pOut } + func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:85966:12: */ var pOut uintptr @@ -114244,7 +114446,7 @@ __551: ; __535: ; - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) if !(oc >= 24) { goto __552 } @@ -115490,7 +115692,7 @@ __656: __114: // jump __115: // jump Xsqlite3_sort_count++ - Xsqlite3_search_count-- + atomic.AddInt32(&Xsqlite3_search_count, -1) *(*U32)(unsafe.Pointer((p + 164 /* &.aCounter */) + uintptr(2)*4))++ // Fall through into OP_Rewind /* no break */ @@ -115623,7 +115825,7 @@ next_tail: } (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(0) *(*U32)(unsafe.Pointer((p + 164 /* &.aCounter */) + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) goto jump_to_p2_and_check_for_interrupt __661: ; @@ -122368,6 +122570,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. } return 0 } + func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:97606:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) @@ -122526,6 +122729,7 @@ func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return 0 } + func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:97725:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- @@ -122587,6 +122791,7 @@ func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli } return 0 } + func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:97794:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -124872,6 +125077,7 @@ func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, p } return pExpr } + func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:99820:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -125400,6 +125606,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:100 } } } + func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:100413:13: */ if p != 0 { var i int32 @@ -125408,6 +125615,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } } + func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:100421:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { @@ -125789,6 +125997,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 Xsqlite3DbFreeNN(tls, db, p) } } + func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:100855:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) @@ -126049,12 +126258,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) } return 0 } + func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101135:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 24 /* &.u */)) { return 0 } return 1 } + func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:101138:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -126095,6 +126306,7 @@ func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr } return uintptr(0) } + func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:101171:25: */ var pNew uintptr var pItem uintptr @@ -126207,6 +126419,7 @@ func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintp } return pNew } + func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:101263:23: */ var pNew uintptr var i int32 @@ -126235,6 +126448,7 @@ func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } return pNew } + func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:101287:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -126539,6 +126753,7 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:1 } Xsqlite3DbFreeNN(tls, db, pList) } + func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:101584:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) @@ -126743,6 +126958,7 @@ func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / } return int32(0) } + func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:101788:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -131418,6 +131634,7 @@ func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* } return i } + func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:105750:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) @@ -135924,6 +136141,7 @@ __3: ; return 0 } + func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:110000:20: */ for pSelect != 0 { if Xsqlite3FixExprList(tls, pFix, (*Select)(unsafe.Pointer(pSelect)).FpEList) != 0 { @@ -135959,6 +136177,7 @@ func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* } return 0 } + func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:110038:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -135994,6 +136213,7 @@ func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqli } return 0 } + func Xsqlite3FixExprList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:110065:20: */ var i int32 var pItem uintptr @@ -136895,6 +137115,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11105 // Verify that no lookaside memory was used by schema tables } + func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:111108:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { @@ -144063,6 +144284,7 @@ func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } } } + func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:117525:13: */ var z1 uintptr var z2 uintptr @@ -145129,6 +145351,7 @@ func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } } } + func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118598:13: */ var p uintptr var type1 int32 @@ -145151,6 +145374,7 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } } + func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118623:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -145164,6 +145388,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118623:13: */ } } } + func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118636:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -145171,6 +145396,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118636:13: */ Xsqlite3_result_double(tls, context, ((*SumCtx)(unsafe.Pointer(p)).FrSum / float64((*SumCtx)(unsafe.Pointer(p)).Fcnt))) } } + func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118643:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -145205,6 +145431,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // expressed as a 32-bit integer. } + func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118681:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -145215,6 +145442,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118681:13: */ return int64(0) }()) } + func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:118687:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) @@ -145262,6 +145490,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3VdbeMemCopy(tls, pBest, pArg) } } + func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:118743:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) @@ -145274,9 +145503,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } } + func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:118754:13: */ minMaxValueFinalize(tls, context, 1) } + func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118760:13: */ minMaxValueFinalize(tls, context, 0) } @@ -145317,6 +145548,7 @@ func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } } + func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118800:13: */ var n int32 var pAccum uintptr @@ -145345,6 +145577,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } } + func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118831:13: */ var pAccum uintptr pAccum = Xsqlite3_aggregate_context(tls, context, 0) @@ -145359,6 +145592,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118831:1 } } } + func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:118846:13: */ var pAccum uintptr pAccum = Xsqlite3_aggregate_context(tls, context, 0) @@ -148092,6 +148326,7 @@ var autoIncEnd = [5]VdbeOpList{ Fp2: int8(0), Fp3: int8(0)}, } /* sqlite3.c:121025:29 */ + func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:121054:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) @@ -151463,6 +151698,7 @@ func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintpt var azEndings = [1]uintptr{ ts + 21660, /* "dll" */ } /* sqlite3.c:124759:21 */ + func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:124882:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -152479,6 +152715,7 @@ var aPragmaName = [67]PragmaName{ FiArg: /* iArg: */ (uint64(0x00000001 | 0x08000000))}, } /* sqlite3.c:125260:25 */ + // Number of pragmas: 67 on by default, 77 total. //************* End of pragma.h ********************************************* @@ -157459,6 +157696,7 @@ end_prepare: Xsqlite3ParserReset(tls, bp+32 /* &sParse */) return rc } + func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129056:12: */ var rc int32 var cnt int32 = 0 @@ -157535,6 +157773,7 @@ func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppS // VERIFY: F13021 return rc } + func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129152:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works @@ -157547,6 +157786,7 @@ func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, return rc } + func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129170:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from @@ -157618,12 +157858,14 @@ func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, p // VERIFY: F13021 return rc } + func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129268:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0x80), ppStmt, pzTail) // VERIFY: F13021 return rc } + func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129280:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, @@ -161220,6 +161462,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite } return pExpr } + func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:132858:13: */ var i int32 if pList == uintptr(0) { @@ -161229,6 +161472,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: (*ExprList_item)(unsafe.Pointer((pList + 4 /* &.a */) + uintptr(i)*20)).FpExpr = substExpr(tls, pSubst, (*ExprList_item)(unsafe.Pointer((pList+4 /* &.a */)+uintptr(i)*20)).FpExpr) } } + func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:132868:13: */ var pSrc uintptr var pItem uintptr @@ -161287,6 +161531,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int *(*Bitmask)(unsafe.Pointer(pItem + 56 /* &.colUsed */)) |= (Xsqlite3ExprColUsed(tls, pExpr)) return 0 } + func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:132912:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -168498,6 +168743,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) return rc } + func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:139232:12: */ var z uintptr var ap Va_list @@ -173478,6 +173724,7 @@ __3: } return 0 } + func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:144979:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing @@ -174020,12 +174267,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas } return mask } + func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:145532:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } + func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:145535:24: */ var i int32 var mask Bitmask = uint64(0) @@ -179997,6 +180246,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151322:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { @@ -180028,6 +180278,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151354:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -180114,6 +180365,7 @@ error_out: Xsqlite3_result_error(tls, pCtx, ts+28353 /* "second argument ..." */, -1) } + func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151416:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -180136,6 +180388,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151444:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) @@ -180162,6 +180415,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = nArg _ = apArg } + func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151478:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -180184,6 +180438,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr (*CallCount)(unsafe.Pointer(p)).FnTotal++ } } + func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151506:13: */ var p uintptr _ = nArg @@ -180191,6 +180446,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) (*CallCount)(unsafe.Pointer(p)).FnStep++ } + func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151517:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -180218,6 +180474,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnTotal++ } } + func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151551:13: */ var p uintptr _ = nArg @@ -180225,6 +180482,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) (*CallCount)(unsafe.Pointer(p)).FnStep++ } + func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151562:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -180260,6 +180518,7 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } + func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151607:13: */ var p uintptr _ = nArg @@ -180267,6 +180526,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } + func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151618:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -180309,6 +180569,7 @@ func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) } } } + func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151671:13: */ var p uintptr _ = nArg @@ -180322,6 +180583,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } } + func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151688:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -180329,6 +180591,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151688:13: Xsqlite3_result_value(tls, pCtx, (*LastValueCtx)(unsafe.Pointer(p)).FpVal) } } + func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151695:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -180369,7 +180632,9 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 _ = n //NO_TEST _ = a //NO_TEST //NO_TEST -} //NO_TEST +} + +//NO_TEST func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:151744:13: */ _ = p /*no-op*/ } @@ -180777,6 +181042,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return 0 } + func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:151994:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24 /* &.u */)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect @@ -185100,7 +185366,8 @@ var yyRuleInfoNRhs = [385]int8{ int8(-4), // (382) anylist ::= anylist LP anylist RP int8(-2), // (383) anylist ::= anylist ANY int8(0), // (384) with ::= -} /* sqlite3.c:157063:26 */ // Forward Declaration +} /* sqlite3.c:157063:26 */ +// Forward Declaration // Perform a reduce action and the shift that must immediately // follow the reduce. @@ -187364,6 +187631,7 @@ var aKWCode = [145]uint8{ uint8(132), uint8(142), uint8(78), uint8(79), uint8(161), uint8(61), uint8(34), uint8(64), uint8(133), uint8(120), } /* sqlite3.c:159536:28 */ + // Hash table decoded: // 0: INSERT // 1: IS @@ -187670,6 +187938,7 @@ func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sq } return n } + func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:159871:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -187678,6 +187947,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c keywordCode(tls, z, n, bp /* &id */) return *(*int32)(unsafe.Pointer(bp /* id */)) } + func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:159877:16: */ if (i < 0) || (i >= 145) { return 1 @@ -187686,9 +187956,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt *(*int32)(unsafe.Pointer(pnName)) = int32(aKWLen[i]) return 0 } + func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:159883:16: */ return 145 } + func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:159884:16: */ return (libc.Bool32(59 != Xsqlite3KeywordCode(tls, zName, nName))) } @@ -187784,6 +188056,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:159987: } return 161 } + func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:159995:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -187797,6 +188070,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq } return 59 } + func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:160002:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -189601,6 +189875,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:162252:16: */ return sqlite3Close(tls, db, 0) } + func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:162253:16: */ return sqlite3Close(tls, db, 1) } @@ -190373,10 +190648,12 @@ func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int return createFunctionApi(tls, db, zFunc, nArg, enc, p, xSFunc, xStep, xFinal, uintptr(0), uintptr(0), uintptr(0)) } + func Xsqlite3_create_function_v2(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xDestroy uintptr) int32 { /* sqlite3.c:162955:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, xSFunc, xStep, xFinal, uintptr(0), uintptr(0), xDestroy) } + func Xsqlite3_create_window_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:162969:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) @@ -190798,6 +191075,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163559:16: } return ((*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask) } + func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163568:16: */ if (db != 0) && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { return Xsqlite3MisuseError(tls, 163570) @@ -190807,6 +191085,7 @@ func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1 } return (*Sqlite3)(unsafe.Pointer(db)).FerrCode } + func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163577:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno @@ -191688,6 +191967,7 @@ func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sq return openDatabase(tls, zFilename, ppDb, (uint32(0x00000002 | 0x00000004)), uintptr(0)) } + func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:164393:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } @@ -191811,14 +192091,17 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) libc.VaList(bp, zType, lineno, (uintptr(20)+Xsqlite3_sourceid(tls)))) return iErr } + func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164593:20: */ return Xsqlite3ReportError(tls, 11, lineno, ts+32308 /* "database corrupt..." */) } + func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164597:20: */ return Xsqlite3ReportError(tls, 21, lineno, ts+32328 /* "misuse" */) } + func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164601:20: */ return Xsqlite3ReportError(tls, 14, lineno, ts+32335 /* "cannot open file" */) @@ -192232,7 +192515,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit { var x int32 = 0 - rc = x + rc = libc.AtomicLoadInt32(&x) break } @@ -192591,6 +192874,7 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165356:23: */ return databaseName(tls, zFilename) } + func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165359:23: */ zFilename = databaseName(tls, zFilename) zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1)) @@ -192600,6 +192884,7 @@ func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sq } return (zFilename + uintptr(1)) } + func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165368:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1)) @@ -195724,6 +196009,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq jsonAppendValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*4))) } } + func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:187331:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) @@ -195753,9 +196039,11 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: } Xsqlite3_result_subtype(tls, ctx, uint32(74)) } + func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187353:13: */ jsonArrayCompute(tls, ctx, 0) } + func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187356:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -195826,6 +196114,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s jsonAppendValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*4))) } } + func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:187439:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) @@ -195854,9 +196143,11 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c } Xsqlite3_result_subtype(tls, ctx, uint32(74)) } + func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187460:13: */ jsonObjectCompute(tls, ctx, 0) } + func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187463:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -196790,10 +197081,12 @@ type RtreeValue = float32 /* sqlite3.c:188256:17 */ func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:188535:12: */ return ((int32(*(*U8)(unsafe.Pointer(p + uintptr(0)))) << 8) + int32(*(*U8)(unsafe.Pointer(p + uintptr(1))))) } + func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:188538:13: */ // p is always 4-byte aligned (*(*U32)(unsafe.Pointer(pCoord /* .Fu */))) = U32(libc.X_byteswap_ulong(tls, uint32(*(*U32)(unsafe.Pointer(p))))) } + func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:188555:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -196811,6 +197104,7 @@ func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:188587:13: */ *(*U8)(unsafe.Pointer(p + uintptr(0))) = (U8((i >> 8) & 0xFF)) *(*U8)(unsafe.Pointer(p + uintptr(1))) = (U8((i >> 0) & 0xFF)) } + func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:188591:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -196823,6 +197117,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 libc.Xmemcpy(tls, p, bp /* &i */, uint32(4)) return 4 } + func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:188614:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -199462,6 +199757,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:191175:1 } return f } + func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:191183:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) @@ -201751,6 +202047,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } } + func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:193173:13: */ var p uintptr var pBBox uintptr @@ -207542,7 +207839,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:199480:16: (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 52 /* &.xShmMap */))))(tls, pDb, 0, (32 * 1024), 0, bp+24 /* &ptr */) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - *(*U32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 24 /* ptr */))) + uintptr(24)*4)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame + *(*U32)(unsafe.Pointer((libc.AtomicLoadPUintptr(bp + 24 /* ptr */)) + uintptr(24)*4)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame } } @@ -208693,13 +208990,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } if rc == 0 { - *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*4)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*4)) } else { - *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = uintptr(0) } } else { - rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 52 /* &.xShmMap */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 52 /* &.xShmMap */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) } return rc @@ -211633,7 +211930,8 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:210261:26 */ // Forward Declaration +} /* sqlite3.c:210261:26 */ +// Forward Declaration // Perform a reduce action and the shift that must immediately // follow the reduce. @@ -214305,6 +214603,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:213114:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } + func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:213115:13: */ Xsqlite3_free(tls, p) } @@ -216958,6 +217257,7 @@ func fts5ExprFunction(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr, bT func fts5ExprFunctionHr(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:215460:13: */ fts5ExprFunction(tls, pCtx, nArg, apVal, 0) } + func fts5ExprFunctionTcl(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:215467:13: */ fts5ExprFunction(tls, pCtx, nArg, apVal, 1) } @@ -219057,6 +219357,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FbEof } + func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:217680:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -219187,6 +219488,7 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FbEof } + func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:217803:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } @@ -219247,6 +219549,7 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:217867:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FiRowid } + func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:217870:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FiLeafPgno } @@ -224582,6 +224885,7 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:223403:12: */ return fts5InitVtab(tls, 0, db, pAux, argc, argv, ppVtab, pzErr) } + func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:223413:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -231426,6 +231730,7 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:229648:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } + func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:229658:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } diff --git a/lib/sqlite_windows_amd64.go b/lib/sqlite_windows_amd64.go index 0659722..4e3f964 100644 --- a/lib/sqlite_windows_amd64.go +++ b/lib/sqlite_windows_amd64.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -pkgname sqlite3 -o lib/sqlite_windows_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -pkgname sqlite3 -o lib/sqlite_windows_amd64.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-amalgamation-3330000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. package sqlite3 import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -12,6 +13,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer const ( @@ -21675,8 +21677,14 @@ type Size_t = uint64 /* :9:23 */ type Wchar_t = uint16 /* :15:24 */ -type X__int128_t = [2]int64 /* :21:24 */ //TODO -type X__uint128_t = [2]uint64 /* :22:25 */ //TODO +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 type X__builtin_va_list = uintptr /* :47:14 */ type X__float128 = float64 /* :48:21 */ @@ -25794,6 +25802,7 @@ type Off64_t = int64 /* _mingw_off_t.h:15:39 */ type Off_t = Off64_t /* _mingw_off_t.h:24:17 */ type Fpos_t = int64 /* stdio.h:104:37 */ + func vsnwprintf(tls *libc.TLS, s uintptr, n Size_t, format uintptr, arg Va_list) int32 { /* stdio.h:1213:15: */ return libc.X_vsnwprintf(tls, s, n, format, arg) @@ -28479,6 +28488,7 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:21407:21: *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 /* &.mxValue */) + uintptr(op)*8)) = *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) /* &.nowValue */) + uintptr(op)*8)) } } + func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:21418:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) /* &.nowValue */) + uintptr(op)*8)) -= (Sqlite3StatValueType(N)) @@ -28519,6 +28529,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex // Prevent warning when SQLITE_THREADSAFE=0 return 0 } + func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:21477:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -30406,6 +30417,7 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:23048:21: */ (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = uintptr(0) } } + func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:23054:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30417,6 +30429,7 @@ func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I return (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 16 /* &.xRead */))))(tls, id, pBuf, amt, offset) } + func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:23058:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30428,9 +30441,11 @@ func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset return (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 24 /* &.xWrite */))))(tls, id, pBuf, amt, offset) } + func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:23062:20: */ return (*(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 32 /* &.xTruncate */))))(tls, id, size) } + func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:23065:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30445,6 +30460,7 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c } return 0 } + func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:23069:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30456,6 +30472,7 @@ func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sql return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 48 /* &.xFileSize */))))(tls, id, pSize) } + func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:23073:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30467,9 +30484,11 @@ func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 56 /* &.xLock */))))(tls, id, lockType) } + func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:23077:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 64 /* &.xUnlock */))))(tls, id, lockType) } + func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:23080:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30515,6 +30534,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in } return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 80 /* &.xFileControl */))))(tls, id, op, pArg) } + func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:23114:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 80 /* &.xFileControl */))))(tls, id, op, pArg) @@ -30530,18 +30550,23 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:23118: return 4096 }() } + func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:23122:20: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 96 /* &.xDeviceCharacteristics */))))(tls, id) } + func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:23126:20: */ return (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 112 /* &.xShmLock */))))(tls, id, offset, n, flags) } + func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:23129:21: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 120 /* &.xShmBarrier */))))(tls, id) } + func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:23132:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 128 /* &.xShmUnmap */))))(tls, id, deleteFlag) } + func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:23135:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(id != 0) || !(Xsqlite3JournalIsInMemory(tls, id) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30551,7 +30576,7 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten Xsqlite3_free(tls, pTstAlloc) } - return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 104 /* &.xShmMap */))))(tls, id, iPage, pgsz, bExtend, pp) + return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 104 /* &.xShmMap */))))(tls, id, iPage, pgsz, bExtend, libc.AtomicLoadUintptr(&pp)) } // The real implementation of xFetch and xUnfetch @@ -30566,6 +30591,7 @@ func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr return (*(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 136 /* &.xFetch */))))(tls, id, iOff, iAmt, pp) } + func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:23153:20: */ return (*(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 144 /* &.xUnfetch */))))(tls, id, iOff, p) } @@ -30590,6 +30616,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f return rc } + func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:23188:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30601,6 +30628,7 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pVfs + 48 /* &.xDelete */))))(tls, pVfs, zPath, dirSync) } + func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:23193:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30612,6 +30640,7 @@ func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, p return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 56 /* &.xAccess */))))(tls, pVfs, zPath, flags, pResOut) } + func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:23202:20: */ if (Xsqlite3_memdebug_vfs_oom_test != 0) && (!(0 != 0) || !(Xsqlite3JournalIsInMemory(tls, uintptr(0)) != 0)) { var pTstAlloc uintptr = Xsqlite3Malloc(tls, uint64(10)) @@ -30624,18 +30653,23 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut *(*int8)(unsafe.Pointer(zPathOut + uintptr(0))) = int8(0) return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 64 /* &.xFullPathname */))))(tls, pVfs, zPath, nPathOut, zPathOut) } + func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:23213:21: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 72 /* &.xDlOpen */))))(tls, pVfs, zPath) } + func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:23216:21: */ (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pVfs + 80 /* &.xDlError */))))(tls, pVfs, nByte, zBufOut) } + func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:23219:21: */ return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 88 /* &.xDlSym */))))(tls, pVfs, pHdle, zSym) } + func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:23222:21: */ (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pVfs + 96 /* &.xDlClose */))))(tls, pVfs, pHandle) } + func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:23226:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.Xmemset(tls, zBufOut, 0, uint64(nByte)) @@ -30650,15 +30684,18 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint return int32(0) } + func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:23237:20: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pVfs + 112 /* &.xSleep */))))(tls, pVfs, nMicro) } + func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:23240:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 128 /* &.xGetLastError */))))(tls, pVfs, 0, uintptr(0)) } return 0 } + func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:23243:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -30696,6 +30733,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin } return rc } + func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:23283:21: */ Xsqlite3OsClose(tls, pFile) @@ -30887,6 +30925,7 @@ func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23474:21: */ (*(*func(*libc.TLS))(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Hooks)) /* &.xBenignBegin */))))(tls) } } + func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23480:21: */ if sqlite3Hooks.FxBenignEnd != 0 { @@ -31350,25 +31389,31 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:25985:17: */ func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:26048:12: */ return 0 } + func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:26049:12: */ return 0 } + func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26050:22: */ _ = id return uintptr(8) } + func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:26054:13: */ _ = p return } + func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:26055:13: */ _ = p return } + func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:26056:12: */ _ = p return 0 } + func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:26060:13: */ _ = p return @@ -31396,6 +31441,7 @@ var sMutex = Sqlite3_mutex_methods{ func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:26221:44: */ return Xsqlite3NoopMutex(tls) } + func local_ioerr(tls *libc.TLS) { /* sqlite3.c:26808:13: */ Xsqlite3_io_error_hit++ @@ -61985,6 +62031,7 @@ func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } return priorLimit } + func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:27437:17: */ if n < 0 { n = 0 @@ -62174,6 +62221,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:27620:17: */ } return Xsqlite3Malloc(tls, uint64(n)) } + func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:27626:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) @@ -62192,12 +62240,14 @@ func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27648:20: return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 24 /* &.xSize */))))(tls, p) } + func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:27652:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return 128 } + func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:27659:20: */ if db != 0 { @@ -62214,6 +62264,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit } return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 24 /* &.xSize */))))(tls, p) } + func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:27688:27: */ if p != 0 { @@ -62273,6 +62324,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:27725 Xsqlite3_free(tls, p) } + func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:27762:21: */ if p != 0 { @@ -62340,6 +62392,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 } // IMP: R-26507-47431 return Xsqlite3Realloc(tls, pOld, uint64(n)) } + func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:27831:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) @@ -62410,6 +62463,7 @@ func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3. return p } + func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:27905:21: */ var pBuf uintptr @@ -62467,6 +62521,7 @@ func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* } return dbReallocFinish(tls, db, p, n) } + func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:27977:29: */ var pNew uintptr = uintptr(0) @@ -62518,6 +62573,7 @@ func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3 } return zNew } + func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:28036:21: */ var zNew uintptr @@ -62879,12 +62935,14 @@ func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:28292:22: } return Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*8))) } + func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:28296:15: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return 0.0 } return Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*8))) } + func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:28300:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) @@ -64372,7 +64430,8 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 815 /* "thstndrd" */)) /* sqlite3.c:28611:29 */ // End of function +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 815 /* "thstndrd" */)) /* sqlite3.c:28611:29 */ +// End of function // Enlarge the memory allocation on a StrAccum object so that it is // able to accept at least N more bytes of text. @@ -64491,6 +64550,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:2915 (*StrAccum)(unsafe.Pointer(p)).FzText = zText return zText } + func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29169:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*int8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = int8(0) @@ -64696,6 +64756,7 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a *(*int8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp /* &acc */)).FnChar))) = int8(0) return zBuf } + func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:29369:17: */ var z uintptr var ap Va_list @@ -64945,12 +65006,14 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:30 // The sqlite3_test_control() interface calls these routines to // control the PRNG. var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:30353:42: */ + func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:30354:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uintptr(unsafe.Pointer(&sqlite3Prng)), uint64(unsafe.Sizeof(sqlite3Prng))) } + func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:30361:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), @@ -65043,7 +65106,9 @@ func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn ui } *(*uintptr)(unsafe.Pointer(ppThread)) = p return 0 -} // os_win.c +} + +// os_win.c // Get the results of the thread func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:30555:20: */ @@ -65978,6 +66043,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:31417:21: */ } *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) } + func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:31439:21: */ *(*U32)(unsafe.Pointer(p + 4 /* &.flags */)) |= (func() uint32 { @@ -66016,6 +66082,7 @@ func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* s } return Xsqlite3StrICmp(tls, zLeft, zRight) } + func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:31474:20: */ var a uintptr var b uintptr @@ -66041,6 +66108,7 @@ func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sq } return c } + func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:31493:16: */ var a uintptr var b uintptr @@ -66913,6 +66981,7 @@ __3: ; return n } + func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:32123:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p + uintptr(0))) = (uint8(v & uint64(0x7f))) @@ -67174,6 +67243,7 @@ func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:32446:20: */ libc.Xmemcpy(tls, bp /* &x */, p, uint64(4)) return libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(bp /* x */))) } + func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:32464:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -67252,6 +67322,7 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:32548 } return int32(0) } + func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:32565:20: */ var magic U32 magic = (*Sqlite3)(unsafe.Pointer(db)).Fmagic @@ -67272,9 +67343,11 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32585:20: */ return libc.X__builtin_add_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } + func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32605:20: */ return libc.X__builtin_sub_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } + func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32620:20: */ return libc.X__builtin_mul_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } @@ -68774,7 +68847,8 @@ var aSyscall = [80]win_syscall{ FzName: ts + 5640, /* "FlushViewOfFile" */ FpCurrent: 0, FpDefault: uintptr(0)}, -} /* sqlite3.c:42194:3 */ // End of the overrideable system calls +} /* sqlite3.c:42194:3 */ +// End of the overrideable system calls // This is the xSetSystemCall() method of sqlite3_vfs for all of the // "win32" VFSes. Return SQLITE_OK opon successfully updating the @@ -69451,7 +69525,7 @@ func winClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:44342:12: */ if rc != 0 { (*WinFile)(unsafe.Pointer(pFile)).Fh = uintptr(0) } - Xsqlite3_open_file_count = Xsqlite3_open_file_count + (-1) + libc.AtomicAddInt32(&Xsqlite3_open_file_count, int32(-1)) if Xsqlite3OSTrace != 0 { Xsqlite3DebugPrintf(tls, ts+5894 /* "CLOSE pid=%lu, p..." */, libc.VaList(bp+32, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(17)*24 + 8 /* &.pCurrent */))))(tls), pFile, (*WinFile)(unsafe.Pointer(pFile)).Fh, func() uintptr { if rc != 0 { @@ -69480,7 +69554,7 @@ func winRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_ // Number of bytes actually read from file *(*int32)(unsafe.Pointer(bp + 228 /* nRetry */)) = 0 // Number of retrys - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(1) << 8)) } @@ -69548,7 +69622,7 @@ func winWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3 var pFile uintptr = id // File handle *(*int32)(unsafe.Pointer(bp + 196 /* nRetry */)) = 0 // Number of retries - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(3) << 8)) } @@ -69656,7 +69730,7 @@ func winTruncate(tls *libc.TLS, id uintptr, nByte Sqlite3_int64) int32 { /* sqli return 0 } - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(6) << 8)) } @@ -69758,7 +69832,7 @@ func winSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:44676: } } rc = (*(*func(*libc.TLS, HANDLE) WINBOOL)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(13)*24 + 8 /* &.pCurrent */))))(tls, (*WinFile)(unsafe.Pointer(pFile)).Fh) - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) rc = 0 } @@ -69786,7 +69860,7 @@ func winFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c: var pFile uintptr = id var rc int32 = 0 - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(7) << 8)) } @@ -70052,7 +70126,7 @@ func winCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* var res int32 var pFile uintptr = id - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(14) << 8)) } @@ -70402,9 +70476,11 @@ var winSysInfo SYSTEM_INFO /* sqlite3.c:45351:20: */ // assert( winShmMutexHeld() ); // winShmLeaveMutex() var winBigLock uintptr = uintptr(0) /* sqlite3.c:45368:22 */ + func winShmEnterMutex(tls *libc.TLS) { /* sqlite3.c:45369:13: */ Xsqlite3_mutex_enter(tls, winBigLock) } + func winShmLeaveMutex(tls *libc.TLS) { /* sqlite3.c:45372:13: */ Xsqlite3_mutex_leave(tls, winBigLock) } @@ -71092,10 +71168,10 @@ shmpage_out: iOffset1 = (iRegion * szRegion) iOffsetShift1 = (int32(DWORD(iOffset1) % winSysInfo.FdwAllocationGranularity)) p = (*ShmRegion)(unsafe.Pointer((*WinShmNode)(unsafe.Pointer(pShmNode)).FaRegion + uintptr(iRegion)*16)).FpMap - *(*uintptr)(unsafe.Pointer(pp)) = (p + uintptr(iOffsetShift1)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = (p + uintptr(iOffsetShift1)) goto __20 __19: - *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = uintptr(0) __20: ; if !(((*WinShmNode)(unsafe.Pointer(pShmNode)).FisReadonly != 0) && (rc == 0)) { @@ -71479,7 +71555,7 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { /* sqlit // It's odd to simulate an io-error here, but really this is just // using the io-error infrastructure to test that SQLite handles this // function failing. - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return 10 } @@ -71909,7 +71985,7 @@ func winOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, id uintptr, flags int32 (*WinFile)(unsafe.Pointer(pFile)).FmmapSize = int64(0) (*WinFile)(unsafe.Pointer(pFile)).FmmapSizeMax = Xsqlite3Config.FszMmap - Xsqlite3_open_file_count = Xsqlite3_open_file_count + (+1) + libc.AtomicAddInt32(&Xsqlite3_open_file_count, int32(+1)) return rc } @@ -71935,7 +72011,7 @@ func winDelete(tls *libc.TLS, pVfs uintptr, zFilename uintptr, syncDir int32) in _ = pVfs _ = syncDir - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(10) << 8)) } @@ -72027,7 +72103,7 @@ func winAccess(tls *libc.TLS, pVfs uintptr, zFilename uintptr, flags int32, pRes var zConverted uintptr _ = pVfs - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return (10 | (int32(13) << 8)) } @@ -72156,7 +72232,7 @@ func winFullPathname(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFull int32 // using the io-error infrastructure to test that SQLite handles this // function failing. This function could fail if, for example, the // current working directory has been unlinked. - if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecInt32(&Xsqlite3_io_error_pending, 1) == 1) { + if ((Xsqlite3_io_error_persist != 0) && (Xsqlite3_io_error_hit != 0)) || (libc.PostDecAtomicInt32(&Xsqlite3_io_error_pending, 1) == 1) { local_ioerr(tls) return 1 } @@ -72265,10 +72341,12 @@ func winDlOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr) uintptr { /* sqli Xsqlite3_free(tls, zConverted) return h } + func winDlError(tls *libc.TLS, pVfs uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:47461:13: */ _ = pVfs winGetLastErrorMsg(tls, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(26)*24 + 8 /* &.pCurrent */))))(tls), nBuf, zBufOut) } + func winDlSym(tls *libc.TLS, pVfs uintptr, pH uintptr, zSym uintptr) uintptr { /* sqlite3.c:47465:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -72281,6 +72359,7 @@ func winDlSym(tls *libc.TLS, pVfs uintptr, pH uintptr, zSym uintptr) uintptr { / } return proc } + func winDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:47473:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -72321,7 +72400,8 @@ func winSleep(tls *libc.TLS, pVfs uintptr, microsec int32) int32 { /* sqlite3.c: // The following variable, if set to a non-zero value, is interpreted as // the number of seconds since 1970 and is used to set the result of // sqlite3OsCurrentTime() during testing. -var Xsqlite3_current_time int32 = 0 /* sqlite3.c:47579:16 */ // Fake system time in seconds since 1970. +var Xsqlite3_current_time int32 = 0 /* sqlite3.c:47579:16 */ +// Fake system time in seconds since 1970. // Find the current time (in Universal Coordinated Time). Write into *piNow // the current time and date as a Julian Day number times 86_400_000. In @@ -72965,6 +73045,7 @@ func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c: func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:48283:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 128 /* &.xGetLastError */))))(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } + func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:48286:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 136 /* &.xCurrentTimeInt64 */))))(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) } @@ -73212,6 +73293,7 @@ func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlit } return int32(0) } + func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:48618:20: */ return (libc.Bool32((p != uintptr(0)) && (Xsqlite3BitvecTestNotNull(tls, p, i) != 0))) } @@ -73719,6 +73801,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:49138:20: */ } return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 16 /* &.xInit */))))(tls, Xsqlite3Config.Fpcache2.FpArg) } + func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:49148:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. @@ -75160,6 +75243,7 @@ func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32 } return uintptr(0) } + func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:50793:15: */ var pCache uintptr = p var pPage uintptr @@ -75170,6 +75254,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) return pPage } + func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:50808:28: */ var pCache uintptr = p @@ -78643,7 +78728,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54657:12: */ libc.Xmemcpy(tls, (pPager + 136 /* &.dbFileVers */), dbFileVers, uint64(unsafe.Sizeof([16]int8{}))) } } - Xsqlite3_pager_readdb_count++ + atomic.AddInt32(&Xsqlite3_pager_readdb_count, 1) (*Pager)(unsafe.Pointer(pPager)).FnRead++ return rc @@ -79360,12 +79445,14 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno } var saved_cnt int32 /* sqlite3.c:55493:12: */ + func Xdisable_simulated_io_errors(tls *libc.TLS) { /* sqlite3.c:55494:6: */ - saved_cnt = Xsqlite3_io_error_pending - Xsqlite3_io_error_pending = -1 + saved_cnt = libc.AtomicLoadInt32(&Xsqlite3_io_error_pending) + libc.AtomicStoreInt32(&Xsqlite3_io_error_pending, int32(-1)) } + func Xenable_simulated_io_errors(tls *libc.TLS) { /* sqlite3.c:55498:6: */ - Xsqlite3_io_error_pending = saved_cnt + libc.AtomicStoreInt32(&Xsqlite3_io_error_pending, int32(saved_cnt)) } // Read the first N bytes from the beginning of the file into memory @@ -79904,7 +79991,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // Update any backup objects copying the contents of this pager. Xsqlite3BackupUpdate(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup, pgno, (*PgHdr)(unsafe.Pointer(pList)).FpData) - Xsqlite3_pager_writedb_count++ + atomic.AddInt32(&Xsqlite3_pager_writedb_count, 1) } else { } @@ -79975,6 +80062,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56159:12: * } return rc } + func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56195:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) @@ -81282,11 +81370,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57391: // Do not use this routine to release the last reference to page1 } + func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57403:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } + func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57406:21: */ var pPager uintptr @@ -81493,7 +81583,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite return rc } - Xsqlite3_pager_writej_count++ + atomic.AddInt32(&Xsqlite3_pager_writej_count, 1) *(*I64)(unsafe.Pointer(pPager + 96 /* &.journalOff */)) += (I64(8 + (*Pager)(unsafe.Pointer(pPager)).FpageSize)) (*Pager)(unsafe.Pointer(pPager)).FnRec++ @@ -82274,6 +82364,7 @@ func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { return rc } + func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:58562:20: */ if (nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint) && ((*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0) { @@ -83634,6 +83725,7 @@ func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintpt return rc } + func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:60010:12: */ if ((*Wal)(unsafe.Pointer(pWal)).FnWiData <= iPage) || ((libc.AssignPtrUintptr(ppPage, *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*8)))) == uintptr(0)) { return walIndexPageRealloc(tls, pWal, iPage, ppPage) @@ -83812,6 +83904,7 @@ func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite return rc } + func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:60272:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return @@ -83820,6 +83913,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: (1 | 4)) } + func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:60278:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { @@ -83830,6 +83924,7 @@ func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 return rc } + func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:60288:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return @@ -83846,6 +83941,7 @@ func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:60301:12: */ return (int32((iPage * U32(383)) & (U32((4096 * 2) - 1)))) } + func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:60306:12: */ return ((iPriorHash + 1) & ((4096 * 2) - 1)) } @@ -87799,11 +87895,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64358:29: */ } (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } + func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64372:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } + func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64375:29: */ var i int32 var p uintptr @@ -87815,6 +87913,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64375:29: */ } } } + func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64384:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) @@ -87829,6 +87928,7 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64384:21: * func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:64470:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } + func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:64474:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -88056,7 +88156,9 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: (*BtLock)(unsafe.Pointer(pLock)).FeLock = U8(1) } } -} // Forward reference +} + +// Forward reference // This routine is used inside of assert() only **** // @@ -88666,6 +88768,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn (*CellInfo)(unsafe.Pointer(pInfo)).FpPayload = uintptr(0) return } + func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:65649:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -88730,6 +88833,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt btreeParseCellAdjustSizeForOverflow(tls, pPage, pCell, pInfo) } } + func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:65717:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -88760,6 +88864,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u btreeParseCellAdjustSizeForOverflow(tls, pPage, pCell, pInfo) } } + func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:65754:13: */ (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((pPage + 128 /* &.xParseCell */))))(tls, pPage, ((*MemPage)(unsafe.Pointer((pPage))).FaData + uintptr((int32((*MemPage)(unsafe.Pointer((pPage))).FmaskPage) & int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(((*MemPage)(unsafe.Pointer((pPage))).FaCellIdx + uintptr((2 * (iCell))))))))))), pInfo) } @@ -88814,6 +88919,7 @@ func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c return U16(nSize) } + func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:65822:12: */ var pIter uintptr = (pCell + uintptr(4)) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -89666,6 +89772,7 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:66624:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } + func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:66627:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) @@ -89751,11 +89858,13 @@ func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66704:13: * Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } + func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66713:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } + func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:66716:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -92065,6 +92174,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(1) return 0 } + func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:68920:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -92072,6 +92182,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK Xsqlite3BtreeLeave(tls, p) return rc } + func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:68933:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -92166,6 +92277,7 @@ func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:69070:21 *(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) |= U8((0x40)) } + func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:69074:21: */ *(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) &= libc.Uint8FromInt32((^libc.Int32(0x40))) @@ -92510,6 +92622,7 @@ func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf } return accessPayload(tls, pCur, offset, amt, pBuf, 0) } + func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:69495:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == 0 { @@ -93372,6 +93485,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70198:28: */ } return int32(0) } + func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:70268:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -93465,6 +93579,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70308:28: * } return rc } + func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:70357:20: */ _ = flags // Used in COMDB2 but not native SQLite @@ -94211,6 +94326,7 @@ __18: releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pTrunk */))) return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } + func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:70851:13: */ if (*(*int32)(unsafe.Pointer(pRC))) == 0 { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) @@ -94794,6 +94910,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:71397 *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer(((*CellArray)(unsafe.Pointer(p)).FpRef + 120 /* &.xCellSize */))))(tls, (*CellArray)(unsafe.Pointer(p)).FpRef, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FapCell + uintptr(N)*8))) return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } + func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:71403:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { @@ -97607,6 +97724,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags *(*Pgno)(unsafe.Pointer(piTable)) = *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)) return 0 } + func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:73729:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -97861,6 +97979,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 } return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) } + func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:73941:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -98188,6 +98307,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:74299:1 i = j } } + func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:74309:12: */ var j U32 var i U32 @@ -99658,6 +99778,7 @@ func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqli } } } + func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:75746:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) @@ -100155,6 +100276,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:76417:28: */ Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp /* &value */, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) return *(*I64)(unsafe.Pointer(bp /* value */)) } + func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:76422:20: */ var flags int32 @@ -100185,6 +100307,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:76445:31: Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp /* &val */, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) return *(*float64)(unsafe.Pointer(bp /* val */)) } + func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:76451:23: */ if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & 0x0008) != 0 { @@ -100383,6 +100506,7 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:76652:21 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(0x0001) } } + func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:76659:21: */ Xsqlite3VdbeMemSetNull(tls, p) } @@ -100500,6 +100624,7 @@ func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sq Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } + func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:76833:21: */ if (int32((*Mem)(unsafe.Pointer((pTo))).Fflags) & (0x2000 | 0x0400)) != 0 { @@ -100686,6 +100811,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, } return rc } + func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:77029:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -101488,6 +101614,7 @@ func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:77717: } return 0 } + func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:77720:20: */ var p uintptr = pVal @@ -101652,6 +101779,7 @@ func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) i return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) } + func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:77972:20: */ var i int32 var pOp uintptr @@ -101673,12 +101801,15 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, (*VdbeOp)(unsafe.Pointer(pOp)).FzComment = uintptr(0) return i } + func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:78009:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } + func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:78012:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, 0, 0) } + func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:78015:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } @@ -101931,6 +102062,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(p)).FaLabel + uintptr(j)*4)) = (*Vdbe)(unsafe.Pointer(v)).FnOp } } + func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:78302:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -102199,15 +102331,19 @@ __3: func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:78782:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } + func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78785:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } + func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78788:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } + func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:78791:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } + func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:78794:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { @@ -102256,10 +102392,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:78849:29: */ } Xsqlite3DbFreeNN(tls, db, p) } + func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:78853:29: */ freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) Xsqlite3DbFreeNN(tls, db, p) } + func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:78857:13: */ switch p4type { @@ -102404,6 +102542,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-7) } } + func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:79034:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102489,6 +102628,7 @@ func vdbeVComment(tls *libc.TLS, p uintptr, zFormat uintptr, ap Va_list) { /* sq (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(((*Vdbe)(unsafe.Pointer(p)).FnOp-1))*32)).FzComment = Xsqlite3VMPrintf(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, zFormat, ap) } } + func Xsqlite3VdbeComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79123:21: */ var ap Va_list _ = ap @@ -102498,6 +102638,7 @@ func Xsqlite3VdbeComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) _ = ap } } + func Xsqlite3VdbeNoopComment(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79131:21: */ var ap Va_list _ = ap @@ -102883,6 +103024,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:79548:29: */ } } } + func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:79562:21: */ if ((*Vdbe)(unsafe.Pointer(p)).FlockMask) == YDbMask(0) { return @@ -103808,6 +103950,7 @@ func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3. } return rc } + func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:80715:20: */ if ((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0) && ((*Vdbe)(unsafe.Pointer(p)).FiStatement != 0) { return vdbeCloseStatement(tls, p, eOp) @@ -104239,7 +104382,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:812 if *(*int32)(unsafe.Pointer(bp /* res */)) != 0 { return Xsqlite3CorruptError(tls, 81251) } - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(0) return 0 @@ -104373,6 +104516,7 @@ func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3. } return U32(0) } + func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:81468:19: */ return sqlite3SmallTypeSizes[serial_type] @@ -104500,6 +104644,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { } return U32(8) } + func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { /* sqlite3.c:81629:20: */ switch serial_type { case U32(10): @@ -104603,6 +104748,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin } var aFlag = [2]U16{(U16(0x0010 | 0x1000)), (U16(0x0002 | 0x1000))} /* sqlite3.c:81711:24 */ + // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if // the first argument is a pointer to KeyInfo structure pKeyInfo. @@ -105198,6 +105344,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } + func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:82413:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -105800,6 +105947,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83026:12: */ } return int32(0) } + func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83034:12: */ if p == uintptr(0) { Xsqlite3_log(tls, 21, ts+11577 /* "API called with ..." */, 0) @@ -105937,21 +106085,27 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:831 } return uintptr(0) } + func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83172:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(1)) } + func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83175:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(2)) } + func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:83178:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } + func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83181:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } + func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:83184:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } + func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:83187:25: */ var pMem uintptr = pVal return func() uint32 { @@ -105961,6 +106115,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 return uint32(0) }() } + func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:83191:17: */ var p uintptr = pVal if ((((int32((*Mem)(unsafe.Pointer(p)).Fflags) & ((0xc1bf | 0x0200) | 0x8000)) == ((0x0001 | 0x0200) | 0x8000)) && @@ -105973,15 +106128,19 @@ func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr } return uintptr(0) } + func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83204:32: */ return Xsqlite3ValueText(tls, pVal, uint8(1)) } + func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83208:23: */ return Xsqlite3ValueText(tls, pVal, uint8(2)) } + func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83211:23: */ return Xsqlite3ValueText(tls, pVal, uint8(3)) } + func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83214:23: */ return Xsqlite3ValueText(tls, pVal, uint8(2)) } @@ -106117,6 +106276,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 Xsqlite3_result_error_toobig(tls, pCtx) } } + func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:83369:12: */ if xDel == uintptr(0) { @@ -106131,10 +106291,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) } return 18 } + func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83385:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(0), xDel) } + func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:83395:17: */ if n > uint64(0x7fffffff) { @@ -106143,32 +106305,39 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui setResultStrOrError(tls, pCtx, z, int32(n), uint8(0), xDel) } } + func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:83409:17: */ Xsqlite3VdbeMemSetDouble(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, rVal) } + func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:83413:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = 1 Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, n, uint8(1), libc.UintptrFromInt32(-1)) } + func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:83419:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = 1 Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, n, uint8(2), libc.UintptrFromInt32(-1)) } + func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:83425:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } + func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:83429:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } + func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:83433:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) } + func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:83437:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut @@ -106176,16 +106345,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(0x0001) Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } + func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:83449:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = (U8(eSubtype & uint32(0xff))) *(*U16)(unsafe.Pointer(pOut + 8 /* &.flags */)) |= U16((0x8000)) } + func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83455:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(1), xDel) } + func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:83464:17: */ if int32(enc) == 4 { @@ -106197,26 +106369,32 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui setResultStrOrError(tls, pCtx, z, int32(n), enc, xDel) } } + func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83481:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(2), xDel) } + func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83490:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(3), xDel) } + func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:83499:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(2), xDel) } + func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:83509:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } + func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:83513:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } + func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:83517:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut @@ -106226,6 +106404,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, int32(n)) return 0 } + func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:83526:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { @@ -106830,36 +107009,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84107:16: */ var val int32 = Xsqlite3_value_bytes(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84112:16: */ var val int32 = Xsqlite3_value_bytes16(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:84117:19: */ var val float64 = Xsqlite3_value_double(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84122:16: */ var val int32 = Xsqlite3_value_int(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:84127:25: */ var val Sqlite_int64 = Xsqlite3_value_int64(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84132:32: */ var val uintptr = Xsqlite3_value_text(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84137:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if (int32((*Mem)(unsafe.Pointer(pOut)).Fflags) & 0x0800) != 0 { @@ -106869,11 +107055,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s columnMallocFailure(tls, pStmt) return pOut } + func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84147:23: */ var val uintptr = Xsqlite3_value_text16(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } + func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84153:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) @@ -106929,6 +107117,7 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84224:23: */ return columnName(tls, pStmt, N, 0, 0) } + func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84228:23: */ return columnName(tls, pStmt, N, 1, 0) } @@ -106941,6 +107130,7 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84247:23: */ return columnName(tls, pStmt, N, 0, 1) } + func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84251:23: */ return columnName(tls, pStmt, N, 1, 1) } @@ -106951,6 +107141,7 @@ func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84263:23: */ return columnName(tls, pStmt, N, 0, 2) } + func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84267:23: */ return columnName(tls, pStmt, N, 1, 2) } @@ -106961,6 +107152,7 @@ func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uint func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84277:23: */ return columnName(tls, pStmt, N, 0, 3) } + func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84281:23: */ return columnName(tls, pStmt, N, 1, 3) } @@ -106971,6 +107163,7 @@ func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84291:23: */ return columnName(tls, pStmt, N, 0, 4) } + func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84295:23: */ return columnName(tls, pStmt, N, 1, 4) } @@ -107065,6 +107258,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84396:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(0)) } + func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:84408:16: */ if nData > uint64(0x7fffffff) { @@ -107074,6 +107268,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, } return int32(0) } + func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:84422:16: */ var rc int32 var p uintptr = pStmt @@ -107084,9 +107279,11 @@ func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) } return rc } + func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:84432:16: */ return Xsqlite3_bind_int64(tls, p, i, I64(iValue)) } + func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:84435:16: */ var rc int32 var p uintptr = pStmt @@ -107097,6 +107294,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in } return rc } + func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84445:16: */ var rc int32 var p uintptr = pStmt @@ -107106,6 +107304,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite } return rc } + func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:84454:16: */ var rc int32 var p uintptr = pStmt @@ -107118,9 +107317,11 @@ func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, } return rc } + func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84472:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(1)) } + func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:84481:16: */ if nData > uint64(0x7fffffff) { @@ -107133,9 +107334,11 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, } return int32(0) } + func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:84498:16: */ return bindText(tls, pStmt, i, zData, nData, xDel, uint8(2)) } + func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:84508:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { @@ -107177,6 +107380,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) } return rc } + func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:84539:16: */ var rc int32 var p uintptr = pStmt @@ -107187,6 +107391,7 @@ func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int3 } return rc } + func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:84549:16: */ var rc int32 var p uintptr = pStmt @@ -107233,6 +107438,7 @@ func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName i } return Xsqlite3VListNameToNum(tls, (*Vdbe)(unsafe.Pointer(p)).FpVList, zName, nName) } + func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:84594:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } @@ -107898,6 +108104,7 @@ var Xsqlite3_sort_count int32 = 0 /* sqlite3.c:85308:16 */ // is working correctly. This variable has no function other than to // help verify the correct operation of the library. var Xsqlite3_max_blobsize int32 = 0 /* sqlite3.c:85319:16 */ + func updateMaxBlobsize(tls *libc.TLS, p uintptr) { /* sqlite3.c:85320:13: */ if ((int32((*Mem)(unsafe.Pointer(p)).Fflags) & (0x0002 | 0x0010)) != 0) && ((*Mem)(unsafe.Pointer(p)).Fn > Xsqlite3_max_blobsize) { Xsqlite3_max_blobsize = (*Mem)(unsafe.Pointer(p)).Fn @@ -108200,6 +108407,7 @@ func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(0x0004) return pOut } + func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:85966:12: */ var pOut uintptr @@ -115245,7 +115453,7 @@ __551: ; __535: ; - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) if !(oc >= 24) { goto __552 } @@ -116491,7 +116699,7 @@ __656: __114: // jump __115: // jump Xsqlite3_sort_count++ - Xsqlite3_search_count-- + atomic.AddInt32(&Xsqlite3_search_count, -1) *(*U32)(unsafe.Pointer((p + 212 /* &.aCounter */) + uintptr(2)*4))++ // Fall through into OP_Rewind /* no break */ @@ -116624,7 +116832,7 @@ next_tail: } (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(0) *(*U32)(unsafe.Pointer((p + 212 /* &.aCounter */) + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - Xsqlite3_search_count++ + atomic.AddInt32(&Xsqlite3_search_count, 1) goto jump_to_p2_and_check_for_interrupt __661: ; @@ -123371,6 +123579,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. } return 0 } + func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:97606:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) @@ -123529,6 +123738,7 @@ func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return 0 } + func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:97725:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- @@ -123590,6 +123800,7 @@ func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli } return 0 } + func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:97794:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -125875,6 +126086,7 @@ func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, p } return pExpr } + func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:99820:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -126403,6 +126615,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:100 } } } + func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:100413:13: */ if p != 0 { var i int32 @@ -126411,6 +126624,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } } + func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:100421:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { @@ -126792,6 +127006,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 Xsqlite3DbFreeNN(tls, db, p) } } + func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:100855:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) @@ -127052,12 +127267,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) } return 0 } + func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101135:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */)) { return 0 } return 1 } + func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:101138:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -127098,6 +127315,7 @@ func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr } return uintptr(0) } + func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:101171:25: */ var pNew uintptr var pItem uintptr @@ -127210,6 +127428,7 @@ func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintp } return pNew } + func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:101263:23: */ var pNew uintptr var i int32 @@ -127238,6 +127457,7 @@ func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } return pNew } + func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:101287:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127542,6 +127762,7 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:1 } Xsqlite3DbFreeNN(tls, db, pList) } + func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:101584:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) @@ -127746,6 +127967,7 @@ func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / } return int32(0) } + func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:101788:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -132421,6 +132643,7 @@ func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* } return i } + func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:105750:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) @@ -136926,6 +137149,7 @@ __3: ; return 0 } + func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:110000:20: */ for pSelect != 0 { if Xsqlite3FixExprList(tls, pFix, (*Select)(unsafe.Pointer(pSelect)).FpEList) != 0 { @@ -136961,6 +137185,7 @@ func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* } return 0 } + func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:110038:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -136996,6 +137221,7 @@ func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqli } return 0 } + func Xsqlite3FixExprList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:110065:20: */ var i int32 var pItem uintptr @@ -137897,6 +138123,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11105 // Verify that no lookaside memory was used by schema tables } + func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:111108:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { @@ -145065,6 +145292,7 @@ func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } } } + func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:117525:13: */ var z1 uintptr var z2 uintptr @@ -146131,6 +146359,7 @@ func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } } } + func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118598:13: */ var p uintptr var type1 int32 @@ -146153,6 +146382,7 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } } + func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118623:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -146166,6 +146396,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118623:13: */ } } } + func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118636:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -146173,6 +146404,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118636:13: */ Xsqlite3_result_double(tls, context, ((*SumCtx)(unsafe.Pointer(p)).FrSum / float64((*SumCtx)(unsafe.Pointer(p)).Fcnt))) } } + func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118643:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -146207,6 +146439,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // expressed as a 32-bit integer. } + func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118681:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) @@ -146217,6 +146450,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118681:13: */ return int64(0) }()) } + func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:118687:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) @@ -146264,6 +146498,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3VdbeMemCopy(tls, pBest, pArg) } } + func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:118743:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) @@ -146276,9 +146511,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } } + func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:118754:13: */ minMaxValueFinalize(tls, context, 1) } + func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118760:13: */ minMaxValueFinalize(tls, context, 0) } @@ -146319,6 +146556,7 @@ func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } } + func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118800:13: */ var n int32 var pAccum uintptr @@ -146347,6 +146585,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } } + func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118831:13: */ var pAccum uintptr pAccum = Xsqlite3_aggregate_context(tls, context, 0) @@ -146361,6 +146600,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:118831:1 } } } + func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:118846:13: */ var pAccum uintptr pAccum = Xsqlite3_aggregate_context(tls, context, 0) @@ -149094,6 +149334,7 @@ var autoIncEnd = [5]VdbeOpList{ Fp2: int8(0), Fp3: int8(0)}, } /* sqlite3.c:121025:29 */ + func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:121054:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) @@ -152465,6 +152706,7 @@ func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintpt var azEndings = [1]uintptr{ ts + 21660, /* "dll" */ } /* sqlite3.c:124759:21 */ + func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:124882:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -153483,6 +153725,7 @@ var aPragmaName = [67]PragmaName{ FiArg: /* iArg: */ (uint64(0x00000001 | 0x08000000))}, } /* sqlite3.c:125260:25 */ + // Number of pragmas: 67 on by default, 77 total. //************* End of pragma.h ********************************************* @@ -158463,6 +158706,7 @@ end_prepare: Xsqlite3ParserReset(tls, bp+32 /* &sParse */) return rc } + func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129056:12: */ var rc int32 var cnt int32 = 0 @@ -158539,6 +158783,7 @@ func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppS // VERIFY: F13021 return rc } + func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129152:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works @@ -158551,6 +158796,7 @@ func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, return rc } + func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129170:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from @@ -158622,12 +158868,14 @@ func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, p // VERIFY: F13021 return rc } + func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129268:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0x80), ppStmt, pzTail) // VERIFY: F13021 return rc } + func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:129280:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, @@ -162225,6 +162473,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite } return pExpr } + func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:132858:13: */ var i int32 if pList == uintptr(0) { @@ -162234,6 +162483,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: (*ExprList_item)(unsafe.Pointer((pList + 8 /* &.a */) + uintptr(i)*32)).FpExpr = substExpr(tls, pSubst, (*ExprList_item)(unsafe.Pointer((pList+8 /* &.a */)+uintptr(i)*32)).FpExpr) } } + func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:132868:13: */ var pSrc uintptr var pItem uintptr @@ -162292,6 +162542,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int *(*Bitmask)(unsafe.Pointer(pItem + 88 /* &.colUsed */)) |= (Xsqlite3ExprColUsed(tls, pExpr)) return 0 } + func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:132912:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -169504,6 +169755,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) return rc } + func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:139232:12: */ var z uintptr var ap Va_list @@ -174489,6 +174741,7 @@ __3: } return 0 } + func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:144979:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing @@ -175031,12 +175284,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas } return mask } + func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:145532:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } + func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:145535:24: */ var i int32 var mask Bitmask = uint64(0) @@ -181008,6 +181263,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151322:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { @@ -181039,6 +181295,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151354:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -181124,6 +181381,7 @@ error_out: Xsqlite3_result_error(tls, pCtx, ts+28353 /* "second argument ..." */, -1) } + func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151416:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -181146,6 +181404,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = nArg _ = apArg } + func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151444:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) @@ -181172,6 +181431,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = nArg _ = apArg } + func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151478:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -181194,6 +181454,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr (*CallCount)(unsafe.Pointer(p)).FnTotal++ } } + func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151506:13: */ var p uintptr _ = nArg @@ -181201,6 +181462,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) (*CallCount)(unsafe.Pointer(p)).FnStep++ } + func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151517:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) @@ -181228,6 +181490,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnTotal++ } } + func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151551:13: */ var p uintptr _ = nArg @@ -181235,6 +181498,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) (*CallCount)(unsafe.Pointer(p)).FnStep++ } + func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151562:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -181270,6 +181534,7 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } + func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151607:13: */ var p uintptr _ = nArg @@ -181277,6 +181542,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } + func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151618:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -181320,6 +181586,7 @@ func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) } } } + func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:151671:13: */ var p uintptr _ = nArg @@ -181333,6 +181600,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } } + func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151688:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) @@ -181340,6 +181608,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151688:13: Xsqlite3_result_value(tls, pCtx, (*LastValueCtx)(unsafe.Pointer(p)).FpVal) } } + func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:151695:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -181380,7 +181649,9 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 _ = n //NO_TEST _ = a //NO_TEST //NO_TEST -} //NO_TEST +} + +//NO_TEST func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:151744:13: */ _ = p /*no-op*/ } @@ -181789,6 +182060,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return 0 } + func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:151994:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect @@ -186116,7 +186388,8 @@ var yyRuleInfoNRhs = [385]int8{ int8(-4), // (382) anylist ::= anylist LP anylist RP int8(-2), // (383) anylist ::= anylist ANY int8(0), // (384) with ::= -} /* sqlite3.c:157063:26 */ // Forward Declaration +} /* sqlite3.c:157063:26 */ +// Forward Declaration // Perform a reduce action and the shift that must immediately // follow the reduce. @@ -188380,6 +188653,7 @@ var aKWCode = [145]uint8{ uint8(132), uint8(142), uint8(78), uint8(79), uint8(161), uint8(61), uint8(34), uint8(64), uint8(133), uint8(120), } /* sqlite3.c:159536:28 */ + // Hash table decoded: // 0: INSERT // 1: IS @@ -188686,6 +188960,7 @@ func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sq } return n } + func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:159871:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188694,6 +188969,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c keywordCode(tls, z, n, bp /* &id */) return *(*int32)(unsafe.Pointer(bp /* id */)) } + func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:159877:16: */ if (i < 0) || (i >= 145) { return 1 @@ -188702,9 +188978,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt *(*int32)(unsafe.Pointer(pnName)) = int32(aKWLen[i]) return 0 } + func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:159883:16: */ return 145 } + func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:159884:16: */ return (libc.Bool32(59 != Xsqlite3KeywordCode(tls, zName, nName))) } @@ -188800,6 +189078,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:159987: } return 161 } + func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:159995:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188813,6 +189092,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq } return 59 } + func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:160002:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190617,6 +190897,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:162252:16: */ return sqlite3Close(tls, db, 0) } + func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:162253:16: */ return sqlite3Close(tls, db, 1) } @@ -191389,10 +191670,12 @@ func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int return createFunctionApi(tls, db, zFunc, nArg, enc, p, xSFunc, xStep, xFinal, uintptr(0), uintptr(0), uintptr(0)) } + func Xsqlite3_create_function_v2(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xDestroy uintptr) int32 { /* sqlite3.c:162955:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, xSFunc, xStep, xFinal, uintptr(0), uintptr(0), xDestroy) } + func Xsqlite3_create_window_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:162969:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) @@ -191814,6 +192097,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163559:16: } return ((*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask) } + func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163568:16: */ if (db != 0) && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { return Xsqlite3MisuseError(tls, 163570) @@ -191823,6 +192107,7 @@ func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1 } return (*Sqlite3)(unsafe.Pointer(db)).FerrCode } + func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:163577:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno @@ -192705,6 +192990,7 @@ func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sq return openDatabase(tls, zFilename, ppDb, (uint32(0x00000002 | 0x00000004)), uintptr(0)) } + func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:164393:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } @@ -192828,14 +193114,17 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) libc.VaList(bp, zType, lineno, (uintptr(20)+Xsqlite3_sourceid(tls)))) return iErr } + func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164593:20: */ return Xsqlite3ReportError(tls, 11, lineno, ts+32308 /* "database corrupt..." */) } + func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164597:20: */ return Xsqlite3ReportError(tls, 21, lineno, ts+32328 /* "misuse" */) } + func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:164601:20: */ return Xsqlite3ReportError(tls, 14, lineno, ts+32335 /* "cannot open file" */) @@ -193249,7 +193538,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit { var x int32 = 0 - rc = x + rc = libc.AtomicLoadInt32(&x) break } @@ -193608,6 +193897,7 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165356:23: */ return databaseName(tls, zFilename) } + func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165359:23: */ zFilename = databaseName(tls, zFilename) zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1)) @@ -193617,6 +193907,7 @@ func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sq } return (zFilename + uintptr(1)) } + func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:165368:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1)) @@ -196742,6 +197033,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq jsonAppendValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) } } + func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:187331:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) @@ -196771,9 +197063,11 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: } Xsqlite3_result_subtype(tls, ctx, uint32(74)) } + func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187353:13: */ jsonArrayCompute(tls, ctx, 0) } + func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187356:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -196844,6 +197138,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s jsonAppendValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) } } + func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:187439:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) @@ -196872,9 +197167,11 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c } Xsqlite3_result_subtype(tls, ctx, uint32(74)) } + func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187460:13: */ jsonObjectCompute(tls, ctx, 0) } + func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:187463:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -197813,10 +198110,12 @@ type RtreeValue = float32 /* sqlite3.c:188256:17 */ func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:188535:12: */ return ((int32(*(*U8)(unsafe.Pointer(p + uintptr(0)))) << 8) + int32(*(*U8)(unsafe.Pointer(p + uintptr(1))))) } + func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:188538:13: */ // p is always 4-byte aligned (*(*U32)(unsafe.Pointer(pCoord /* .Fu */))) = U32(libc.X_byteswap_ulong(tls, uint32(*(*U32)(unsafe.Pointer(p))))) } + func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:188555:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -197834,6 +198133,7 @@ func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:188587:13: */ *(*U8)(unsafe.Pointer(p + uintptr(0))) = (U8((i >> 8) & 0xFF)) *(*U8)(unsafe.Pointer(p + uintptr(1))) = (U8((i >> 0) & 0xFF)) } + func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:188591:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -197846,6 +198146,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 libc.Xmemcpy(tls, p, bp /* &i */, uint64(4)) return 4 } + func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:188614:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -200485,6 +200786,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:191175:1 } return f } + func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:191183:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) @@ -202777,6 +203079,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } } + func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:193173:13: */ var p uintptr var pBBox uintptr @@ -208578,7 +208881,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:199480:16: (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 104 /* &.xShmMap */))))(tls, pDb, 0, (32 * 1024), 0, bp+24 /* &ptr */) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - *(*U32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 24 /* ptr */))) + uintptr(24)*4)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame + *(*U32)(unsafe.Pointer((libc.AtomicLoadPUintptr(bp + 24 /* ptr */)) + uintptr(24)*4)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame } } @@ -209729,13 +210032,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } if rc == 0 { - *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*8)) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*8)) } else { - *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = uintptr(0) } } else { - rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 104 /* &.xShmMap */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 104 /* &.xShmMap */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) } return rc @@ -212686,7 +212989,8 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:210261:26 */ // Forward Declaration +} /* sqlite3.c:210261:26 */ +// Forward Declaration // Perform a reduce action and the shift that must immediately // follow the reduce. @@ -215362,6 +215666,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:213114:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } + func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:213115:13: */ Xsqlite3_free(tls, p) } @@ -218014,6 +218319,7 @@ func fts5ExprFunction(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr, bT func fts5ExprFunctionHr(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:215460:13: */ fts5ExprFunction(tls, pCtx, nArg, apVal, 0) } + func fts5ExprFunctionTcl(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:215467:13: */ fts5ExprFunction(tls, pCtx, nArg, apVal, 1) } @@ -220109,6 +220415,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FbEof } + func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:217680:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -220239,6 +220546,7 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FbEof } + func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:217803:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } @@ -220299,6 +220607,7 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:217867:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FiRowid } + func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:217870:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */) + uintptr(0)*32)).FiLeafPgno } @@ -225634,6 +225943,7 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:223403:12: */ return fts5InitVtab(tls, 0, db, pAux, argc, argv, ppVtab, pzErr) } + func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:223413:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -232483,6 +232793,7 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:229648:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } + func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:229658:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } diff --git a/speedtest1/main_darwin_amd64.go b/speedtest1/main_darwin_amd64.go index 243922a..58f334f 100644 --- a/speedtest1/main_darwin_amd64.go +++ b/speedtest1/main_darwin_amd64.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -o speedtest1/main_darwin_amd64.go -trace-translation-units testdata/sqlite-src-3330000/test/speedtest1.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1 -DSQLITE_WITHOUT_ZONEMALLOC', DO NOT EDIT. +// Code generated by 'ccgo -o speedtest1/main_darwin_amd64.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-src-3330000/test/speedtest1.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1 -DSQLITE_WITHOUT_ZONEMALLOC', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -13,6 +14,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -10799,6 +10801,7 @@ var tens = [10]uintptr{ts + 2152 /* "" */, ts + 2309 /* "ten" */, ts + 2389 /* " // Start a new test case var zDots = *(*[72]int8)(unsafe.Pointer(ts + 2443 /* "..................." */)) /* speedtest1.c:368:19 */ + func speedtest1_begin_test(tls *libc.TLS, iTestNum int32, zTestName uintptr, va uintptr) { /* speedtest1.c:370:6: */ bp := tls.Alloc(64) defer tls.Free(64) diff --git a/speedtest1/main_linux_386.go b/speedtest1/main_linux_386.go index cf53c99..55eb843 100644 --- a/speedtest1/main_linux_386.go +++ b/speedtest1/main_linux_386.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -o speedtest1/main_linux_386.go -trace-translation-units testdata/sqlite-src-3330000/test/speedtest1.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -o speedtest1/main_linux_386.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-src-3330000/test/speedtest1.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -13,6 +14,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -4479,6 +4481,7 @@ var tens = [10]uintptr{ts + 2152 /* "" */, ts + 2309 /* "ten" */, ts + 2389 /* " // Start a new test case var zDots = *(*[72]int8)(unsafe.Pointer(ts + 2443 /* "..................." */)) /* speedtest1.c:368:19 */ + func speedtest1_begin_test(tls *libc.TLS, iTestNum int32, zTestName uintptr, va uintptr) { /* speedtest1.c:370:6: */ bp := tls.Alloc(64) defer tls.Free(64) diff --git a/speedtest1/main_linux_amd64.go b/speedtest1/main_linux_amd64.go index d530ca3..8a4fbc8 100644 --- a/speedtest1/main_linux_amd64.go +++ b/speedtest1/main_linux_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -o speedtest1/main_linux_amd64.go -trace-translation-units testdata/sqlite-src-3330000/test/speedtest1.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -o speedtest1/main_linux_amd64.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-src-3330000/test/speedtest1.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package main diff --git a/speedtest1/main_linux_arm.go b/speedtest1/main_linux_arm.go index 8e0cd85..cfba3a8 100644 --- a/speedtest1/main_linux_arm.go +++ b/speedtest1/main_linux_arm.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -o speedtest1/main_linux_arm.go -trace-translation-units testdata/sqlite-src-3330000/test/speedtest1.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -o speedtest1/main_linux_arm.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-src-3330000/test/speedtest1.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -13,6 +14,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -4481,6 +4483,7 @@ var tens = [10]uintptr{ts + 2152 /* "" */, ts + 2309 /* "ten" */, ts + 2389 /* " // Start a new test case var zDots = *(*[72]int8)(unsafe.Pointer(ts + 2443 /* "..................." */)) /* speedtest1.c:368:19 */ + func speedtest1_begin_test(tls *libc.TLS, iTestNum int32, zTestName uintptr, va uintptr) { /* speedtest1.c:370:6: */ bp := tls.Alloc(64) defer tls.Free(64) diff --git a/speedtest1/main_linux_arm64.go b/speedtest1/main_linux_arm64.go index 68e7230..894a0cd 100644 --- a/speedtest1/main_linux_arm64.go +++ b/speedtest1/main_linux_arm64.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -o speedtest1/main_linux_arm64.go -trace-translation-units testdata/sqlite-src-3330000/test/speedtest1.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -o speedtest1/main_linux_arm64.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-src-3330000/test/speedtest1.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -13,6 +14,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -4532,6 +4534,7 @@ var tens = [10]uintptr{ts + 2152 /* "" */, ts + 2309 /* "ten" */, ts + 2389 /* " // Start a new test case var zDots = *(*[72]int8)(unsafe.Pointer(ts + 2443 /* "..................." */)) /* speedtest1.c:368:19 */ + func speedtest1_begin_test(tls *libc.TLS, iTestNum int32, zTestName uintptr, va uintptr) { /* speedtest1.c:370:6: */ bp := tls.Alloc(64) defer tls.Free(64) diff --git a/speedtest1/main_windows_386.go b/speedtest1/main_windows_386.go index 2e6c51c..1620e75 100644 --- a/speedtest1/main_windows_386.go +++ b/speedtest1/main_windows_386.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -o speedtest1/main_windows_386.go -trace-translation-units testdata/sqlite-src-3330000/test/speedtest1.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. +// Code generated by 'ccgo -o speedtest1/main_windows_386.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-src-3330000/test/speedtest1.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -13,6 +14,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -2197,6 +2199,7 @@ type off64_t = int64 /* _mingw_off_t.h:15:39 */ type off_t = off64_t /* _mingw_off_t.h:24:17 */ // A pointer to an array of FILE type fpos_t = int64 /* stdio.h:104:37 */ + func vsnwprintf(tls *libc.TLS, s uintptr, n size_t, format uintptr, arg va_list) int32 { /* stdio.h:1213:15: */ return libc.X_vsnwprintf(tls, s, n, format, arg) @@ -2843,6 +2846,7 @@ var tens = [10]uintptr{ts + 2152 /* "" */, ts + 2309 /* "ten" */, ts + 2389 /* " // Start a new test case var zDots = *(*[72]int8)(unsafe.Pointer(ts + 2443 /* "..................." */)) /* speedtest1.c:368:19 */ + func speedtest1_begin_test(tls *libc.TLS, iTestNum int32, zTestName uintptr, va uintptr) { /* speedtest1.c:370:6: */ bp := tls.Alloc(80) defer tls.Free(80) diff --git a/speedtest1/main_windows_amd64.go b/speedtest1/main_windows_amd64.go index 7f85369..a3d9c1a 100644 --- a/speedtest1/main_windows_amd64.go +++ b/speedtest1/main_windows_amd64.go @@ -1,10 +1,11 @@ -// Code generated by 'ccgo -o speedtest1/main_windows_amd64.go -trace-translation-units testdata/sqlite-src-3330000/test/speedtest1.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. +// Code generated by 'ccgo -o speedtest1/main_windows_amd64.go -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count testdata/sqlite-src-3330000/test/speedtest1.c -Itestdata/sqlite-amalgamation-3330000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. package main import ( "math" "reflect" + "sync/atomic" "unsafe" "modernc.org/libc" @@ -13,6 +14,7 @@ import ( var _ = math.Pi var _ reflect.Kind +var _ atomic.Value var _ unsafe.Pointer func main() { libc.Start(main1) } @@ -2209,6 +2211,7 @@ type off64_t = int64 /* _mingw_off_t.h:15:39 */ type off_t = off64_t /* _mingw_off_t.h:24:17 */ type fpos_t = int64 /* stdio.h:104:37 */ + func vsnwprintf(tls *libc.TLS, s uintptr, n size_t, format uintptr, arg va_list) int32 { /* stdio.h:1213:15: */ return libc.X_vsnwprintf(tls, s, n, format, arg) @@ -2858,6 +2861,7 @@ var tens = [10]uintptr{ts + 2152 /* "" */, ts + 2309 /* "ten" */, ts + 2389 /* " // Start a new test case var zDots = *(*[72]int8)(unsafe.Pointer(ts + 2443 /* "..................." */)) /* speedtest1.c:368:19 */ + func speedtest1_begin_test(tls *libc.TLS, iTestNum int32, zTestName uintptr, va uintptr) { /* speedtest1.c:370:6: */ bp := tls.Alloc(80) defer tls.Free(80)